diff options
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index bb9bc70381ef..a00879d34d54 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -51,6 +51,11 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | |||
51 | /* unfortunately the CD signal has not been connected */ | 51 | /* unfortunately the CD signal has not been connected */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { | ||
55 | .gpio_write_protect = 44, /* MPP44 used as SD write protect */ | ||
56 | .gpio_card_detect = 47, /* MPP47 used as SD card detect */ | ||
57 | }; | ||
58 | |||
54 | static struct gpio_led sheevaplug_led_pins[] = { | 59 | static struct gpio_led sheevaplug_led_pins[] = { |
55 | { | 60 | { |
56 | .name = "plug:green:health", | 61 | .name = "plug:green:health", |
@@ -79,13 +84,26 @@ static unsigned int sheevaplug_mpp_config[] __initdata = { | |||
79 | 0 | 84 | 0 |
80 | }; | 85 | }; |
81 | 86 | ||
87 | static unsigned int sheeva_esata_mpp_config[] __initdata = { | ||
88 | MPP29_GPIO, /* USB Power Enable */ | ||
89 | MPP44_GPIO, /* SD Write Protect */ | ||
90 | MPP47_GPIO, /* SD Card Detect */ | ||
91 | MPP49_GPIO, /* LED Green */ | ||
92 | 0 | ||
93 | }; | ||
94 | |||
82 | static void __init sheevaplug_init(void) | 95 | static void __init sheevaplug_init(void) |
83 | { | 96 | { |
84 | /* | 97 | /* |
85 | * Basic setup. Needs to be called early. | 98 | * Basic setup. Needs to be called early. |
86 | */ | 99 | */ |
87 | kirkwood_init(); | 100 | kirkwood_init(); |
88 | kirkwood_mpp_conf(sheevaplug_mpp_config); | 101 | |
102 | /* setup gpio pin select */ | ||
103 | if (machine_is_sheeva_esata()) | ||
104 | kirkwood_mpp_conf(sheeva_esata_mpp_config); | ||
105 | else | ||
106 | kirkwood_mpp_conf(sheevaplug_mpp_config); | ||
89 | 107 | ||
90 | kirkwood_uart0_init(); | 108 | kirkwood_uart0_init(); |
91 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | 109 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); |
@@ -101,7 +119,11 @@ static void __init sheevaplug_init(void) | |||
101 | if (machine_is_sheeva_esata()) | 119 | if (machine_is_sheeva_esata()) |
102 | kirkwood_sata_init(&sheeva_esata_sata_data); | 120 | kirkwood_sata_init(&sheeva_esata_sata_data); |
103 | 121 | ||
104 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 122 | /* enable sd wp and sd cd on plugs with esata */ |
123 | if (machine_is_sheeva_esata()) | ||
124 | kirkwood_sdio_init(&sheeva_esata_mvsdio_data); | ||
125 | else | ||
126 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | ||
105 | 127 | ||
106 | platform_device_register(&sheevaplug_leds); | 128 | platform_device_register(&sheevaplug_leds); |
107 | } | 129 | } |