2 * arch/arm/mach-kirkwood/dockstar-setup.c
4 * Seagate FreeAgent DockStar Setup
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/ata_platform.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mv643xx_eth.h>
17 #include <linux/gpio.h>
18 #include <linux/leds.h>
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
21 #include <mach/kirkwood.h>
25 static struct mtd_partition dockstar_nand_parts
[] = {
32 .offset
= MTDPART_OFS_NXTBLK
,
36 .offset
= MTDPART_OFS_NXTBLK
,
37 .size
= MTDPART_SIZ_FULL
41 static struct mv643xx_eth_platform_data dockstar_ge00_data
= {
42 .phy_addr
= MV643XX_ETH_PHY_ADDR(0),
45 static struct gpio_led dockstar_led_pins
[] = {
47 .name
= "dockstar:green:health",
48 .default_trigger
= "default-on",
53 .name
= "dockstar:orange:misc",
54 .default_trigger
= "none",
60 static struct gpio_led_platform_data dockstar_led_data
= {
61 .leds
= dockstar_led_pins
,
62 .num_leds
= ARRAY_SIZE(dockstar_led_pins
),
65 static struct platform_device dockstar_leds
= {
69 .platform_data
= &dockstar_led_data
,
73 static unsigned int dockstar_mpp_config
[] __initdata
= {
74 MPP29_GPIO
, /* USB Power Enable */
75 MPP46_GPIO
, /* LED green */
76 MPP47_GPIO
, /* LED orange */
80 static void __init
dockstar_init(void)
83 * Basic setup. Needs to be called early.
87 /* setup gpio pin select */
88 kirkwood_mpp_conf(dockstar_mpp_config
);
90 kirkwood_uart0_init();
91 kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts
), 25);
93 if (gpio_request(29, "USB Power Enable") != 0 ||
94 gpio_direction_output(29, 1) != 0)
95 pr_err("can't set up GPIO 29 (USB Power Enable)\n");
98 kirkwood_ge00_init(&dockstar_ge00_data
);
100 platform_device_register(&dockstar_leds
);
103 MACHINE_START(DOCKSTAR
, "Seagate FreeAgent DockStar")
104 .atag_offset
= 0x100,
105 .init_machine
= dockstar_init
,
106 .map_io
= kirkwood_map_io
,
107 .init_early
= kirkwood_init_early
,
108 .init_irq
= kirkwood_init_irq
,
109 .init_time
= kirkwood_timer_init
,
110 .restart
= kirkwood_restart
,