[kernel] r16245 - in dists/sid/linux-2.6/debian: . patches/features/arm patches/series
Martin Michlmayr
tbm at alioth.debian.org
Mon Sep 6 12:02:56 UTC 2010
Author: tbm
Date: Mon Sep 6 12:02:38 2010
New Revision: 16245
Log:
Add some patches from the Orion tree
Added:
dists/sid/linux-2.6/debian/patches/features/arm/dockstar-support.patch
dists/sid/linux-2.6/debian/patches/features/arm/kirkwood-unbreak-pcie-io-port.patch
dists/sid/linux-2.6/debian/patches/features/arm/openrd-uart-selection.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/22
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Sep 6 08:41:21 2010 (r16244)
+++ dists/sid/linux-2.6/debian/changelog Mon Sep 6 12:02:38 2010 (r16245)
@@ -45,6 +45,12 @@
* [mips,mipsel] Fix computation of DMA flags from device's
coherent_dma_mask.
+ [ Martin Michlmayr ]
+ * Add some patches from the Orion tree:
+ - OpenRD: Enable SD/UART selection for serial port 1
+ - kirkwood: Unbreak PCIe I/O port
+ - Kirkwood: support for Seagate DockStar
+
-- Ben Hutchings <ben at decadent.org.uk> Fri, 27 Aug 2010 08:38:26 +0100
linux-2.6 (2.6.32-21) unstable; urgency=high
Added: dists/sid/linux-2.6/debian/patches/features/arm/dockstar-support.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/arm/dockstar-support.patch Mon Sep 6 12:02:38 2010 (r16245)
@@ -0,0 +1,162 @@
+From: Eric Cooper <ecc at cmu.edu>
+Date: Thu, 5 Aug 2010 21:38:46 +0000 (-0400)
+Subject: [ARM] Kirkwood: support for Seagate DockStar
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnico%2Forion.git;a=commitdiff_plain;h=3fc2462b191a8dea9cd82806d7a4823f4bbb0ec0
+
+[ARM] Kirkwood: support for Seagate DockStar
+
+This patch adds support for the Seagate FreeAgent DockStar, a Marvell
+Sheevaplug derivative. I have already registered the DOCKSTAR machine
+ID.
+
+Signed-off-by: Eric Cooper <ecc at cmu.edu>
+Signed-off-by: Nicolas Pitre <nico at fluxnic.net>
+---
+
+diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
+index cc25501..3d5d66e 100644
+--- a/arch/arm/mach-kirkwood/Kconfig
++++ b/arch/arm/mach-kirkwood/Kconfig
+@@ -57,6 +57,12 @@
+ QNAP TS-410, TS-410U, TS-419P and TS-419U Turbo NAS
+ devices.
+
++config MACH_DOCKSTAR
++ bool "Seagate FreeAgent DockStar"
++ help
++ Say 'Y' here if you want your kernel to support the
++ Seagate FreeAgent DockStar.
++
+ config MACH_OPENRD
+ bool
+
+diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
+index 295d7ba..e690f76 100644
+--- a/arch/arm/mach-kirkwood/Makefile
++++ b/arch/arm/mach-kirkwood/Makefile
+@@ -9,6 +9,7 @@
+ obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
+ obj-$(CONFIG_MACH_TS219) += ts219-setup.o
+ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o
++obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
+ obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
+ obj-$(CONFIG_MACH_T5325) += t5325-setup.o
+
+diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
+new file mode 100644
+index 0000000..a90475d
+--- /dev/null
++++ b/arch/arm/mach-kirkwood/dockstar-setup.c
+@@ -0,0 +1,112 @@
++/*
++ * arch/arm/mach-kirkwood/dockstar-setup.c
++ *
++ * Seagate FreeAgent DockStar Setup
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/ata_platform.h>
++#include <linux/mtd/partitions.h>
++#include <linux/mv643xx_eth.h>
++#include <linux/gpio.h>
++#include <linux/leds.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <mach/kirkwood.h>
++#include <plat/mvsdio.h>
++#include "common.h"
++#include "mpp.h"
++
++static struct mtd_partition dockstar_nand_parts[] = {
++ {
++ .name = "u-boot",
++ .offset = 0,
++ .size = SZ_1M
++ }, {
++ .name = "uImage",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = SZ_4M
++ }, {
++ .name = "root",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = MTDPART_SIZ_FULL
++ },
++};
++
++static struct mv643xx_eth_platform_data dockstar_ge00_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
++};
++
++static struct gpio_led dockstar_led_pins[] = {
++ {
++ .name = "dockstar:green:health",
++ .default_trigger = "default-on",
++ .gpio = 46,
++ .active_low = 1,
++ },
++ {
++ .name = "dockstar:orange:misc",
++ .default_trigger = "none",
++ .gpio = 47,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_led_platform_data dockstar_led_data = {
++ .leds = dockstar_led_pins,
++ .num_leds = ARRAY_SIZE(dockstar_led_pins),
++};
++
++static struct platform_device dockstar_leds = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &dockstar_led_data,
++ }
++};
++
++static unsigned int dockstar_mpp_config[] __initdata = {
++ MPP29_GPIO, /* USB Power Enable */
++ MPP46_GPIO, /* LED green */
++ MPP47_GPIO, /* LED orange */
++ 0
++};
++
++static void __init dockstar_init(void)
++{
++ /*
++ * Basic setup. Needs to be called early.
++ */
++ kirkwood_init();
++
++ /* setup gpio pin select */
++ kirkwood_mpp_conf(dockstar_mpp_config);
++
++ kirkwood_uart0_init();
++ kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25);
++
++ if (gpio_request(29, "USB Power Enable") != 0 ||
++ gpio_direction_output(29, 1) != 0)
++ printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
++ kirkwood_ehci_init();
++
++ kirkwood_ge00_init(&dockstar_ge00_data);
++
++ platform_device_register(&dockstar_leds);
++}
++
++MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
++ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
++ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
++ .boot_params = 0x00000100,
++ .init_machine = dockstar_init,
++ .map_io = kirkwood_map_io,
++ .init_irq = kirkwood_init_irq,
++ .timer = &kirkwood_timer,
++MACHINE_END
Added: dists/sid/linux-2.6/debian/patches/features/arm/kirkwood-unbreak-pcie-io-port.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/arm/kirkwood-unbreak-pcie-io-port.patch Mon Sep 6 12:02:38 2010 (r16245)
@@ -0,0 +1,55 @@
+From: Arnaud Patard <arnaud.patard at rtp-net.org>
+Date: Sun, 22 Aug 2010 20:49:46 +0000 (+0200)
+Subject: [ARM] kirkwood: Unbreak PCIe I/O port
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnico%2Forion.git;a=commitdiff_plain;h=1ce7185cfb1e8551ef35f978d8c723bf403a612b
+
+[ARM] kirkwood: Unbreak PCIe I/O port
+
+The support for the 2 pcie port of the 6282 has broken i/o port by switching
+*_IO_PHYS_BASE and *_IO_BUS_BASE. In fact, the patches reintroduced the same
+bug solved by commit 35f029e2514be209eb0e88c7d927f3bcc42a5cc2.
+So, I'm adding back *_IO_BUS_BASE in resource declaration and fix definition
+of KIRKWOOD_PCIE1_IO_BUS_BASE. With this change, the xgi card on my t5325 is
+working again.
+
+Signed-off-by: Arnaud Patard <arnaud.patard at rtp-net.org>
+Acked-by: Saeed Bishara <saeed at marvell.com>
+Signed-off-by: Nicolas Pitre <nico at fluxnic.net>
+Cc: stable at kernel.org
+---
+
+diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+index 93fc2ec..6e924b3 100644
+--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
++++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+@@ -38,7 +38,7 @@
+
+ #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
+ #define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
+-#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00000000
++#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000
+ #define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
+
+ #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
+diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
+index 55e7f00..513ad31 100644
+--- a/arch/arm/mach-kirkwood/pcie.c
++++ b/arch/arm/mach-kirkwood/pcie.c
+@@ -116,7 +116,7 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp)
+ * IORESOURCE_IO
+ */
+ pp->res[0].name = "PCIe 0 I/O Space";
+- pp->res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE;
++ pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
+ pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
+ pp->res[0].flags = IORESOURCE_IO;
+
+@@ -138,7 +138,7 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp)
+ * IORESOURCE_IO
+ */
+ pp->res[0].name = "PCIe 1 I/O Space";
+- pp->res[0].start = KIRKWOOD_PCIE1_IO_PHYS_BASE;
++ pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
+ pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
+ pp->res[0].flags = IORESOURCE_IO;
+
Added: dists/sid/linux-2.6/debian/patches/features/arm/openrd-uart-selection.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/arm/openrd-uart-selection.patch Mon Sep 6 12:02:38 2010 (r16245)
@@ -0,0 +1,153 @@
+From: Tanmay Upadhyay <tanmay.upadhyay at einfochips.com>
+Date: Thu, 26 Aug 2010 05:41:58 +0000 (+0530)
+Subject: [ARM] OpenRD: Enable SD/UART selection for serial port 1
+X-Git-Url:
+http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnico%2Forion.git;a=commitdiff_plain;h=f2ac38dcbc95c19ce97207f1e02d0623c7052610
+
+[ARM] OpenRD: Enable SD/UART selection for serial port 1
+
+This patch enables users to choose either the SDIO interface or UART1
+(RS232/RS485). The selection can be done through kernel parameter.
+
+By default the port would be used for SDIO interface. Passing the string
+"kw_openrd_init_uart1=232" or "kw_openrd_init_uart1=485" enables either
+the RS-232 or RS-485 port respectively; disabling the SDIO interface.
+Anything else selects the default SDIO interface.
+
+"kw_openrd_init_uart1=485" is ignored on OpenRD-Base as it doesn't
+have RS485 port.
+
+Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay at einfochips.com>
+Acked-by: Alexander Clouter <alex at digriz.org.uk>
+Signed-off-by: Nicolas Pitre <nico at fluxnic.net>
+---
+--- a/arch/arm/mach-kirkwood/openrd-setup.c 2010-09-06 11:53:21.000000000 +0000
++++ b/arch/arm/mach-kirkwood/openrd-setup.c 2010-09-06 11:58:11.000000000 +0000
+@@ -15,6 +15,7 @@
+ #include <linux/mtd/partitions.h>
+ #include <linux/ata_platform.h>
+ #include <linux/mv643xx_eth.h>
++#include <linux/gpio.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <mach/kirkwood.h>
+@@ -56,10 +57,87 @@
+ };
+
+ static unsigned int openrd_mpp_config[] __initdata = {
++ MPP12_SD_CLK,
++ MPP13_SD_CMD,
++ MPP14_SD_D0,
++ MPP15_SD_D1,
++ MPP16_SD_D2,
++ MPP17_SD_D3,
++ MPP28_GPIO,
+ MPP29_GPIO,
++ MPP34_GPIO,
+ 0
+ };
+
++/* Configure MPP for UART1 */
++static unsigned int openrd_uart1_mpp_config[] __initdata = {
++ MPP13_UART1_TXD,
++ MPP14_UART1_RXD,
++ 0
++};
++
++static int __initdata uart1;
++
++static int __init sd_uart_selection(char *str)
++{
++ uart1 = -EINVAL;
++
++ /* Default is SD. Change if required, for UART */
++ if (!str)
++ return 0;
++
++ if (!strncmp(str, "232", 3)) {
++ uart1 = 232;
++ } else if (!strncmp(str, "485", 3)) {
++ /* OpenRD-Base doesn't have RS485. Treat is as an
++ * unknown argument & just have default setting -
++ * which is SD */
++ if (machine_is_openrd_base()) {
++ uart1 = -ENODEV;
++ return 1;
++ }
++
++ uart1 = 485;
++ }
++ return 1;
++}
++/* Parse boot_command_line string kw_openrd_init_uart1=232/485 */
++__setup("kw_openrd_init_uart1=", sd_uart_selection);
++
++static int __init uart1_mpp_config(void)
++{
++ kirkwood_mpp_conf(openrd_uart1_mpp_config);
++
++ if (gpio_request(34, "SD_UART1_SEL")) {
++ printk(KERN_ERR "GPIO request failed for SD/UART1 selection"
++ ", gpio: 34\n");
++ return -EIO;
++ }
++
++ if (gpio_request(28, "RS232_RS485_SEL")) {
++ printk(KERN_ERR "GPIO request failed for RS232/RS485 selection"
++ ", gpio# 28\n");
++ gpio_free(34);
++ return -EIO;
++ }
++
++ /* Select UART1
++ * Pin # 34: 0 => UART1, 1 => SD */
++ gpio_direction_output(34, 0);
++
++ /* Select RS232 OR RS485
++ * Pin # 28: 0 => RS232, 1 => RS485 */
++ if (uart1 == 232)
++ gpio_direction_output(28, 0);
++ else
++ gpio_direction_output(28, 1);
++
++ gpio_free(34);
++ gpio_free(28);
++
++ return 0;
++}
++
+ static void __init openrd_init(void)
+ {
+ /*
+@@ -83,9 +161,30 @@
+ kirkwood_ge01_init(&openrd_ge01_data);
+
+ kirkwood_sata_init(&openrd_sata_data);
+- kirkwood_sdio_init(&openrd_mvsdio_data);
+
+ kirkwood_i2c_init();
++
++ if (uart1 <= 0) {
++ if (uart1 < 0)
++ printk(KERN_ERR "Invalid kernel parameter to select "
++ "UART1. Defaulting to SD. ERROR CODE: %d\n",
++ uart1);
++
++ /* Select SD
++ * Pin # 34: 0 => UART1, 1 => SD */
++ if (gpio_request(34, "SD_UART1_SEL")) {
++ printk(KERN_ERR "GPIO request failed for SD/UART1 "
++ "selection, gpio: 34\n");
++ } else {
++
++ gpio_direction_output(34, 1);
++ gpio_free(34);
++ kirkwood_sdio_init(&openrd_mvsdio_data);
++ }
++ } else {
++ if (!uart1_mpp_config())
++ kirkwood_uart1_init();
++ }
+ }
+
+ static int __init openrd_pci_init(void)
Modified: dists/sid/linux-2.6/debian/patches/series/22
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/22 Mon Sep 6 08:41:21 2010 (r16244)
+++ dists/sid/linux-2.6/debian/patches/series/22 Mon Sep 6 12:02:38 2010 (r16245)
@@ -96,3 +96,6 @@
+ features/all/hda-via/0018-ALSA-HDA-VIA-Add-VT1812-support.patch
+ features/all/hda-via/0019-ALSA-VIA-HDA-Add-support-for-VT1818S.patch
+ features/all/hwmon-w83627ehf-Add-support-for-W83667HG-B.patch
++ features/arm/openrd-uart-selection.patch
++ features/arm/kirkwood-unbreak-pcie-io-port.patch
++ features/arm/dockstar-support.patch
More information about the Kernel-svn-changes
mailing list