Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187436
b: refs/heads/master
c: d5b5746
h: refs/heads/master
v: v3
  • Loading branch information
John Holland authored and Nicolas Pitre committed Feb 23, 2010
1 parent de2d980 commit 31e4dc2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7b222d708e6eff0cf47928f439c8bcf49f10bb6
refs/heads/master: d5b5746bed1023e4a55f96405422d3e51968fa43
26 changes: 24 additions & 2 deletions trunk/arch/arm/mach-kirkwood/sheevaplug-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
/* unfortunately the CD signal has not been connected */
};

static struct mvsdio_platform_data sheeva_esata_mvsdio_data = {
.gpio_write_protect = 44, /* MPP44 used as SD write protect */
.gpio_card_detect = 47, /* MPP47 used as SD card detect */
};

static struct gpio_led sheevaplug_led_pins[] = {
{
.name = "plug:green:health",
Expand Down Expand Up @@ -79,13 +84,26 @@ static unsigned int sheevaplug_mpp_config[] __initdata = {
0
};

static unsigned int sheeva_esata_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
MPP44_GPIO, /* SD Write Protect */
MPP47_GPIO, /* SD Card Detect */
MPP49_GPIO, /* LED Green */
0
};

static void __init sheevaplug_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_init();
kirkwood_mpp_conf(sheevaplug_mpp_config);

/* setup gpio pin select */
if (machine_is_sheeva_esata())
kirkwood_mpp_conf(sheeva_esata_mpp_config);
else
kirkwood_mpp_conf(sheevaplug_mpp_config);

kirkwood_uart0_init();
kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25);
Expand All @@ -101,7 +119,11 @@ static void __init sheevaplug_init(void)
if (machine_is_sheeva_esata())
kirkwood_sata_init(&sheeva_esata_sata_data);

kirkwood_sdio_init(&sheevaplug_mvsdio_data);
/* enable sd wp and sd cd on plugs with esata */
if (machine_is_sheeva_esata())
kirkwood_sdio_init(&sheeva_esata_mvsdio_data);
else
kirkwood_sdio_init(&sheevaplug_mvsdio_data);

platform_device_register(&sheevaplug_leds);
}
Expand Down

0 comments on commit 31e4dc2

Please sign in to comment.