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>
64 +#include <plat/orion_nand.h>
68 +static struct mtd_partition dockstar_nand_parts[] = {
74 + .name = "second_stage_u-boot",
75 + .offset = MTDPART_OFS_NXTBLK,
79 + .offset = MTDPART_OFS_NXTBLK,
80 + .size = SZ_1M + SZ_2M,
83 + .offset = MTDPART_OFS_NXTBLK,
87 + .offset = MTDPART_OFS_NXTBLK,
88 + .size = MTDPART_SIZ_FULL
92 +static struct resource dockstar_nand_resource = {
93 + .flags = IORESOURCE_MEM,
94 + .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
95 + .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
96 + KIRKWOOD_NAND_MEM_SIZE - 1,
99 +static struct orion_nand_data dockstar_nand_data = {
100 + .parts = dockstar_nand_parts,
101 + .nr_parts = ARRAY_SIZE(dockstar_nand_parts),
108 +static struct platform_device dockstar_nand_flash = {
109 + .name = "orion_nand",
112 + .platform_data = &dockstar_nand_data,
114 + .resource = &dockstar_nand_resource,
115 + .num_resources = 1,
119 +static struct mv643xx_eth_platform_data dockstar_ge00_data = {
120 + .phy_addr = MV643XX_ETH_PHY_ADDR(0),
123 +static struct gpio_led dockstar_led_pins[] = {
125 + .name = "dockstar:green:health",
126 + .default_trigger = "default-on",
131 + .name = "dockstar:orange:misc",
132 + .default_trigger = "none",
138 +static struct gpio_led_platform_data dockstar_led_data = {
139 + .leds = dockstar_led_pins,
140 + .num_leds = ARRAY_SIZE(dockstar_led_pins),
143 +static struct platform_device dockstar_leds = {
144 + .name = "leds-gpio",
147 + .platform_data = &dockstar_led_data,
151 +static unsigned int dockstar_mpp_config[] __initdata = {
152 + MPP29_GPIO, /* USB Power Enable */
153 + MPP46_GPIO, /* LED green */
154 + MPP47_GPIO, /* LED orange */
158 +static void __init dockstar_init(void)
161 + * Basic setup. Needs to be called early.
165 + /* setup gpio pin select */
166 + kirkwood_mpp_conf(dockstar_mpp_config);
168 + kirkwood_uart0_init();
170 + if (gpio_request(29, "USB Power Enable") != 0 ||
171 + gpio_direction_output(29, 1) != 0)
172 + printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
173 + kirkwood_ehci_init();
175 + kirkwood_ge00_init(&dockstar_ge00_data);
177 + platform_device_register(&dockstar_nand_flash);
178 + platform_device_register(&dockstar_leds);
181 +MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
182 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
183 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
184 + .boot_params = 0x00000100,
185 + .init_machine = dockstar_init,
186 + .map_io = kirkwood_map_io,
187 + .init_irq = kirkwood_init_irq,
188 + .timer = &kirkwood_timer,