1 This patch adds support for the Seagate FreeAgent DockStar, a Marvell
2 Sheevaplug derivative. I have already registered the DOCKSTAR machine
5 Signed-off-by: Eric Cooper <ecc@xxxxxxx>
7 arch/arm/mach-kirkwood/Kconfig | 6 ++
8 arch/arm/mach-kirkwood/Makefile | 1 +
9 arch/arm/mach-kirkwood/dockstar-setup.c | 112 +++++++++++++++++++++++++++++++
10 arch/arm/tools/mach-types | 1 +
11 4 files changed, 120 insertions(+), 0 deletions(-)
12 create mode 100644 arch/arm/mach-kirkwood/dockstar-setup.c
14 --- a/arch/arm/mach-kirkwood/Kconfig
15 +++ b/arch/arm/mach-kirkwood/Kconfig
16 @@ -99,6 +99,12 @@ config MACH_NET5BIG_V2
17 Say 'Y' here if you want your kernel to support the
18 LaCie 5Big Network v2 NAS.
21 + bool "Seagate FreeAgent DockStar"
23 + Say 'Y' here if you want your kernel to support the
24 + Seagate FreeAgent DockStar.
29 --- a/arch/arm/mach-kirkwood/Makefile
30 +++ b/arch/arm/mach-kirkwood/Makefile
31 @@ -5,6 +5,7 @@ obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88
32 obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
33 obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
34 obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
35 +obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
36 obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
37 obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
38 obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
40 +++ b/arch/arm/mach-kirkwood/dockstar-setup.c
43 + * arch/arm/mach-kirkwood/dockstar-setup.c
45 + * Seagate FreeAgent DockStar Setup
47 + * This file is licensed under the terms of the GNU General Public
48 + * License version 2. This program is licensed "as is" without any
49 + * warranty of any kind, whether express or implied.
52 +#include <linux/kernel.h>
53 +#include <linux/init.h>
54 +#include <linux/platform_device.h>
55 +#include <linux/ata_platform.h>
56 +#include <linux/mtd/partitions.h>
57 +#include <linux/mv643xx_eth.h>
58 +#include <linux/gpio.h>
59 +#include <linux/leds.h>
60 +#include <asm/mach-types.h>
61 +#include <asm/mach/arch.h>
62 +#include <mach/kirkwood.h>
63 +#include <plat/mvsdio.h>
67 +static struct mtd_partition dockstar_nand_parts[] = {
73 + .name = "second_stage_u-boot",
74 + .offset = MTDPART_OFS_NXTBLK,
78 + .offset = MTDPART_OFS_NXTBLK,
79 + .size = SZ_1M + SZ_2M,
82 + .offset = MTDPART_OFS_NXTBLK,
86 + .offset = MTDPART_OFS_NXTBLK,
87 + .size = MTDPART_SIZ_FULL
91 +static struct mv643xx_eth_platform_data dockstar_ge00_data = {
92 + .phy_addr = MV643XX_ETH_PHY_ADDR(0),
95 +static struct gpio_led dockstar_led_pins[] = {
97 + .name = "dockstar:green:health",
98 + .default_trigger = "default-on",
103 + .name = "dockstar:orange:misc",
104 + .default_trigger = "none",
110 +static struct gpio_led_platform_data dockstar_led_data = {
111 + .leds = dockstar_led_pins,
112 + .num_leds = ARRAY_SIZE(dockstar_led_pins),
115 +static struct platform_device dockstar_leds = {
116 + .name = "leds-gpio",
119 + .platform_data = &dockstar_led_data,
123 +static unsigned int dockstar_mpp_config[] __initdata = {
124 + MPP29_GPIO, /* USB Power Enable */
125 + MPP46_GPIO, /* LED green */
126 + MPP47_GPIO, /* LED orange */
130 +static void __init dockstar_init(void)
133 + * Basic setup. Needs to be called early.
137 + /* setup gpio pin select */
138 + kirkwood_mpp_conf(dockstar_mpp_config);
140 + kirkwood_uart0_init();
142 + if (gpio_request(29, "USB Power Enable") != 0 ||
143 + gpio_direction_output(29, 1) != 0)
144 + printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
145 + kirkwood_ehci_init();
147 + kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25);
149 + kirkwood_ge00_init(&dockstar_ge00_data);
151 + platform_device_register(&dockstar_leds);
154 +MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
155 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
156 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
157 + .boot_params = 0x00000100,
158 + .init_machine = dockstar_init,
159 + .map_io = kirkwood_map_io,
160 + .init_irq = kirkwood_init_irq,
161 + .timer = &kirkwood_timer,