diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 15:41:34 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 15:41:34 -0500 |
commit | 2a2d10f386c1bacabe1a530c06dc8488eac419e5 (patch) | |
tree | 4606a4a3bafa42a8aa70e001d35883956a0f0589 /arch/arm/mach-kirkwood | |
parent | 2f68ffd11aa76b251921976c982b814df9ebe890 (diff) | |
parent | c499546f43f2c31b681271ef7db922839fcde5fe (diff) |
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel-stable
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 50 |
3 files changed, 55 insertions, 2 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index edc9aeb6e6b2..17879a876be6 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -32,6 +32,12 @@ config MACH_SHEEVAPLUG | |||
32 | Say 'Y' here if you want your kernel to support the | 32 | Say 'Y' here if you want your kernel to support the |
33 | Marvell SheevaPlug Reference Board. | 33 | Marvell SheevaPlug Reference Board. |
34 | 34 | ||
35 | config MACH_ESATA_SHEEVAPLUG | ||
36 | bool "Marvell eSATA SheevaPlug Reference Board" | ||
37 | help | ||
38 | Say 'Y' here if you want your kernel to support the | ||
39 | Marvell eSATA SheevaPlug Reference Board. | ||
40 | |||
35 | config MACH_TS219 | 41 | config MACH_TS219 |
36 | bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" | 42 | bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" |
37 | help | 43 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 55b4ccf3729b..a5530e36ba3e 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -5,6 +5,7 @@ obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o | |||
5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | 5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o |
6 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | 6 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o |
7 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | 7 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o |
8 | obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o | ||
8 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o | 9 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o |
9 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o | 10 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o |
10 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o | 11 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index c7319eeac8bb..a00879d34d54 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/ata_platform.h> | ||
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
15 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
@@ -42,10 +43,19 @@ static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | |||
42 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 43 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
43 | }; | 44 | }; |
44 | 45 | ||
46 | static struct mv_sata_platform_data sheeva_esata_sata_data = { | ||
47 | .n_ports = 2, | ||
48 | }; | ||
49 | |||
45 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | 50 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { |
46 | /* unfortunately the CD signal has not been connected */ | 51 | /* unfortunately the CD signal has not been connected */ |
47 | }; | 52 | }; |
48 | 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 | |||
49 | static struct gpio_led sheevaplug_led_pins[] = { | 59 | static struct gpio_led sheevaplug_led_pins[] = { |
50 | { | 60 | { |
51 | .name = "plug:green:health", | 61 | .name = "plug:green:health", |
@@ -74,13 +84,26 @@ static unsigned int sheevaplug_mpp_config[] __initdata = { | |||
74 | 0 | 84 | 0 |
75 | }; | 85 | }; |
76 | 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 | |||
77 | static void __init sheevaplug_init(void) | 95 | static void __init sheevaplug_init(void) |
78 | { | 96 | { |
79 | /* | 97 | /* |
80 | * Basic setup. Needs to be called early. | 98 | * Basic setup. Needs to be called early. |
81 | */ | 99 | */ |
82 | kirkwood_init(); | 100 | kirkwood_init(); |
83 | 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); | ||
84 | 107 | ||
85 | kirkwood_uart0_init(); | 108 | kirkwood_uart0_init(); |
86 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | 109 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); |
@@ -91,11 +114,21 @@ static void __init sheevaplug_init(void) | |||
91 | kirkwood_ehci_init(); | 114 | kirkwood_ehci_init(); |
92 | 115 | ||
93 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 116 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
94 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 117 | |
118 | /* honor lower power consumption for plugs with out eSATA */ | ||
119 | if (machine_is_sheeva_esata()) | ||
120 | kirkwood_sata_init(&sheeva_esata_sata_data); | ||
121 | |||
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); | ||
95 | 127 | ||
96 | platform_device_register(&sheevaplug_leds); | 128 | platform_device_register(&sheevaplug_leds); |
97 | } | 129 | } |
98 | 130 | ||
131 | #ifdef CONFIG_MACH_SHEEVAPLUG | ||
99 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | 132 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") |
100 | /* Maintainer: shadi Ammouri <shadi@marvell.com> */ | 133 | /* Maintainer: shadi Ammouri <shadi@marvell.com> */ |
101 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | 134 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, |
@@ -106,3 +139,16 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | |||
106 | .init_irq = kirkwood_init_irq, | 139 | .init_irq = kirkwood_init_irq, |
107 | .timer = &kirkwood_timer, | 140 | .timer = &kirkwood_timer, |
108 | MACHINE_END | 141 | MACHINE_END |
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_MACH_ESATA_SHEEVAPLUG | ||
145 | MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") | ||
146 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | ||
147 | .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc, | ||
148 | .boot_params = 0x00000100, | ||
149 | .init_machine = sheevaplug_init, | ||
150 | .map_io = kirkwood_map_io, | ||
151 | .init_irq = kirkwood_init_irq, | ||
152 | .timer = &kirkwood_timer, | ||
153 | MACHINE_END | ||
154 | #endif | ||