diff options
Diffstat (limited to 'arch/arm/mach-kirkwood')
32 files changed, 573 insertions, 429 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 50bca5032b7e..503d7dd944ff 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -46,6 +46,11 @@ config MACH_GURUPLUG | |||
46 | 46 | ||
47 | config ARCH_KIRKWOOD_DT | 47 | config ARCH_KIRKWOOD_DT |
48 | bool "Marvell Kirkwood Flattened Device Tree" | 48 | bool "Marvell Kirkwood Flattened Device Tree" |
49 | select POWER_SUPPLY | ||
50 | select POWER_RESET | ||
51 | select POWER_RESET_GPIO | ||
52 | select REGULATOR | ||
53 | select REGULATOR_FIXED_VOLTAGE | ||
49 | select USE_OF | 54 | select USE_OF |
50 | help | 55 | help |
51 | Say 'Y' here if you want your kernel to support the | 56 | Say 'Y' here if you want your kernel to support the |
@@ -130,6 +135,63 @@ config MACH_KM_KIRKWOOD_DT | |||
130 | Say 'Y' here if you want your kernel to support the | 135 | Say 'Y' here if you want your kernel to support the |
131 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. | 136 | Keymile Kirkwood Reference Desgin, using Flattened Device Tree. |
132 | 137 | ||
138 | config MACH_INETSPACE_V2_DT | ||
139 | bool "LaCie Internet Space v2 NAS (Flattened Device Tree)" | ||
140 | select ARCH_KIRKWOOD_DT | ||
141 | help | ||
142 | Say 'Y' here if you want your kernel to support the LaCie | ||
143 | Internet Space v2 NAS, using Flattened Device Tree. | ||
144 | |||
145 | config MACH_MPLCEC4_DT | ||
146 | bool "MPL CEC4 (Flattened Device Tree)" | ||
147 | select ARCH_KIRKWOOD_DT | ||
148 | help | ||
149 | Say 'Y' here if you want your kernel to support the | ||
150 | MPL CEC4 (Flattened Device Tree). | ||
151 | |||
152 | config MACH_NETSPACE_V2_DT | ||
153 | bool "LaCie Network Space v2 NAS (Flattened Device Tree)" | ||
154 | select ARCH_KIRKWOOD_DT | ||
155 | help | ||
156 | Say 'Y' here if you want your kernel to support the LaCie | ||
157 | Network Space v2 NAS, using Flattened Device Tree. | ||
158 | |||
159 | config MACH_NETSPACE_MAX_V2_DT | ||
160 | bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)" | ||
161 | select ARCH_KIRKWOOD_DT | ||
162 | help | ||
163 | Say 'Y' here if you want your kernel to support the LaCie | ||
164 | Network Space Max v2 NAS, using Flattened Device Tree. | ||
165 | |||
166 | config MACH_NETSPACE_LITE_V2_DT | ||
167 | bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)" | ||
168 | select ARCH_KIRKWOOD_DT | ||
169 | help | ||
170 | Say 'Y' here if you want your kernel to support the LaCie | ||
171 | Network Space Lite v2 NAS, using Flattened Device Tree. | ||
172 | |||
173 | config MACH_NETSPACE_MINI_V2_DT | ||
174 | bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)" | ||
175 | select ARCH_KIRKWOOD_DT | ||
176 | help | ||
177 | Say 'Y' here if you want your kernel to support the LaCie | ||
178 | Network Space Mini v2 NAS (aka SafeBox), using Flattened | ||
179 | Device Tree. | ||
180 | |||
181 | config MACH_OPENBLOCKS_A6_DT | ||
182 | bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)" | ||
183 | select ARCH_KIRKWOOD_DT | ||
184 | help | ||
185 | Say 'Y' here if you want your kernel to support the | ||
186 | Plat'Home OpenBlocks A6 (Flattened Device Tree). | ||
187 | |||
188 | config MACH_TOPKICK_DT | ||
189 | bool "USI Topkick (Flattened Device Tree)" | ||
190 | select ARCH_KIRKWOOD_DT | ||
191 | help | ||
192 | Say 'Y' here if you want your kernel to support the | ||
193 | USI Topkick, using Flattened Device Tree | ||
194 | |||
133 | config MACH_TS219 | 195 | config MACH_TS219 |
134 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 196 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
135 | help | 197 | help |
@@ -216,6 +278,14 @@ config MACH_T5325 | |||
216 | Say 'Y' here if you want your kernel to support the | 278 | Say 'Y' here if you want your kernel to support the |
217 | HP t5325 Thin Client. | 279 | HP t5325 Thin Client. |
218 | 280 | ||
281 | config MACH_NSA310_DT | ||
282 | bool "ZyXEL NSA-310 (Flattened Device Tree)" | ||
283 | select ARCH_KIRKWOOD_DT | ||
284 | select ARM_ATAG_DTB_COMPAT | ||
285 | help | ||
286 | Say 'Y' here if you want your kernel to support the | ||
287 | ZyXEL NSA-310 board (Flattened Device Tree). | ||
288 | |||
219 | endmenu | 289 | endmenu |
220 | 290 | ||
221 | endif | 291 | endif |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 294779f892d9..8d2e5a96247c 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -31,3 +31,12 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o | |||
31 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o | 31 | obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o |
32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o | 32 | obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o |
33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o | 33 | obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o |
34 | obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o | ||
35 | obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o | ||
36 | obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o | ||
37 | obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o | ||
38 | obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o | ||
39 | obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o | ||
40 | obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o | ||
41 | obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o | ||
42 | obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o | ||
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 43d16d6714b8..a1aa87f09180 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c | |||
@@ -17,51 +17,11 @@ | |||
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include "mpp.h" | ||
21 | 20 | ||
22 | static struct mv643xx_eth_platform_data dnskw_ge00_data = { | 21 | static struct mv643xx_eth_platform_data dnskw_ge00_data = { |
23 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
24 | }; | 23 | }; |
25 | 24 | ||
26 | static unsigned int dnskw_mpp_config[] __initdata = { | ||
27 | MPP13_UART1_TXD, /* Custom ... */ | ||
28 | MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */ | ||
29 | MPP20_SATA1_ACTn, /* LED: White Right HDD */ | ||
30 | MPP21_SATA0_ACTn, /* LED: White Left HDD */ | ||
31 | MPP24_GPIO, | ||
32 | MPP25_GPIO, | ||
33 | MPP26_GPIO, /* LED: Power */ | ||
34 | MPP27_GPIO, /* LED: Red Right HDD */ | ||
35 | MPP28_GPIO, /* LED: Red Left HDD */ | ||
36 | MPP29_GPIO, /* LED: Red USB (DNS-325 only) */ | ||
37 | MPP30_GPIO, | ||
38 | MPP31_GPIO, | ||
39 | MPP32_GPIO, | ||
40 | MPP33_GPO, | ||
41 | MPP34_GPIO, /* Button: Front power */ | ||
42 | MPP35_GPIO, /* LED: Red USB (DNS-320 only) */ | ||
43 | MPP36_GPIO, /* Power: Turn off board */ | ||
44 | MPP37_GPIO, /* Power: Turn back on after power failure */ | ||
45 | MPP38_GPIO, | ||
46 | MPP39_GPIO, /* Power: SATA0 */ | ||
47 | MPP40_GPIO, /* Power: SATA1 */ | ||
48 | MPP41_GPIO, /* SATA0 present */ | ||
49 | MPP42_GPIO, /* SATA1 present */ | ||
50 | MPP43_GPIO, /* LED: White USB */ | ||
51 | MPP44_GPIO, /* Fan: Tachometer Pin */ | ||
52 | MPP45_GPIO, /* Fan: high speed */ | ||
53 | MPP46_GPIO, /* Fan: low speed */ | ||
54 | MPP47_GPIO, /* Button: Back unmount */ | ||
55 | MPP48_GPIO, /* Button: Back reset */ | ||
56 | MPP49_GPIO, /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */ | ||
57 | 0 | ||
58 | }; | ||
59 | |||
60 | static void dnskw_power_off(void) | ||
61 | { | ||
62 | gpio_set_value(36, 1); | ||
63 | } | ||
64 | |||
65 | /* Register any GPIO for output and set the value */ | 25 | /* Register any GPIO for output and set the value */ |
66 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | 26 | static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) |
67 | { | 27 | { |
@@ -76,22 +36,8 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) | |||
76 | 36 | ||
77 | void __init dnskw_init(void) | 37 | void __init dnskw_init(void) |
78 | { | 38 | { |
79 | kirkwood_mpp_conf(dnskw_mpp_config); | ||
80 | |||
81 | kirkwood_ehci_init(); | ||
82 | kirkwood_ge00_init(&dnskw_ge00_data); | 39 | kirkwood_ge00_init(&dnskw_ge00_data); |
83 | 40 | ||
84 | /* Register power-off GPIO. */ | ||
85 | if (gpio_request(36, "dnskw:power:off") == 0 | ||
86 | && gpio_direction_output(36, 0) == 0) | ||
87 | pm_power_off = dnskw_power_off; | ||
88 | else | ||
89 | pr_err("dnskw: failed to configure power-off GPIO\n"); | ||
90 | |||
91 | /* Ensure power is supplied to both HDDs */ | ||
92 | dnskw_gpio_register(39, "dnskw:power:sata0", 1); | ||
93 | dnskw_gpio_register(40, "dnskw:power:sata1", 1); | ||
94 | |||
95 | /* Set NAS to turn back on after a power failure */ | 41 | /* Set NAS to turn back on after a power failure */ |
96 | dnskw_gpio_register(37, "dnskw:power:recover", 1); | 42 | dnskw_gpio_register(37, "dnskw:power:recover", 1); |
97 | } | 43 | } |
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c index f2fbb023e679..d7196db33984 100644 --- a/arch/arm/mach-kirkwood/board-dockstar.c +++ b/arch/arm/mach-kirkwood/board-dockstar.c | |||
@@ -16,46 +16,17 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/ata_platform.h> | ||
21 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
22 | #include <linux/of.h> | ||
23 | #include <linux/of_address.h> | ||
24 | #include <linux/of_fdt.h> | ||
25 | #include <linux/of_irq.h> | ||
26 | #include <linux/of_platform.h> | ||
27 | #include <linux/gpio.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <mach/kirkwood.h> | ||
32 | #include <mach/bridge-regs.h> | ||
33 | #include <linux/platform_data/mmc-mvsdio.h> | ||
34 | #include "common.h" | 20 | #include "common.h" |
35 | #include "mpp.h" | ||
36 | 21 | ||
37 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { | 22 | static struct mv643xx_eth_platform_data dockstar_ge00_data = { |
38 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
39 | }; | 24 | }; |
40 | 25 | ||
41 | static unsigned int dockstar_mpp_config[] __initdata = { | ||
42 | MPP29_GPIO, /* USB Power Enable */ | ||
43 | MPP46_GPIO, /* LED green */ | ||
44 | MPP47_GPIO, /* LED orange */ | ||
45 | 0 | ||
46 | }; | ||
47 | |||
48 | void __init dockstar_dt_init(void) | 26 | void __init dockstar_dt_init(void) |
49 | { | 27 | { |
50 | /* | 28 | /* |
51 | * Basic setup. Needs to be called early. | 29 | * Basic setup. Needs to be called early. |
52 | */ | 30 | */ |
53 | kirkwood_mpp_conf(dockstar_mpp_config); | ||
54 | |||
55 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
56 | gpio_direction_output(29, 1) != 0) | ||
57 | pr_err("can't setup GPIO 29 (USB Power Enable)\n"); | ||
58 | kirkwood_ehci_init(); | ||
59 | |||
60 | kirkwood_ge00_init(&dockstar_ge00_data); | 31 | kirkwood_ge00_init(&dockstar_ge00_data); |
61 | } | 32 | } |
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c index 20af53a56c0e..08248e24ffcd 100644 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ b/arch/arm/mach-kirkwood/board-dreamplug.c | |||
@@ -13,26 +13,10 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/ata_platform.h> | ||
18 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
19 | #include <linux/of.h> | ||
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_fdt.h> | ||
22 | #include <linux/of_irq.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
25 | #include <linux/mtd/physmap.h> | ||
26 | #include <linux/spi/flash.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <mach/kirkwood.h> | ||
32 | #include <mach/bridge-regs.h> | ||
33 | #include <linux/platform_data/mmc-mvsdio.h> | 18 | #include <linux/platform_data/mmc-mvsdio.h> |
34 | #include "common.h" | 19 | #include "common.h" |
35 | #include "mpp.h" | ||
36 | 20 | ||
37 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | 21 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { |
38 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
@@ -46,25 +30,11 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = { | |||
46 | /* unfortunately the CD signal has not been connected */ | 30 | /* unfortunately the CD signal has not been connected */ |
47 | }; | 31 | }; |
48 | 32 | ||
49 | static unsigned int dreamplug_mpp_config[] __initdata = { | ||
50 | MPP0_SPI_SCn, | ||
51 | MPP1_SPI_MOSI, | ||
52 | MPP2_SPI_SCK, | ||
53 | MPP3_SPI_MISO, | ||
54 | MPP47_GPIO, /* Bluetooth LED */ | ||
55 | MPP48_GPIO, /* Wifi LED */ | ||
56 | MPP49_GPIO, /* Wifi AP LED */ | ||
57 | 0 | ||
58 | }; | ||
59 | |||
60 | void __init dreamplug_init(void) | 33 | void __init dreamplug_init(void) |
61 | { | 34 | { |
62 | /* | 35 | /* |
63 | * Basic setup. Needs to be called early. | 36 | * Basic setup. Needs to be called early. |
64 | */ | 37 | */ |
65 | kirkwood_mpp_conf(dreamplug_mpp_config); | ||
66 | |||
67 | kirkwood_ehci_init(); | ||
68 | kirkwood_ge00_init(&dreamplug_ge00_data); | 38 | kirkwood_ge00_init(&dreamplug_ge00_data); |
69 | kirkwood_ge01_init(&dreamplug_ge01_data); | 39 | kirkwood_ge01_init(&dreamplug_ge01_data); |
70 | kirkwood_sdio_init(&dreamplug_mvsdio_data); | 40 | kirkwood_sdio_init(&dreamplug_mvsdio_data); |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index d94872fed8c0..375f7d88551c 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -26,10 +26,12 @@ static struct of_device_id kirkwood_dt_match_table[] __initdata = { | |||
26 | { } | 26 | { } |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { | 29 | static struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = { |
30 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | 30 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), |
31 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | 31 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", |
32 | NULL), | 32 | NULL), |
33 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011100, "mv64xxx_i2c.1", | ||
34 | NULL), | ||
33 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | 35 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), |
34 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), | 36 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL), |
35 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), | 37 | OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL), |
@@ -94,11 +96,30 @@ static void __init kirkwood_dt_init(void) | |||
94 | if (of_machine_is_compatible("keymile,km_kirkwood")) | 96 | if (of_machine_is_compatible("keymile,km_kirkwood")) |
95 | km_kirkwood_init(); | 97 | km_kirkwood_init(); |
96 | 98 | ||
99 | if (of_machine_is_compatible("lacie,inetspace_v2") || | ||
100 | of_machine_is_compatible("lacie,netspace_v2") || | ||
101 | of_machine_is_compatible("lacie,netspace_max_v2") || | ||
102 | of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
103 | of_machine_is_compatible("lacie,netspace_mini_v2")) | ||
104 | ns2_init(); | ||
105 | |||
106 | if (of_machine_is_compatible("mpl,cec4")) | ||
107 | mplcec4_init(); | ||
108 | |||
109 | if (of_machine_is_compatible("plathome,openblocks-a6")) | ||
110 | openblocks_a6_init(); | ||
111 | |||
112 | if (of_machine_is_compatible("usi,topkick")) | ||
113 | usi_topkick_init(); | ||
114 | |||
115 | if (of_machine_is_compatible("zyxel,nsa310")) | ||
116 | nsa310_init(); | ||
117 | |||
97 | of_platform_populate(NULL, kirkwood_dt_match_table, | 118 | of_platform_populate(NULL, kirkwood_dt_match_table, |
98 | kirkwood_auxdata_lookup, NULL); | 119 | kirkwood_auxdata_lookup, NULL); |
99 | } | 120 | } |
100 | 121 | ||
101 | static const char *kirkwood_dt_board_compat[] = { | 122 | static const char * const kirkwood_dt_board_compat[] = { |
102 | "globalscale,dreamplug", | 123 | "globalscale,dreamplug", |
103 | "dlink,dns-320", | 124 | "dlink,dns-320", |
104 | "dlink,dns-325", | 125 | "dlink,dns-325", |
@@ -110,6 +131,15 @@ static const char *kirkwood_dt_board_compat[] = { | |||
110 | "buffalo,lsxl", | 131 | "buffalo,lsxl", |
111 | "iom,ix2-200", | 132 | "iom,ix2-200", |
112 | "keymile,km_kirkwood", | 133 | "keymile,km_kirkwood", |
134 | "lacie,inetspace_v2", | ||
135 | "lacie,netspace_max_v2", | ||
136 | "lacie,netspace_v2", | ||
137 | "lacie,netspace_lite_v2", | ||
138 | "lacie,netspace_mini_v2", | ||
139 | "mpl,cec4", | ||
140 | "plathome,openblocks-a6", | ||
141 | "usi,topkick", | ||
142 | "zyxel,nsa310", | ||
113 | NULL | 143 | NULL |
114 | }; | 144 | }; |
115 | 145 | ||
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c index 001ca8c96980..9db979aec82e 100644 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ b/arch/arm/mach-kirkwood/board-goflexnet.c | |||
@@ -18,54 +18,17 @@ | |||
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/ata_platform.h> | ||
23 | #include <linux/mv643xx_eth.h> | 21 | #include <linux/mv643xx_eth.h> |
24 | #include <linux/of.h> | ||
25 | #include <linux/of_address.h> | ||
26 | #include <linux/of_fdt.h> | ||
27 | #include <linux/of_irq.h> | ||
28 | #include <linux/of_platform.h> | ||
29 | #include <linux/gpio.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <asm/mach/map.h> | ||
33 | #include <mach/kirkwood.h> | ||
34 | #include <mach/bridge-regs.h> | ||
35 | #include <linux/platform_data/mmc-mvsdio.h> | ||
36 | #include "common.h" | 22 | #include "common.h" |
37 | #include "mpp.h" | ||
38 | 23 | ||
39 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { | 24 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { |
40 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 25 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
41 | }; | 26 | }; |
42 | 27 | ||
43 | static unsigned int goflexnet_mpp_config[] __initdata = { | ||
44 | MPP29_GPIO, /* USB Power Enable */ | ||
45 | MPP47_GPIO, /* LED Orange */ | ||
46 | MPP46_GPIO, /* LED Green */ | ||
47 | MPP45_GPIO, /* LED Left Capacity 3 */ | ||
48 | MPP44_GPIO, /* LED Left Capacity 2 */ | ||
49 | MPP43_GPIO, /* LED Left Capacity 1 */ | ||
50 | MPP42_GPIO, /* LED Left Capacity 0 */ | ||
51 | MPP41_GPIO, /* LED Right Capacity 3 */ | ||
52 | MPP40_GPIO, /* LED Right Capacity 2 */ | ||
53 | MPP39_GPIO, /* LED Right Capacity 1 */ | ||
54 | MPP38_GPIO, /* LED Right Capacity 0 */ | ||
55 | 0 | ||
56 | }; | ||
57 | |||
58 | void __init goflexnet_init(void) | 28 | void __init goflexnet_init(void) |
59 | { | 29 | { |
60 | /* | 30 | /* |
61 | * Basic setup. Needs to be called early. | 31 | * Basic setup. Needs to be called early. |
62 | */ | 32 | */ |
63 | kirkwood_mpp_conf(goflexnet_mpp_config); | ||
64 | |||
65 | if (gpio_request(29, "USB Power Enable") != 0 || | ||
66 | gpio_direction_output(29, 1) != 0) | ||
67 | pr_err("can't setup GPIO 29 (USB Power Enable)\n"); | ||
68 | kirkwood_ehci_init(); | ||
69 | |||
70 | kirkwood_ge00_init(&goflexnet_ge00_data); | 33 | kirkwood_ge00_init(&goflexnet_ge00_data); |
71 | } | 34 | } |
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index cfc47f80e734..9f6f496380d8 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c | |||
@@ -13,59 +13,18 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mtd/partitions.h> | ||
18 | #include <linux/ata_platform.h> | ||
19 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
20 | #include <linux/gpio.h> | ||
21 | #include <linux/input.h> | 17 | #include <linux/input.h> |
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | #include <mach/kirkwood.h> | ||
25 | #include "common.h" | 18 | #include "common.h" |
26 | #include "mpp.h" | ||
27 | |||
28 | #define IB62X0_GPIO_POWER_OFF 24 | ||
29 | 19 | ||
30 | static struct mv643xx_eth_platform_data ib62x0_ge00_data = { | 20 | static struct mv643xx_eth_platform_data ib62x0_ge00_data = { |
31 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 21 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
32 | }; | 22 | }; |
33 | 23 | ||
34 | static unsigned int ib62x0_mpp_config[] __initdata = { | ||
35 | MPP0_NF_IO2, | ||
36 | MPP1_NF_IO3, | ||
37 | MPP2_NF_IO4, | ||
38 | MPP3_NF_IO5, | ||
39 | MPP4_NF_IO6, | ||
40 | MPP5_NF_IO7, | ||
41 | MPP18_NF_IO0, | ||
42 | MPP19_NF_IO1, | ||
43 | MPP22_GPIO, /* OS LED red */ | ||
44 | MPP24_GPIO, /* Power off device */ | ||
45 | MPP25_GPIO, /* OS LED green */ | ||
46 | MPP27_GPIO, /* USB transfer LED */ | ||
47 | MPP28_GPIO, /* Reset button */ | ||
48 | MPP29_GPIO, /* USB Copy button */ | ||
49 | 0 | ||
50 | }; | ||
51 | |||
52 | static void ib62x0_power_off(void) | ||
53 | { | ||
54 | gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); | ||
55 | } | ||
56 | |||
57 | void __init ib62x0_init(void) | 24 | void __init ib62x0_init(void) |
58 | { | 25 | { |
59 | /* | 26 | /* |
60 | * Basic setup. Needs to be called early. | 27 | * Basic setup. Needs to be called early. |
61 | */ | 28 | */ |
62 | kirkwood_mpp_conf(ib62x0_mpp_config); | ||
63 | |||
64 | kirkwood_ehci_init(); | ||
65 | kirkwood_ge00_init(&ib62x0_ge00_data); | 29 | kirkwood_ge00_init(&ib62x0_ge00_data); |
66 | if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 && | ||
67 | gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0) | ||
68 | pm_power_off = ib62x0_power_off; | ||
69 | else | ||
70 | pr_err("board-ib62x0: failed to configure power-off GPIO\n"); | ||
71 | } | 30 | } |
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c index d084b1e2943a..c8ebde4919e2 100644 --- a/arch/arm/mach-kirkwood/board-iconnect.c +++ b/arch/arm/mach-kirkwood/board-iconnect.c | |||
@@ -10,42 +10,16 @@ | |||
10 | 10 | ||
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> | ||
14 | #include <linux/of.h> | 13 | #include <linux/of.h> |
15 | #include <linux/of_address.h> | ||
16 | #include <linux/of_fdt.h> | ||
17 | #include <linux/of_irq.h> | ||
18 | #include <linux/of_platform.h> | ||
19 | #include <linux/mv643xx_eth.h> | 14 | #include <linux/mv643xx_eth.h> |
20 | #include <linux/gpio.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <mach/kirkwood.h> | ||
23 | #include "common.h" | 15 | #include "common.h" |
24 | #include "mpp.h" | ||
25 | 16 | ||
26 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { | 17 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { |
27 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | 18 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), |
28 | }; | 19 | }; |
29 | 20 | ||
30 | static unsigned int iconnect_mpp_config[] __initdata = { | ||
31 | MPP12_GPIO, | ||
32 | MPP35_GPIO, | ||
33 | MPP41_GPIO, | ||
34 | MPP42_GPIO, | ||
35 | MPP43_GPIO, | ||
36 | MPP44_GPIO, | ||
37 | MPP45_GPIO, | ||
38 | MPP46_GPIO, | ||
39 | MPP47_GPIO, | ||
40 | MPP48_GPIO, | ||
41 | 0 | ||
42 | }; | ||
43 | |||
44 | void __init iconnect_init(void) | 21 | void __init iconnect_init(void) |
45 | { | 22 | { |
46 | kirkwood_mpp_conf(iconnect_mpp_config); | ||
47 | |||
48 | kirkwood_ehci_init(); | ||
49 | kirkwood_ge00_init(&iconnect_ge00_data); | 23 | kirkwood_ge00_init(&iconnect_ge00_data); |
50 | } | 24 | } |
51 | 25 | ||
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c index 158fb97d0397..f655b2637b0e 100644 --- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c +++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c | |||
@@ -10,12 +10,9 @@ | |||
10 | 10 | ||
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> | ||
14 | #include <linux/mv643xx_eth.h> | 13 | #include <linux/mv643xx_eth.h> |
15 | #include <linux/ethtool.h> | 14 | #include <linux/ethtool.h> |
16 | #include <mach/kirkwood.h> | ||
17 | #include "common.h" | 15 | #include "common.h" |
18 | #include "mpp.h" | ||
19 | 16 | ||
20 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | 17 | static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { |
21 | .phy_addr = MV643XX_ETH_PHY_NONE, | 18 | .phy_addr = MV643XX_ETH_PHY_NONE, |
@@ -23,35 +20,10 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { | |||
23 | .duplex = DUPLEX_FULL, | 20 | .duplex = DUPLEX_FULL, |
24 | }; | 21 | }; |
25 | 22 | ||
26 | static unsigned int iomega_ix2_200_mpp_config[] __initdata = { | ||
27 | MPP12_GPIO, /* Reset Button */ | ||
28 | MPP14_GPIO, /* Power Button */ | ||
29 | MPP15_GPIO, /* Backup LED (blue) */ | ||
30 | MPP16_GPIO, /* Power LED (white) */ | ||
31 | MPP35_GPIO, /* OTB Button */ | ||
32 | MPP36_GPIO, /* Rebuild LED (white) */ | ||
33 | MPP37_GPIO, /* Health LED (red) */ | ||
34 | MPP38_GPIO, /* SATA LED brightness control 1 */ | ||
35 | MPP39_GPIO, /* SATA LED brightness control 2 */ | ||
36 | MPP40_GPIO, /* Backup LED brightness control 1 */ | ||
37 | MPP41_GPIO, /* Backup LED brightness control 2 */ | ||
38 | MPP42_GPIO, /* Power LED brightness control 1 */ | ||
39 | MPP43_GPIO, /* Power LED brightness control 2 */ | ||
40 | MPP44_GPIO, /* Health LED brightness control 1 */ | ||
41 | MPP45_GPIO, /* Health LED brightness control 2 */ | ||
42 | MPP46_GPIO, /* Rebuild LED brightness control 1 */ | ||
43 | MPP47_GPIO, /* Rebuild LED brightness control 2 */ | ||
44 | 0 | ||
45 | }; | ||
46 | |||
47 | void __init iomega_ix2_200_init(void) | 23 | void __init iomega_ix2_200_init(void) |
48 | { | 24 | { |
49 | /* | 25 | /* |
50 | * Basic setup. Needs to be called early. | 26 | * Basic setup. Needs to be called early. |
51 | */ | 27 | */ |
52 | kirkwood_mpp_conf(iomega_ix2_200_mpp_config); | ||
53 | |||
54 | kirkwood_ehci_init(); | ||
55 | |||
56 | kirkwood_ge01_init(&iomega_ix2_200_ge00_data); | 28 | kirkwood_ge01_init(&iomega_ix2_200_ge00_data); |
57 | } | 29 | } |
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c index f7d32834b757..44e4605ba0bf 100644 --- a/arch/arm/mach-kirkwood/board-km_kirkwood.c +++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c | |||
@@ -18,27 +18,15 @@ | |||
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/clk-private.h> | 19 | #include <linux/clk-private.h> |
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "mpp.h" | ||
22 | 21 | ||
23 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { | 22 | static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { |
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 23 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
25 | }; | 24 | }; |
26 | 25 | ||
27 | static unsigned int km_kirkwood_mpp_config[] __initdata = { | ||
28 | MPP8_GPIO, /* I2C SDA */ | ||
29 | MPP9_GPIO, /* I2C SCL */ | ||
30 | 0 | ||
31 | }; | ||
32 | |||
33 | void __init km_kirkwood_init(void) | 26 | void __init km_kirkwood_init(void) |
34 | { | 27 | { |
35 | struct clk *sata_clk; | 28 | struct clk *sata_clk; |
36 | /* | 29 | /* |
37 | * Basic setup. Needs to be called early. | ||
38 | */ | ||
39 | kirkwood_mpp_conf(km_kirkwood_mpp_config); | ||
40 | |||
41 | /* | ||
42 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing | 30 | * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing |
43 | * SATA bits (14-15) of the Clock Gating Control Register. Since these | 31 | * SATA bits (14-15) of the Clock Gating Control Register. Since these |
44 | * devices are also not present in this variant, their clocks get | 32 | * devices are also not present in this variant, their clocks get |
@@ -52,6 +40,5 @@ void __init km_kirkwood_init(void) | |||
52 | if (!IS_ERR(sata_clk)) | 40 | if (!IS_ERR(sata_clk)) |
53 | sata_clk->flags |= CLK_IGNORE_UNUSED; | 41 | sata_clk->flags |= CLK_IGNORE_UNUSED; |
54 | 42 | ||
55 | kirkwood_ehci_init(); | ||
56 | kirkwood_ge00_init(&km_kirkwood_ge00_data); | 43 | kirkwood_ge00_init(&km_kirkwood_ge00_data); |
57 | } | 44 | } |
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c index 83d8975592f8..4ec8b7ae784a 100644 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ b/arch/arm/mach-kirkwood/board-lsxl.c | |||
@@ -14,19 +14,8 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mtd/partitions.h> | ||
18 | #include <linux/ata_platform.h> | ||
19 | #include <linux/spi/flash.h> | ||
20 | #include <linux/spi/spi.h> | ||
21 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
22 | #include <linux/gpio.h> | ||
23 | #include <linux/gpio-fan.h> | ||
24 | #include <linux/input.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | #include <mach/kirkwood.h> | ||
28 | #include "common.h" | 18 | #include "common.h" |
29 | #include "mpp.h" | ||
30 | 19 | ||
31 | static struct mv643xx_eth_platform_data lsxl_ge00_data = { | 20 | static struct mv643xx_eth_platform_data lsxl_ge00_data = { |
32 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 21 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
@@ -36,68 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = { | |||
36 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 25 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
37 | }; | 26 | }; |
38 | 27 | ||
39 | static unsigned int lsxl_mpp_config[] __initdata = { | ||
40 | MPP10_GPO, /* HDD Power Enable */ | ||
41 | MPP11_GPIO, /* USB Vbus Enable */ | ||
42 | MPP18_GPO, /* FAN High Enable# */ | ||
43 | MPP19_GPO, /* FAN Low Enable# */ | ||
44 | MPP36_GPIO, /* Function Blue LED */ | ||
45 | MPP37_GPIO, /* Alarm LED */ | ||
46 | MPP38_GPIO, /* Info LED */ | ||
47 | MPP39_GPIO, /* Power LED */ | ||
48 | MPP40_GPIO, /* Fan Lock */ | ||
49 | MPP41_GPIO, /* Function Button */ | ||
50 | MPP42_GPIO, /* Power Switch */ | ||
51 | MPP43_GPIO, /* Power Auto Switch */ | ||
52 | MPP48_GPIO, /* Function Red LED */ | ||
53 | 0 | ||
54 | }; | ||
55 | |||
56 | #define LSXL_GPIO_FAN_HIGH 18 | ||
57 | #define LSXL_GPIO_FAN_LOW 19 | ||
58 | #define LSXL_GPIO_FAN_LOCK 40 | ||
59 | |||
60 | static struct gpio_fan_alarm lsxl_alarm = { | ||
61 | .gpio = LSXL_GPIO_FAN_LOCK, | ||
62 | }; | ||
63 | |||
64 | static struct gpio_fan_speed lsxl_speeds[] = { | ||
65 | { | ||
66 | .rpm = 0, | ||
67 | .ctrl_val = 3, | ||
68 | }, { | ||
69 | .rpm = 1500, | ||
70 | .ctrl_val = 1, | ||
71 | }, { | ||
72 | .rpm = 3250, | ||
73 | .ctrl_val = 2, | ||
74 | }, { | ||
75 | .rpm = 5000, | ||
76 | .ctrl_val = 0, | ||
77 | } | ||
78 | }; | ||
79 | |||
80 | static int lsxl_gpio_list[] = { | ||
81 | LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW, | ||
82 | }; | ||
83 | |||
84 | static struct gpio_fan_platform_data lsxl_fan_data = { | ||
85 | .num_ctrl = ARRAY_SIZE(lsxl_gpio_list), | ||
86 | .ctrl = lsxl_gpio_list, | ||
87 | .alarm = &lsxl_alarm, | ||
88 | .num_speed = ARRAY_SIZE(lsxl_speeds), | ||
89 | .speed = lsxl_speeds, | ||
90 | }; | ||
91 | |||
92 | static struct platform_device lsxl_fan_device = { | ||
93 | .name = "gpio-fan", | ||
94 | .id = -1, | ||
95 | .num_resources = 0, | ||
96 | .dev = { | ||
97 | .platform_data = &lsxl_fan_data, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | /* | 28 | /* |
102 | * On the LS-XHL/LS-CHLv2, the shutdown process is following: | 29 | * On the LS-XHL/LS-CHLv2, the shutdown process is following: |
103 | * - Userland monitors key events until the power switch goes to off position | 30 | * - Userland monitors key events until the power switch goes to off position |
@@ -111,24 +38,14 @@ static void lsxl_power_off(void) | |||
111 | kirkwood_restart('h', NULL); | 38 | kirkwood_restart('h', NULL); |
112 | } | 39 | } |
113 | 40 | ||
114 | #define LSXL_GPIO_HDD_POWER 10 | ||
115 | #define LSXL_GPIO_USB_POWER 11 | ||
116 | |||
117 | void __init lsxl_init(void) | 41 | void __init lsxl_init(void) |
118 | { | 42 | { |
119 | /* | 43 | /* |
120 | * Basic setup. Needs to be called early. | 44 | * Basic setup. Needs to be called early. |
121 | */ | 45 | */ |
122 | kirkwood_mpp_conf(lsxl_mpp_config); | ||
123 | |||
124 | /* usb and sata power on */ | ||
125 | gpio_set_value(LSXL_GPIO_USB_POWER, 1); | ||
126 | gpio_set_value(LSXL_GPIO_HDD_POWER, 1); | ||
127 | 46 | ||
128 | kirkwood_ehci_init(); | ||
129 | kirkwood_ge00_init(&lsxl_ge00_data); | 47 | kirkwood_ge00_init(&lsxl_ge00_data); |
130 | kirkwood_ge01_init(&lsxl_ge01_data); | 48 | kirkwood_ge01_init(&lsxl_ge01_data); |
131 | platform_device_register(&lsxl_fan_device); | ||
132 | 49 | ||
133 | /* register power-off method */ | 50 | /* register power-off method */ |
134 | pm_power_off = lsxl_power_off; | 51 | pm_power_off = lsxl_power_off; |
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c new file mode 100644 index 000000000000..56bfe5a1605a --- /dev/null +++ b/arch/arm/mach-kirkwood/board-mplcec4.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 MPL AG, Switzerland | ||
3 | * Stefan Peter <s.peter@mpl.ch> | ||
4 | * | ||
5 | * arch/arm/mach-kirkwood/board-mplcec4.c | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/mv643xx_eth.h> | ||
15 | #include <linux/platform_data/mmc-mvsdio.h> | ||
16 | #include "common.h" | ||
17 | #include "mpp.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data mplcec4_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
21 | }; | ||
22 | |||
23 | static struct mv643xx_eth_platform_data mplcec4_ge01_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(2), | ||
25 | }; | ||
26 | |||
27 | static struct mvsdio_platform_data mplcec4_mvsdio_data = { | ||
28 | .gpio_card_detect = 47, /* MPP47 used as SD card detect */ | ||
29 | }; | ||
30 | |||
31 | |||
32 | void __init mplcec4_init(void) | ||
33 | { | ||
34 | /* | ||
35 | * Basic setup. Needs to be called early. | ||
36 | */ | ||
37 | kirkwood_ge00_init(&mplcec4_ge00_data); | ||
38 | kirkwood_ge01_init(&mplcec4_ge01_data); | ||
39 | kirkwood_sdio_init(&mplcec4_mvsdio_data); | ||
40 | kirkwood_pcie_init(KW_PCIE0); | ||
41 | } | ||
42 | |||
43 | |||
44 | |||
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c new file mode 100644 index 000000000000..8821720ab5a4 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-ns2.c | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-ns2.c | ||
5 | * | ||
6 | * LaCie Network Space v2 board (and parents) initialization for drivers | ||
7 | * not converted to flattened device tree yet. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/of.h> | ||
20 | #include "common.h" | ||
21 | #include "mpp.h" | ||
22 | |||
23 | static struct mv643xx_eth_platform_data ns2_ge00_data = { | ||
24 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
25 | }; | ||
26 | |||
27 | static unsigned int ns2_mpp_config[] __initdata = { | ||
28 | MPP0_SPI_SCn, | ||
29 | MPP1_SPI_MOSI, | ||
30 | MPP2_SPI_SCK, | ||
31 | MPP3_SPI_MISO, | ||
32 | MPP4_NF_IO6, | ||
33 | MPP5_NF_IO7, | ||
34 | MPP6_SYSRST_OUTn, | ||
35 | MPP7_GPO, /* Fan speed (bit 1) */ | ||
36 | MPP8_TW0_SDA, | ||
37 | MPP9_TW0_SCK, | ||
38 | MPP10_UART0_TXD, | ||
39 | MPP11_UART0_RXD, | ||
40 | MPP12_GPO, /* Red led */ | ||
41 | MPP14_GPIO, /* USB fuse */ | ||
42 | MPP16_GPIO, /* SATA 0 power */ | ||
43 | MPP17_GPIO, /* SATA 1 power */ | ||
44 | MPP18_NF_IO0, | ||
45 | MPP19_NF_IO1, | ||
46 | MPP20_SATA1_ACTn, | ||
47 | MPP21_SATA0_ACTn, | ||
48 | MPP22_GPIO, /* Fan speed (bit 0) */ | ||
49 | MPP23_GPIO, /* Fan power */ | ||
50 | MPP24_GPIO, /* USB mode select */ | ||
51 | MPP25_GPIO, /* Fan rotation fail */ | ||
52 | MPP26_GPIO, /* USB device vbus */ | ||
53 | MPP28_GPIO, /* USB enable host vbus */ | ||
54 | MPP29_GPIO, /* Blue led (slow register) */ | ||
55 | MPP30_GPIO, /* Blue led (command register) */ | ||
56 | MPP31_GPIO, /* Board power off */ | ||
57 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
58 | MPP33_GPO, /* Fan speed (bit 2) */ | ||
59 | 0 | ||
60 | }; | ||
61 | |||
62 | #define NS2_GPIO_POWER_OFF 31 | ||
63 | |||
64 | static void ns2_power_off(void) | ||
65 | { | ||
66 | gpio_set_value(NS2_GPIO_POWER_OFF, 1); | ||
67 | } | ||
68 | |||
69 | void __init ns2_init(void) | ||
70 | { | ||
71 | /* | ||
72 | * Basic setup. Needs to be called early. | ||
73 | */ | ||
74 | kirkwood_mpp_conf(ns2_mpp_config); | ||
75 | |||
76 | if (of_machine_is_compatible("lacie,netspace_lite_v2") || | ||
77 | of_machine_is_compatible("lacie,netspace_mini_v2")) | ||
78 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | ||
79 | kirkwood_ge00_init(&ns2_ge00_data); | ||
80 | |||
81 | if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && | ||
82 | gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) | ||
83 | pm_power_off = ns2_power_off; | ||
84 | else | ||
85 | pr_err("ns2: failed to configure power-off GPIO\n"); | ||
86 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c new file mode 100644 index 000000000000..f58d2e1a4042 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-nsa310.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/nsa-310-setup.c | ||
3 | * | ||
4 | * ZyXEL NSA-310 Setup | ||
5 | * | ||
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. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/gpio.h> | ||
15 | |||
16 | #include <asm/mach-types.h> | ||
17 | #include <asm/mach/arch.h> | ||
18 | #include <mach/kirkwood.h> | ||
19 | #include "common.h" | ||
20 | #include "mpp.h" | ||
21 | |||
22 | #define NSA310_GPIO_USB_POWER_OFF 21 | ||
23 | #define NSA310_GPIO_POWER_OFF 48 | ||
24 | |||
25 | static unsigned int nsa310_mpp_config[] __initdata = { | ||
26 | MPP12_GPIO, /* led esata green */ | ||
27 | MPP13_GPIO, /* led esata red */ | ||
28 | MPP15_GPIO, /* led usb green */ | ||
29 | MPP16_GPIO, /* led usb red */ | ||
30 | MPP21_GPIO, /* control usb power off */ | ||
31 | MPP28_GPIO, /* led sys green */ | ||
32 | MPP29_GPIO, /* led sys red */ | ||
33 | MPP36_GPIO, /* key reset */ | ||
34 | MPP37_GPIO, /* key copy */ | ||
35 | MPP39_GPIO, /* led copy green */ | ||
36 | MPP40_GPIO, /* led copy red */ | ||
37 | MPP41_GPIO, /* led hdd green */ | ||
38 | MPP42_GPIO, /* led hdd red */ | ||
39 | MPP44_GPIO, /* ?? */ | ||
40 | MPP46_GPIO, /* key power */ | ||
41 | MPP48_GPIO, /* control power off */ | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | static struct i2c_board_info __initdata nsa310_i2c_info[] = { | ||
46 | { I2C_BOARD_INFO("adt7476", 0x2e) }, | ||
47 | }; | ||
48 | |||
49 | static void nsa310_power_off(void) | ||
50 | { | ||
51 | gpio_set_value(NSA310_GPIO_POWER_OFF, 1); | ||
52 | } | ||
53 | |||
54 | static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags, | ||
55 | const char *label) | ||
56 | { | ||
57 | int err; | ||
58 | |||
59 | err = gpio_request_one(gpio, flags, label); | ||
60 | if (err) | ||
61 | pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n", | ||
62 | gpio, label, err); | ||
63 | |||
64 | return err; | ||
65 | } | ||
66 | |||
67 | static void __init nsa310_gpio_init(void) | ||
68 | { | ||
69 | int err; | ||
70 | |||
71 | err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW, | ||
72 | "Power Off"); | ||
73 | if (!err) | ||
74 | pm_power_off = nsa310_power_off; | ||
75 | |||
76 | nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW, | ||
77 | "USB Power Off"); | ||
78 | } | ||
79 | |||
80 | void __init nsa310_init(void) | ||
81 | { | ||
82 | u32 dev, rev; | ||
83 | |||
84 | kirkwood_mpp_conf(nsa310_mpp_config); | ||
85 | |||
86 | nsa310_gpio_init(); | ||
87 | |||
88 | kirkwood_pcie_id(&dev, &rev); | ||
89 | |||
90 | i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); | ||
91 | } | ||
92 | |||
93 | static int __init nsa310_pci_init(void) | ||
94 | { | ||
95 | if (of_machine_is_compatible("zyxel,nsa310")) | ||
96 | kirkwood_pcie_init(KW_PCIE0); | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | subsys_initcall(nsa310_pci_init); | ||
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c new file mode 100644 index 000000000000..815fc6451d52 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-openblocks_a6.c | ||
5 | * | ||
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. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/mv643xx_eth.h> | ||
14 | #include <linux/clk.h> | ||
15 | #include <linux/clk-private.h> | ||
16 | #include "common.h" | ||
17 | #include "mpp.h" | ||
18 | |||
19 | static struct mv643xx_eth_platform_data openblocks_ge00_data = { | ||
20 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
21 | }; | ||
22 | |||
23 | static unsigned int openblocks_a6_mpp_config[] __initdata = { | ||
24 | MPP0_NF_IO2, | ||
25 | MPP1_NF_IO3, | ||
26 | MPP2_NF_IO4, | ||
27 | MPP3_NF_IO5, | ||
28 | MPP4_NF_IO6, | ||
29 | MPP5_NF_IO7, | ||
30 | MPP6_SYSRST_OUTn, | ||
31 | MPP8_UART1_RTS, | ||
32 | MPP9_UART1_CTS, | ||
33 | MPP10_UART0_TXD, | ||
34 | MPP11_UART0_RXD, | ||
35 | MPP13_UART1_TXD, | ||
36 | MPP14_UART1_RXD, | ||
37 | MPP15_UART0_RTS, | ||
38 | MPP16_UART0_CTS, | ||
39 | MPP18_NF_IO0, | ||
40 | MPP19_NF_IO1, | ||
41 | MPP20_GPIO, /* DIP SW0 */ | ||
42 | MPP21_GPIO, /* DIP SW1 */ | ||
43 | MPP22_GPIO, /* DIP SW2 */ | ||
44 | MPP23_GPIO, /* DIP SW3 */ | ||
45 | MPP24_GPIO, /* GPIO 0 */ | ||
46 | MPP25_GPIO, /* GPIO 1 */ | ||
47 | MPP26_GPIO, /* GPIO 2 */ | ||
48 | MPP27_GPIO, /* GPIO 3 */ | ||
49 | MPP28_GPIO, /* GPIO 4 */ | ||
50 | MPP29_GPIO, /* GPIO 5 */ | ||
51 | MPP30_GPIO, /* GPIO 6 */ | ||
52 | MPP31_GPIO, /* GPIO 7 */ | ||
53 | MPP36_TW1_SDA, | ||
54 | MPP37_TW1_SCK, | ||
55 | MPP38_GPIO, /* INIT */ | ||
56 | MPP39_GPIO, /* USB OC */ | ||
57 | MPP41_GPIO, /* LED: Red */ | ||
58 | MPP42_GPIO, /* LED: Green */ | ||
59 | MPP43_GPIO, /* LED: Yellow */ | ||
60 | 0, | ||
61 | }; | ||
62 | |||
63 | void __init openblocks_a6_init(void) | ||
64 | { | ||
65 | /* | ||
66 | * Basic setup. Needs to be called early. | ||
67 | */ | ||
68 | kirkwood_mpp_conf(openblocks_a6_mpp_config); | ||
69 | kirkwood_ge00_init(&openblocks_ge00_data); | ||
70 | } | ||
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c index 1750e68506c1..acb0187c7ee1 100644 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ b/arch/arm/mach-kirkwood/board-ts219.c | |||
@@ -19,54 +19,25 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mv643xx_eth.h> | 21 | #include <linux/mv643xx_eth.h> |
22 | #include <linux/ata_platform.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/input.h> | ||
25 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
27 | #include <mach/kirkwood.h> | 24 | #include <mach/kirkwood.h> |
28 | #include "common.h" | 25 | #include "common.h" |
29 | #include "mpp.h" | ||
30 | #include "tsx1x-common.h" | 26 | #include "tsx1x-common.h" |
31 | 27 | ||
32 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { | 28 | static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { |
33 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | 29 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
34 | }; | 30 | }; |
35 | 31 | ||
36 | static unsigned int qnap_ts219_mpp_config[] __initdata = { | ||
37 | MPP0_SPI_SCn, | ||
38 | MPP1_SPI_MOSI, | ||
39 | MPP2_SPI_SCK, | ||
40 | MPP3_SPI_MISO, | ||
41 | MPP4_SATA1_ACTn, | ||
42 | MPP5_SATA0_ACTn, | ||
43 | MPP8_TW0_SDA, | ||
44 | MPP9_TW0_SCK, | ||
45 | MPP10_UART0_TXD, | ||
46 | MPP11_UART0_RXD, | ||
47 | MPP13_UART1_TXD, /* PIC controller */ | ||
48 | MPP14_UART1_RXD, /* PIC controller */ | ||
49 | MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */ | ||
50 | MPP16_GPIO, /* Reset button (on devices with 88F6281) */ | ||
51 | MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */ | ||
52 | MPP37_GPIO, /* Reset button (on devices with 88F6282) */ | ||
53 | MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */ | ||
54 | MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */ | ||
55 | 0 | ||
56 | }; | ||
57 | |||
58 | void __init qnap_dt_ts219_init(void) | 32 | void __init qnap_dt_ts219_init(void) |
59 | { | 33 | { |
60 | u32 dev, rev; | 34 | u32 dev, rev; |
61 | 35 | ||
62 | kirkwood_mpp_conf(qnap_ts219_mpp_config); | ||
63 | |||
64 | kirkwood_pcie_id(&dev, &rev); | 36 | kirkwood_pcie_id(&dev, &rev); |
65 | if (dev == MV88F6282_DEV_ID) | 37 | if (dev == MV88F6282_DEV_ID) |
66 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); | 38 | qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
67 | 39 | ||
68 | kirkwood_ge00_init(&qnap_ts219_ge00_data); | 40 | kirkwood_ge00_init(&qnap_ts219_ge00_data); |
69 | kirkwood_ehci_init(); | ||
70 | 41 | ||
71 | pm_power_off = qnap_tsx1x_power_off; | 42 | pm_power_off = qnap_tsx1x_power_off; |
72 | } | 43 | } |
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c new file mode 100644 index 000000000000..15e69fcde9f4 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-usi_topkick.c | ||
5 | * | ||
6 | * USI Topkick Init for drivers not converted to flattened device tree yet. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mv643xx_eth.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/platform_data/mmc-mvsdio.h> | ||
18 | #include "common.h" | ||
19 | #include "mpp.h" | ||
20 | |||
21 | static struct mv643xx_eth_platform_data topkick_ge00_data = { | ||
22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
23 | }; | ||
24 | |||
25 | static struct mvsdio_platform_data topkick_mvsdio_data = { | ||
26 | /* unfortunately the CD signal has not been connected */ | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * GPIO LED layout | ||
31 | * | ||
32 | * /-SYS_LED(2) | ||
33 | * | | ||
34 | * | /-DISK_LED | ||
35 | * | | | ||
36 | * | | /-WLAN_LED(2) | ||
37 | * | | | | ||
38 | * [SW] [*] [*] [*] | ||
39 | */ | ||
40 | |||
41 | /* | ||
42 | * Switch positions | ||
43 | * | ||
44 | * /-SW_LEFT | ||
45 | * | | ||
46 | * | /-SW_IDLE | ||
47 | * | | | ||
48 | * | | /-SW_RIGHT | ||
49 | * | | | | ||
50 | * PS [L] [I] [R] LEDS | ||
51 | */ | ||
52 | |||
53 | static unsigned int topkick_mpp_config[] __initdata = { | ||
54 | MPP21_GPIO, /* DISK_LED (low active) - yellow */ | ||
55 | MPP36_GPIO, /* SATA0 power enable (high active) */ | ||
56 | MPP37_GPIO, /* SYS_LED2 (low active) - red */ | ||
57 | MPP38_GPIO, /* SYS_LED (low active) - blue */ | ||
58 | MPP39_GPIO, /* WLAN_LED (low active) - green */ | ||
59 | MPP43_GPIO, /* SW_LEFT (low active) */ | ||
60 | MPP44_GPIO, /* SW_RIGHT (low active) */ | ||
61 | MPP45_GPIO, /* SW_IDLE (low active) */ | ||
62 | MPP46_GPIO, /* SW_LEFT (low active) */ | ||
63 | MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */ | ||
64 | 0 | ||
65 | }; | ||
66 | |||
67 | #define TOPKICK_SATA0_PWR_ENABLE 36 | ||
68 | |||
69 | void __init usi_topkick_init(void) | ||
70 | { | ||
71 | /* | ||
72 | * Basic setup. Needs to be called early. | ||
73 | */ | ||
74 | kirkwood_mpp_conf(topkick_mpp_config); | ||
75 | |||
76 | /* SATA0 power enable */ | ||
77 | gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); | ||
78 | |||
79 | kirkwood_ge00_init(&topkick_ge00_data); | ||
80 | kirkwood_sdio_init(&topkick_mvsdio_data); | ||
81 | } | ||
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 2c6c218fb79e..5303be62b311 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include <linux/clk-provider.h> | 18 | #include <linux/clk-provider.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/mv643xx_i2c.h> | 20 | #include <linux/mv643xx_i2c.h> |
21 | #include <linux/timex.h> | ||
22 | #include <linux/kexec.h> | ||
21 | #include <net/dsa.h> | 23 | #include <net/dsa.h> |
22 | #include <asm/page.h> | 24 | #include <asm/page.h> |
23 | #include <asm/timex.h> | ||
24 | #include <asm/kexec.h> | ||
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | #include <asm/mach/time.h> | 26 | #include <asm/mach/time.h> |
27 | #include <mach/kirkwood.h> | 27 | #include <mach/kirkwood.h> |
@@ -266,6 +266,7 @@ void __init kirkwood_clk_init(void) | |||
266 | orion_clkdev_add("1", "pcie", pex1); | 266 | orion_clkdev_add("1", "pcie", pex1); |
267 | orion_clkdev_add(NULL, "kirkwood-i2s", audio); | 267 | orion_clkdev_add(NULL, "kirkwood-i2s", audio); |
268 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); | 268 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit); |
269 | orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit); | ||
269 | 270 | ||
270 | /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., | 271 | /* Marvell says runit is used by SPI, UART, NAND, TWSI, ..., |
271 | * so should never be gated. | 272 | * so should never be gated. |
@@ -425,7 +426,7 @@ void __init kirkwood_sdio_init(struct mvsdio_platform_data *mvsdio_data) | |||
425 | /***************************************************************************** | 426 | /***************************************************************************** |
426 | * SPI | 427 | * SPI |
427 | ****************************************************************************/ | 428 | ****************************************************************************/ |
428 | void __init kirkwood_spi_init() | 429 | void __init kirkwood_spi_init(void) |
429 | { | 430 | { |
430 | orion_spi_init(SPI_PHYS_BASE); | 431 | orion_spi_init(SPI_PHYS_BASE); |
431 | } | 432 | } |
@@ -646,8 +647,7 @@ void __init kirkwood_l2_init(void) | |||
646 | 647 | ||
647 | void __init kirkwood_init(void) | 648 | void __init kirkwood_init(void) |
648 | { | 649 | { |
649 | printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n", | 650 | pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); |
650 | kirkwood_id(), kirkwood_tclk); | ||
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Disable propagation of mbus errors to the CPU local bus, | 653 | * Disable propagation of mbus errors to the CPU local bus, |
@@ -671,7 +671,7 @@ void __init kirkwood_init(void) | |||
671 | kirkwood_xor1_init(); | 671 | kirkwood_xor1_init(); |
672 | kirkwood_crypto_init(); | 672 | kirkwood_crypto_init(); |
673 | 673 | ||
674 | #ifdef CONFIG_KEXEC | 674 | #ifdef CONFIG_KEXEC |
675 | kexec_reinit = kirkwood_enable_pcie; | 675 | kexec_reinit = kirkwood_enable_pcie; |
676 | #endif | 676 | #endif |
677 | } | 677 | } |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index bcffd7ca1ca2..5ffa57f08c80 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -47,7 +47,8 @@ void kirkwood_i2c_init(void); | |||
47 | void kirkwood_uart0_init(void); | 47 | void kirkwood_uart0_init(void); |
48 | void kirkwood_uart1_init(void); | 48 | void kirkwood_uart1_init(void); |
49 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); | 49 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); |
50 | void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); | 50 | void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, |
51 | int (*dev_ready)(struct mtd_info *)); | ||
51 | void kirkwood_audio_init(void); | 52 | void kirkwood_audio_init(void); |
52 | void kirkwood_restart(char, const char *); | 53 | void kirkwood_restart(char, const char *); |
53 | void kirkwood_clk_init(void); | 54 | void kirkwood_clk_init(void); |
@@ -112,6 +113,40 @@ void km_kirkwood_init(void); | |||
112 | static inline void km_kirkwood_init(void) {}; | 113 | static inline void km_kirkwood_init(void) {}; |
113 | #endif | 114 | #endif |
114 | 115 | ||
116 | #ifdef CONFIG_MACH_MPLCEC4_DT | ||
117 | void mplcec4_init(void); | ||
118 | #else | ||
119 | static inline void mplcec4_init(void) {}; | ||
120 | #endif | ||
121 | |||
122 | #if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ | ||
123 | defined(CONFIG_MACH_NETSPACE_V2_DT) || \ | ||
124 | defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ | ||
125 | defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \ | ||
126 | defined(CONFIG_MACH_NETSPACE_MINI_V2_DT) | ||
127 | void ns2_init(void); | ||
128 | #else | ||
129 | static inline void ns2_init(void) {}; | ||
130 | #endif | ||
131 | |||
132 | #ifdef CONFIG_MACH_NSA310_DT | ||
133 | void nsa310_init(void); | ||
134 | #else | ||
135 | static inline void nsa310_init(void) {}; | ||
136 | #endif | ||
137 | |||
138 | #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT | ||
139 | void openblocks_a6_init(void); | ||
140 | #else | ||
141 | static inline void openblocks_a6_init(void) {}; | ||
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_MACH_TOPKICK_DT | ||
145 | void usi_topkick_init(void); | ||
146 | #else | ||
147 | static inline void usi_topkick_init(void) {}; | ||
148 | #endif | ||
149 | |||
115 | /* early init functions not converted to fdt yet */ | 150 | /* early init functions not converted to fdt yet */ |
116 | char *kirkwood_id(void); | 151 | char *kirkwood_id(void); |
117 | void kirkwood_l2_init(void); | 152 | void kirkwood_l2_init(void); |
diff --git a/arch/arm/mach-kirkwood/cpuidle.c b/arch/arm/mach-kirkwood/cpuidle.c index 0f1710941878..f7304670f2f8 100644 --- a/arch/arm/mach-kirkwood/cpuidle.c +++ b/arch/arm/mach-kirkwood/cpuidle.c | |||
@@ -64,7 +64,7 @@ static int kirkwood_init_cpuidle(void) | |||
64 | 64 | ||
65 | cpuidle_register_driver(&kirkwood_idle_driver); | 65 | cpuidle_register_driver(&kirkwood_idle_driver); |
66 | if (cpuidle_register_device(device)) { | 66 | if (cpuidle_register_device(device)) { |
67 | printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n"); | 67 | pr_err("kirkwood_init_cpuidle: Failed registering\n"); |
68 | return -EIO; | 68 | return -EIO; |
69 | } | 69 | } |
70 | return 0; | 70 | return 0; |
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c index 23dcb19cc2a7..791a98fafa29 100644 --- a/arch/arm/mach-kirkwood/dockstar-setup.c +++ b/arch/arm/mach-kirkwood/dockstar-setup.c | |||
@@ -93,7 +93,7 @@ static void __init dockstar_init(void) | |||
93 | 93 | ||
94 | if (gpio_request(29, "USB Power Enable") != 0 || | 94 | if (gpio_request(29, "USB Power Enable") != 0 || |
95 | gpio_direction_output(29, 1) != 0) | 95 | gpio_direction_output(29, 1) != 0) |
96 | printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); | 96 | pr_err("can't set up GPIO 29 (USB Power Enable)\n"); |
97 | kirkwood_ehci_init(); | 97 | kirkwood_ehci_init(); |
98 | 98 | ||
99 | kirkwood_ge00_init(&dockstar_ge00_data); | 99 | kirkwood_ge00_init(&dockstar_ge00_data); |
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c index 884703535a0a..2a97a2e4163c 100644 --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <mach/bridge-regs.h> | 14 | #include <mach/bridge-regs.h> |
15 | #include <plat/orion-gpio.h> | 15 | #include <plat/orion-gpio.h> |
16 | #include <plat/irq.h> | 16 | #include <plat/irq.h> |
17 | #include "common.h" | ||
17 | 18 | ||
18 | static int __initdata gpio0_irqs[4] = { | 19 | static int __initdata gpio0_irqs[4] = { |
19 | IRQ_KIRKWOOD_GPIO_LOW_0_7, | 20 | IRQ_KIRKWOOD_GPIO_LOW_0_7, |
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c index 285edab776e9..489495976fcd 100644 --- a/arch/arm/mach-kirkwood/lacie_v2-common.c +++ b/arch/arm/mach-kirkwood/lacie_v2-common.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <mach/irqs.h> | 19 | #include <mach/irqs.h> |
20 | #include <plat/time.h> | 20 | #include <plat/time.h> |
21 | #include "common.h" | 21 | #include "common.h" |
22 | #include "lacie_v2-common.h" | ||
22 | 23 | ||
23 | /***************************************************************************** | 24 | /***************************************************************************** |
24 | * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005) | 25 | * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005) |
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index 0c6ad63f10c7..827cde42414f 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c | |||
@@ -30,8 +30,8 @@ static unsigned int __init kirkwood_variant(void) | |||
30 | if (dev == MV88F6180_DEV_ID) | 30 | if (dev == MV88F6180_DEV_ID) |
31 | return MPP_F6180_MASK; | 31 | return MPP_F6180_MASK; |
32 | 32 | ||
33 | printk(KERN_ERR "MPP setup: unknown kirkwood variant " | 33 | pr_err("MPP setup: unknown kirkwood variant (dev %#x rev %#x)\n", |
34 | "(dev %#x rev %#x)\n", dev, rev); | 34 | dev, rev); |
35 | return 0; | 35 | return 0; |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c index 88b0788bacae..728e86d33f0c 100644 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c | |||
@@ -79,7 +79,7 @@ static struct platform_device netspace_v2_gpio_buttons = { | |||
79 | .name = "gpio-keys", | 79 | .name = "gpio-keys", |
80 | .id = -1, | 80 | .id = -1, |
81 | .dev = { | 81 | .dev = { |
82 | .platform_data = &netspace_v2_button_data, | 82 | .platform_data = &netspace_v2_button_data, |
83 | }, | 83 | }, |
84 | }; | 84 | }; |
85 | 85 | ||
@@ -211,7 +211,7 @@ static unsigned int netspace_v2_mpp_config[] __initdata = { | |||
211 | MPP29_GPIO, /* Blue led (slow register) */ | 211 | MPP29_GPIO, /* Blue led (slow register) */ |
212 | MPP30_GPIO, /* Blue led (command register) */ | 212 | MPP30_GPIO, /* Blue led (command register) */ |
213 | MPP31_GPIO, /* Board power off */ | 213 | MPP31_GPIO, /* Board power off */ |
214 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | 214 | MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ |
215 | MPP33_GPO, /* Fan speed (bit 2) */ | 215 | MPP33_GPO, /* Fan speed (bit 2) */ |
216 | 0 | 216 | 0 |
217 | }; | 217 | }; |
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index 134ef50d58fc..7e81e9b586bf 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c | |||
@@ -121,14 +121,12 @@ static int __init uart1_mpp_config(void) | |||
121 | kirkwood_mpp_conf(openrd_uart1_mpp_config); | 121 | kirkwood_mpp_conf(openrd_uart1_mpp_config); |
122 | 122 | ||
123 | if (gpio_request(34, "SD_UART1_SEL")) { | 123 | if (gpio_request(34, "SD_UART1_SEL")) { |
124 | printk(KERN_ERR "GPIO request failed for SD/UART1 selection" | 124 | pr_err("GPIO request 34 failed for SD/UART1 selection\n"); |
125 | ", gpio: 34\n"); | ||
126 | return -EIO; | 125 | return -EIO; |
127 | } | 126 | } |
128 | 127 | ||
129 | if (gpio_request(28, "RS232_RS485_SEL")) { | 128 | if (gpio_request(28, "RS232_RS485_SEL")) { |
130 | printk(KERN_ERR "GPIO request failed for RS232/RS485 selection" | 129 | pr_err("GPIO request 28 failed for RS232/RS485 selection\n"); |
131 | ", gpio# 28\n"); | ||
132 | gpio_free(34); | 130 | gpio_free(34); |
133 | return -EIO; | 131 | return -EIO; |
134 | } | 132 | } |
@@ -185,15 +183,13 @@ static void __init openrd_init(void) | |||
185 | 183 | ||
186 | if (uart1 <= 0) { | 184 | if (uart1 <= 0) { |
187 | if (uart1 < 0) | 185 | if (uart1 < 0) |
188 | printk(KERN_ERR "Invalid kernel parameter to select " | 186 | pr_err("Invalid kernel parameter to select UART1. Defaulting to SD. ERROR CODE: %d\n", |
189 | "UART1. Defaulting to SD. ERROR CODE: %d\n", | 187 | uart1); |
190 | uart1); | ||
191 | 188 | ||
192 | /* Select SD | 189 | /* Select SD |
193 | * Pin # 34: 0 => UART1, 1 => SD */ | 190 | * Pin # 34: 0 => UART1, 1 => SD */ |
194 | if (gpio_request(34, "SD_UART1_SEL")) { | 191 | if (gpio_request(34, "SD_UART1_SEL")) { |
195 | printk(KERN_ERR "GPIO request failed for SD/UART1 " | 192 | pr_err("GPIO request 34 failed for SD/UART1 selection\n"); |
196 | "selection, gpio: 34\n"); | ||
197 | } else { | 193 | } else { |
198 | 194 | ||
199 | gpio_direction_output(34, 1); | 195 | gpio_direction_output(34, 1); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ec544918b12c..ef102646ba9a 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -26,7 +26,7 @@ static void kirkwood_enable_pcie_clk(const char *port) | |||
26 | 26 | ||
27 | clk = clk_get_sys("pcie", port); | 27 | clk = clk_get_sys("pcie", port); |
28 | if (IS_ERR(clk)) { | 28 | if (IS_ERR(clk)) { |
29 | printk(KERN_ERR "PCIE clock %s missing\n", port); | 29 | pr_err("PCIE clock %s missing\n", port); |
30 | return; | 30 | return; |
31 | } | 31 | } |
32 | clk_prepare_enable(clk); | 32 | clk_prepare_enable(clk); |
@@ -168,7 +168,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
168 | return 0; | 168 | return 0; |
169 | 169 | ||
170 | index = pcie_port_map[nr]; | 170 | index = pcie_port_map[nr]; |
171 | printk(KERN_INFO "PCI: bus%d uses PCIe port %d\n", sys->busnr, index); | 171 | pr_info("PCI: bus%d uses PCIe port %d\n", sys->busnr, index); |
172 | 172 | ||
173 | pp = kzalloc(sizeof(*pp), GFP_KERNEL); | 173 | pp = kzalloc(sizeof(*pp), GFP_KERNEL); |
174 | if (!pp) | 174 | if (!pp) |
@@ -186,7 +186,8 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
186 | case 1: | 186 | case 1: |
187 | kirkwood_enable_pcie_clk("1"); | 187 | kirkwood_enable_pcie_clk("1"); |
188 | pcie1_ioresources_init(pp); | 188 | pcie1_ioresources_init(pp); |
189 | pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE1_IO_PHYS_BASE); | 189 | pci_ioremap_io(SZ_64K * sys->busnr, |
190 | KIRKWOOD_PCIE1_IO_PHYS_BASE); | ||
190 | break; | 191 | break; |
191 | default: | 192 | default: |
192 | panic("PCIe setup: invalid controller %d", index); | 193 | panic("PCIe setup: invalid controller %d", index); |
@@ -207,14 +208,19 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
207 | return 1; | 208 | return 1; |
208 | } | 209 | } |
209 | 210 | ||
211 | /* | ||
212 | * The root complex has a hardwired class of PCI_CLASS_MEMORY_OTHER, when it | ||
213 | * is operating as a root complex this needs to be switched to | ||
214 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | ||
215 | * the device. Decoding setup is handled by the orion code. | ||
216 | */ | ||
210 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 217 | static void __devinit rc_pci_fixup(struct pci_dev *dev) |
211 | { | 218 | { |
212 | /* | ||
213 | * Prevent enumeration of root complex. | ||
214 | */ | ||
215 | if (dev->bus->parent == NULL && dev->devfn == 0) { | 219 | if (dev->bus->parent == NULL && dev->devfn == 0) { |
216 | int i; | 220 | int i; |
217 | 221 | ||
222 | dev->class &= 0xff; | ||
223 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
218 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 224 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
219 | dev->resource[i].start = 0; | 225 | dev->resource[i].start = 0; |
220 | dev->resource[i].end = 0; | 226 | dev->resource[i].end = 0; |
@@ -224,22 +230,6 @@ static void __devinit rc_pci_fixup(struct pci_dev *dev) | |||
224 | } | 230 | } |
225 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); | 231 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); |
226 | 232 | ||
227 | static struct pci_bus __init * | ||
228 | kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys) | ||
229 | { | ||
230 | struct pci_bus *bus; | ||
231 | |||
232 | if (nr < num_pcie_ports) { | ||
233 | bus = pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys, | ||
234 | &sys->resources); | ||
235 | } else { | ||
236 | bus = NULL; | ||
237 | BUG(); | ||
238 | } | ||
239 | |||
240 | return bus; | ||
241 | } | ||
242 | |||
243 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, | 233 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
244 | u8 pin) | 234 | u8 pin) |
245 | { | 235 | { |
@@ -251,19 +241,19 @@ static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, | |||
251 | 241 | ||
252 | static struct hw_pci kirkwood_pci __initdata = { | 242 | static struct hw_pci kirkwood_pci __initdata = { |
253 | .setup = kirkwood_pcie_setup, | 243 | .setup = kirkwood_pcie_setup, |
254 | .scan = kirkwood_pcie_scan_bus, | ||
255 | .map_irq = kirkwood_pcie_map_irq, | 244 | .map_irq = kirkwood_pcie_map_irq, |
245 | .ops = &pcie_ops, | ||
256 | }; | 246 | }; |
257 | 247 | ||
258 | static void __init add_pcie_port(int index, void __iomem *base) | 248 | static void __init add_pcie_port(int index, void __iomem *base) |
259 | { | 249 | { |
260 | printk(KERN_INFO "Kirkwood PCIe port %d: ", index); | 250 | pr_info("Kirkwood PCIe port %d: ", index); |
261 | 251 | ||
262 | if (orion_pcie_link_up(base)) { | 252 | if (orion_pcie_link_up(base)) { |
263 | printk(KERN_INFO "link up\n"); | 253 | pr_info("link up\n"); |
264 | pcie_port_map[num_pcie_ports++] = index; | 254 | pcie_port_map[num_pcie_ports++] = index; |
265 | } else | 255 | } else |
266 | printk(KERN_INFO "link down, ignoring\n"); | 256 | pr_info("link down, ignoring\n"); |
267 | } | 257 | } |
268 | 258 | ||
269 | void __init kirkwood_pcie_init(unsigned int portmask) | 259 | void __init kirkwood_pcie_init(unsigned int portmask) |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 28d0abaf4bd9..8a175948b28d 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -117,7 +117,7 @@ static void __init sheevaplug_init(void) | |||
117 | 117 | ||
118 | if (gpio_request(29, "USB Power Enable") != 0 || | 118 | if (gpio_request(29, "USB Power Enable") != 0 || |
119 | gpio_direction_output(29, 1) != 0) | 119 | gpio_direction_output(29, 1) != 0) |
120 | printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n"); | 120 | pr_err("can't set up GPIO 29 (USB Power Enable)\n"); |
121 | kirkwood_ehci_init(); | 121 | kirkwood_ehci_init(); |
122 | 122 | ||
123 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 123 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c index bad738e44044..f2daf711e72e 100644 --- a/arch/arm/mach-kirkwood/t5325-setup.c +++ b/arch/arm/mach-kirkwood/t5325-setup.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "common.h" | 29 | #include "common.h" |
30 | #include "mpp.h" | 30 | #include "mpp.h" |
31 | 31 | ||
32 | struct mtd_partition hp_t5325_partitions[] = { | 32 | static struct mtd_partition hp_t5325_partitions[] = { |
33 | { | 33 | { |
34 | .name = "u-boot env", | 34 | .name = "u-boot env", |
35 | .size = SZ_64K, | 35 | .size = SZ_64K, |
@@ -59,14 +59,14 @@ struct mtd_partition hp_t5325_partitions[] = { | |||
59 | }, | 59 | }, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | const struct flash_platform_data hp_t5325_flash = { | 62 | static const struct flash_platform_data hp_t5325_flash = { |
63 | .type = "mx25l8005", | 63 | .type = "mx25l8005", |
64 | .name = "spi_flash", | 64 | .name = "spi_flash", |
65 | .parts = hp_t5325_partitions, | 65 | .parts = hp_t5325_partitions, |
66 | .nr_parts = ARRAY_SIZE(hp_t5325_partitions), | 66 | .nr_parts = ARRAY_SIZE(hp_t5325_partitions), |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct spi_board_info __initdata hp_t5325_spi_slave_info[] = { | 69 | static struct spi_board_info __initdata hp_t5325_spi_slave_info[] = { |
70 | { | 70 | { |
71 | .modalias = "m25p80", | 71 | .modalias = "m25p80", |
72 | .platform_data = &hp_t5325_flash, | 72 | .platform_data = &hp_t5325_flash, |
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c index 367a9400f532..e4c61279ea86 100644 --- a/arch/arm/mach-kirkwood/ts41x-setup.c +++ b/arch/arm/mach-kirkwood/ts41x-setup.c | |||
@@ -170,8 +170,7 @@ static int __init ts41x_pci_init(void) | |||
170 | else | 170 | else |
171 | kirkwood_pcie_init(KW_PCIE0); | 171 | kirkwood_pcie_init(KW_PCIE0); |
172 | } | 172 | } |
173 | 173 | return 0; | |
174 | return 0; | ||
175 | } | 174 | } |
176 | subsys_initcall(ts41x_pci_init); | 175 | subsys_initcall(ts41x_pci_init); |
177 | 176 | ||
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index 8943ede29b44..cec87cef76ca 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/serial_reg.h> | 7 | #include <linux/serial_reg.h> |
8 | #include <mach/kirkwood.h> | 8 | #include <mach/kirkwood.h> |
9 | #include "common.h" | 9 | #include "common.h" |
10 | #include "tsx1x-common.h" | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * QNAP TS-x1x Boards flash | 13 | * QNAP TS-x1x Boards flash |
@@ -29,7 +30,7 @@ | |||
29 | * | 30 | * |
30 | ***************************************************************************/ | 31 | ***************************************************************************/ |
31 | 32 | ||
32 | struct mtd_partition qnap_tsx1x_partitions[] = { | 33 | static struct mtd_partition qnap_tsx1x_partitions[] = { |
33 | { | 34 | { |
34 | .name = "U-Boot", | 35 | .name = "U-Boot", |
35 | .size = 0x00080000, | 36 | .size = 0x00080000, |
@@ -58,14 +59,14 @@ struct mtd_partition qnap_tsx1x_partitions[] = { | |||
58 | }, | 59 | }, |
59 | }; | 60 | }; |
60 | 61 | ||
61 | const struct flash_platform_data qnap_tsx1x_flash = { | 62 | static const struct flash_platform_data qnap_tsx1x_flash = { |
62 | .type = "m25p128", | 63 | .type = "m25p128", |
63 | .name = "spi_flash", | 64 | .name = "spi_flash", |
64 | .parts = qnap_tsx1x_partitions, | 65 | .parts = qnap_tsx1x_partitions, |
65 | .nr_parts = ARRAY_SIZE(qnap_tsx1x_partitions), | 66 | .nr_parts = ARRAY_SIZE(qnap_tsx1x_partitions), |
66 | }; | 67 | }; |
67 | 68 | ||
68 | struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { | 69 | static struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = { |
69 | { | 70 | { |
70 | .modalias = "m25p80", | 71 | .modalias = "m25p80", |
71 | .platform_data = &qnap_tsx1x_flash, | 72 | .platform_data = &qnap_tsx1x_flash, |