aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS12
-rw-r--r--arch/arm/mach-kirkwood/Kconfig18
-rw-r--r--arch/arm/mach-kirkwood/Makefile3
-rw-r--r--arch/arm/mach-kirkwood/guruplug-setup.c131
-rw-r--r--arch/arm/mach-kirkwood/netxbig_v2-setup.c415
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c1
6 files changed, 574 insertions, 6 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 5a2387d13339..a67112feba18 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -781,11 +781,10 @@ M: Philipp Zabel <philipp.zabel@gmail.com>
781S: Maintained 781S: Maintained
782 782
783ARM/Marvell Loki/Kirkwood/MV78xx0/Orion SOC support 783ARM/Marvell Loki/Kirkwood/MV78xx0/Orion SOC support
784M: Lennert Buytenhek <buytenh@marvell.com> 784M: Lennert Buytenhek <kernel@wantstofly.org>
785M: Nicolas Pitre <nico@marvell.com> 785M: Nicolas Pitre <nico@fluxnic.net>
786L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 786L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
787T: git git://git.marvell.com/orion 787S: Odd Fixes
788S: Maintained
789F: arch/arm/mach-loki/ 788F: arch/arm/mach-loki/
790F: arch/arm/mach-kirkwood/ 789F: arch/arm/mach-kirkwood/
791F: arch/arm/mach-mv78xx0/ 790F: arch/arm/mach-mv78xx0/
@@ -3644,7 +3643,8 @@ F: drivers/net/wireless/mwl8k.c
3644 3643
3645MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER 3644MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
3646M: Nicolas Pitre <nico@fluxnic.net> 3645M: Nicolas Pitre <nico@fluxnic.net>
3647S: Maintained 3646S: Odd Fixes
3647F: drivers/mmc/host/mvsdio.*
3648 3648
3649MARVELL YUKON / SYSKONNECT DRIVER 3649MARVELL YUKON / SYSKONNECT DRIVER
3650M: Mirko Lindner <mlindner@syskonnect.de> 3650M: Mirko Lindner <mlindner@syskonnect.de>
@@ -5141,7 +5141,7 @@ F: mm/sl?b.c
5141 5141
5142SMC91x ETHERNET DRIVER 5142SMC91x ETHERNET DRIVER
5143M: Nicolas Pitre <nico@fluxnic.net> 5143M: Nicolas Pitre <nico@fluxnic.net>
5144S: Maintained 5144S: Odd Fixes
5145F: drivers/net/smc91x.* 5145F: drivers/net/smc91x.*
5146 5146
5147SMSC47B397 HARDWARE MONITOR DRIVER 5147SMSC47B397 HARDWARE MONITOR DRIVER
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 17879a876be6..29b2163b1fe3 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -38,6 +38,12 @@ config MACH_ESATA_SHEEVAPLUG
38 Say 'Y' here if you want your kernel to support the 38 Say 'Y' here if you want your kernel to support the
39 Marvell eSATA SheevaPlug Reference Board. 39 Marvell eSATA SheevaPlug Reference Board.
40 40
41config MACH_GURUPLUG
42 bool "Marvell GuruPlug Reference Board"
43 help
44 Say 'Y' here if you want your kernel to support the
45 Marvell GuruPlug Reference Board.
46
41config MACH_TS219 47config MACH_TS219
42 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" 48 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS"
43 help 49 help
@@ -81,6 +87,18 @@ config MACH_INETSPACE_V2
81 Say 'Y' here if you want your kernel to support the 87 Say 'Y' here if you want your kernel to support the
82 LaCie Internet Space v2 NAS. 88 LaCie Internet Space v2 NAS.
83 89
90config MACH_NET2BIG_V2
91 bool "LaCie 2Big Network v2 NAS Board"
92 help
93 Say 'Y' here if you want your kernel to support the
94 LaCie 2Big Network v2 NAS.
95
96config MACH_NET5BIG_V2
97 bool "LaCie 5Big Network v2 NAS Board"
98 help
99 Say 'Y' here if you want your kernel to support the
100 LaCie 5Big Network v2 NAS.
101
84endmenu 102endmenu
85 103
86endif 104endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index a5530e36ba3e..c0cd5d362002 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -6,10 +6,13 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o 6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o 7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o 8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
9obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
9obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 10obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
10obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 11obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
11obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o 12obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
12obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o 13obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o
13obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o 14obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o
15obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o
16obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o
14 17
15obj-$(CONFIG_CPU_IDLE) += cpuidle.o 18obj-$(CONFIG_CPU_IDLE) += cpuidle.o
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
new file mode 100644
index 000000000000..54d07c89d4ff
--- /dev/null
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -0,0 +1,131 @@
1/*
2 * arch/arm/mach-kirkwood/guruplug-setup.c
3 *
4 * Marvell GuruPlug Reference Board 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/platform_device.h>
14#include <linux/mtd/partitions.h>
15#include <linux/ata_platform.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>
22#include <plat/mvsdio.h>
23#include "common.h"
24#include "mpp.h"
25
26static struct mtd_partition guruplug_nand_parts[] = {
27 {
28 .name = "u-boot",
29 .offset = 0,
30 .size = SZ_1M
31 }, {
32 .name = "uImage",
33 .offset = MTDPART_OFS_NXTBLK,
34 .size = SZ_4M
35 }, {
36 .name = "root",
37 .offset = MTDPART_OFS_NXTBLK,
38 .size = MTDPART_SIZ_FULL
39 },
40};
41
42static struct mv643xx_eth_platform_data guruplug_ge00_data = {
43 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
44};
45
46static struct mv643xx_eth_platform_data guruplug_ge01_data = {
47 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
48};
49
50static struct mv_sata_platform_data guruplug_sata_data = {
51 .n_ports = 1,
52};
53
54static struct mvsdio_platform_data guruplug_mvsdio_data = {
55 /* unfortunately the CD signal has not been connected */
56};
57
58static struct gpio_led guruplug_led_pins[] = {
59 {
60 .name = "guruplug:red:health",
61 .gpio = 46,
62 .active_low = 1,
63 },
64 {
65 .name = "guruplug:green:health",
66 .gpio = 47,
67 .active_low = 1,
68 },
69 {
70 .name = "guruplug:red:wmode",
71 .gpio = 48,
72 .active_low = 1,
73 },
74 {
75 .name = "guruplug:green:wmode",
76 .gpio = 49,
77 .active_low = 1,
78 },
79};
80
81static struct gpio_led_platform_data guruplug_led_data = {
82 .leds = guruplug_led_pins,
83 .num_leds = ARRAY_SIZE(guruplug_led_pins),
84};
85
86static struct platform_device guruplug_leds = {
87 .name = "leds-gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &guruplug_led_data,
91 }
92};
93
94static unsigned int guruplug_mpp_config[] __initdata = {
95 MPP46_GPIO, /* M_RLED */
96 MPP47_GPIO, /* M_GLED */
97 MPP48_GPIO, /* B_RLED */
98 MPP49_GPIO, /* B_GLED */
99 0
100};
101
102static void __init guruplug_init(void)
103{
104 /*
105 * Basic setup. Needs to be called early.
106 */
107 kirkwood_init();
108 kirkwood_mpp_conf(guruplug_mpp_config);
109
110 kirkwood_uart0_init();
111 kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25);
112
113 kirkwood_ehci_init();
114 kirkwood_ge00_init(&guruplug_ge00_data);
115 kirkwood_ge01_init(&guruplug_ge01_data);
116 kirkwood_sata_init(&guruplug_sata_data);
117 kirkwood_sdio_init(&guruplug_mvsdio_data);
118
119 platform_device_register(&guruplug_leds);
120}
121
122MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
123 /* Maintainer: Siddarth Gore <gores@marvell.com> */
124 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
125 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
126 .boot_params = 0x00000100,
127 .init_machine = guruplug_init,
128 .map_io = kirkwood_map_io,
129 .init_irq = kirkwood_init_irq,
130 .timer = &kirkwood_timer,
131MACHINE_END
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
new file mode 100644
index 000000000000..8a2bb0228e4f
--- /dev/null
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -0,0 +1,415 @@
1/*
2 * arch/arm/mach-kirkwood/netxbig_v2-setup.c
3 *
4 * LaCie 2Big and 5Big Network v2 board setup
5 *
6 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/kernel.h>
24#include <linux/init.h>
25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h>
27#include <linux/spi/flash.h>
28#include <linux/spi/spi.h>
29#include <linux/ata_platform.h>
30#include <linux/mv643xx_eth.h>
31#include <linux/i2c.h>
32#include <linux/i2c/at24.h>
33#include <linux/input.h>
34#include <linux/gpio.h>
35#include <linux/gpio_keys.h>
36#include <linux/leds.h>
37#include <asm/mach-types.h>
38#include <asm/mach/arch.h>
39#include <asm/mach/time.h>
40#include <mach/kirkwood.h>
41#include <plat/time.h>
42#include "common.h"
43#include "mpp.h"
44
45/*****************************************************************************
46 * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
47 ****************************************************************************/
48
49static struct mtd_partition netxbig_v2_flash_parts[] = {
50 {
51 .name = "u-boot",
52 .size = MTDPART_SIZ_FULL,
53 .offset = 0,
54 .mask_flags = MTD_WRITEABLE, /* force read-only */
55 },
56};
57
58static const struct flash_platform_data netxbig_v2_flash = {
59 .type = "mx25l4005a",
60 .name = "spi_flash",
61 .parts = netxbig_v2_flash_parts,
62 .nr_parts = ARRAY_SIZE(netxbig_v2_flash_parts),
63};
64
65static struct spi_board_info __initdata netxbig_v2_spi_slave_info[] = {
66 {
67 .modalias = "m25p80",
68 .platform_data = &netxbig_v2_flash,
69 .irq = -1,
70 .max_speed_hz = 20000000,
71 .bus_num = 0,
72 .chip_select = 0,
73 },
74};
75
76/*****************************************************************************
77 * Ethernet
78 ****************************************************************************/
79
80static struct mv643xx_eth_platform_data netxbig_v2_ge00_data = {
81 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
82};
83
84static struct mv643xx_eth_platform_data netxbig_v2_ge01_data = {
85 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
86};
87
88/*****************************************************************************
89 * I2C devices
90 ****************************************************************************/
91
92static struct at24_platform_data at24c04 = {
93 .byte_len = SZ_4K / 8,
94 .page_size = 16,
95};
96
97/*
98 * i2c addr | chip | description
99 * 0x50 | HT24LC04 | eeprom (512B)
100 */
101
102static struct i2c_board_info __initdata netxbig_v2_i2c_info[] = {
103 {
104 I2C_BOARD_INFO("24c04", 0x50),
105 .platform_data = &at24c04,
106 }
107};
108
109/*****************************************************************************
110 * SATA
111 ****************************************************************************/
112
113static struct mv_sata_platform_data netxbig_v2_sata_data = {
114 .n_ports = 2,
115};
116
117static int __initdata netxbig_v2_gpio_hdd_power[] = { 16, 17, 41, 42, 43 };
118
119static void __init netxbig_v2_sata_power_init(void)
120{
121 int i;
122 int err;
123 int hdd_nb;
124
125 if (machine_is_net2big_v2())
126 hdd_nb = 2;
127 else
128 hdd_nb = 5;
129
130 /* Power up all hard disks. */
131 for (i = 0; i < hdd_nb; i++) {
132 err = gpio_request(netxbig_v2_gpio_hdd_power[i], NULL);
133 if (err == 0) {
134 err = gpio_direction_output(
135 netxbig_v2_gpio_hdd_power[i], 1);
136 /* Free the HDD power GPIOs. This allow user-space to
137 * configure them via the gpiolib sysfs interface. */
138 gpio_free(netxbig_v2_gpio_hdd_power[i]);
139 }
140 if (err)
141 pr_err("netxbig_v2: failed to power up HDD%d\n", i + 1);
142 }
143}
144
145/*****************************************************************************
146 * GPIO keys
147 ****************************************************************************/
148
149#define NETXBIG_V2_GPIO_SWITCH_POWER_ON 13
150#define NETXBIG_V2_GPIO_SWITCH_POWER_OFF 15
151#define NETXBIG_V2_GPIO_FUNC_BUTTON 34
152
153#define NETXBIG_V2_SWITCH_POWER_ON 0x1
154#define NETXBIG_V2_SWITCH_POWER_OFF 0x2
155
156static struct gpio_keys_button netxbig_v2_buttons[] = {
157 [0] = {
158 .type = EV_SW,
159 .code = NETXBIG_V2_SWITCH_POWER_ON,
160 .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_ON,
161 .desc = "Back power switch (on|auto)",
162 .active_low = 1,
163 },
164 [1] = {
165 .type = EV_SW,
166 .code = NETXBIG_V2_SWITCH_POWER_OFF,
167 .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_OFF,
168 .desc = "Back power switch (auto|off)",
169 .active_low = 1,
170 },
171 [2] = {
172 .code = KEY_OPTION,
173 .gpio = NETXBIG_V2_GPIO_FUNC_BUTTON,
174 .desc = "Function button",
175 .active_low = 1,
176 },
177};
178
179static struct gpio_keys_platform_data netxbig_v2_button_data = {
180 .buttons = netxbig_v2_buttons,
181 .nbuttons = ARRAY_SIZE(netxbig_v2_buttons),
182};
183
184static struct platform_device netxbig_v2_gpio_buttons = {
185 .name = "gpio-keys",
186 .id = -1,
187 .dev = {
188 .platform_data = &netxbig_v2_button_data,
189 },
190};
191
192/*****************************************************************************
193 * GPIO LEDs
194 ****************************************************************************/
195
196/*
197 * The LEDs are controlled by a CPLD and can be configured through a GPIO
198 * extension bus:
199 *
200 * - address register : bit [0-2] -> GPIO [47-49]
201 * - data register : bit [0-2] -> GPIO [44-46]
202 * - enable register : GPIO 29
203 *
204 * Address register selection:
205 *
206 * addr | register
207 * ----------------------------
208 * 0 | front LED
209 * 1 | front LED brightness
210 * 2 | HDD LED brightness
211 * 3 | HDD1 LED
212 * 4 | HDD2 LED
213 * 5 | HDD3 LED
214 * 6 | HDD4 LED
215 * 7 | HDD5 LED
216 *
217 * Data register configuration:
218 *
219 * data | LED brightness
220 * -------------------------------------------------
221 * 0 | min (off)
222 * - | -
223 * 7 | max
224 *
225 * data | front LED mode
226 * -------------------------------------------------
227 * 0 | fix off
228 * 1 | fix blue on
229 * 2 | fix red on
230 * 3 | blink blue on=1 sec and blue off=1 sec
231 * 4 | blink red on=1 sec and red off=1 sec
232 * 5 | blink blue on=2.5 sec and red on=0.5 sec
233 * 6 | blink blue on=1 sec and red on=1 sec
234 * 7 | blink blue on=0.5 sec and blue off=2.5 sec
235 *
236 * data | HDD LED mode
237 * -------------------------------------------------
238 * 0 | fix blue on
239 * 1 | SATA activity blink
240 * 2 | fix red on
241 * 3 | blink blue on=1 sec and blue off=1 sec
242 * 4 | blink red on=1 sec and red off=1 sec
243 * 5 | blink blue on=2.5 sec and red on=0.5 sec
244 * 6 | blink blue on=1 sec and red on=1 sec
245 * 7 | blink blue on=0.5 sec and blue off=2.5 sec
246 */
247
248/*****************************************************************************
249 * Timer
250 ****************************************************************************/
251
252static void netxbig_v2_timer_init(void)
253{
254 kirkwood_tclk = 166666667;
255 orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
256}
257
258struct sys_timer netxbig_v2_timer = {
259 .init = netxbig_v2_timer_init,
260};
261
262/*****************************************************************************
263 * General Setup
264 ****************************************************************************/
265
266static unsigned int net2big_v2_mpp_config[] __initdata = {
267 MPP0_SPI_SCn,
268 MPP1_SPI_MOSI,
269 MPP2_SPI_SCK,
270 MPP3_SPI_MISO,
271 MPP6_SYSRST_OUTn,
272 MPP7_GPO, /* Request power-off */
273 MPP8_TW_SDA,
274 MPP9_TW_SCK,
275 MPP10_UART0_TXD,
276 MPP11_UART0_RXD,
277 MPP13_GPIO, /* Rear power switch (on|auto) */
278 MPP14_GPIO, /* USB fuse alarm */
279 MPP15_GPIO, /* Rear power switch (auto|off) */
280 MPP16_GPIO, /* SATA HDD1 power */
281 MPP17_GPIO, /* SATA HDD2 power */
282 MPP20_SATA1_ACTn,
283 MPP21_SATA0_ACTn,
284 MPP24_GPIO, /* USB mode select */
285 MPP26_GPIO, /* USB device vbus */
286 MPP28_GPIO, /* USB enable host vbus */
287 MPP29_GPIO, /* CPLD extension ALE */
288 MPP34_GPIO, /* Rear Push button */
289 MPP35_GPIO, /* Inhibit switch power-off */
290 MPP36_GPIO, /* SATA HDD1 presence */
291 MPP37_GPIO, /* SATA HDD2 presence */
292 MPP40_GPIO, /* eSATA presence */
293 MPP44_GPIO, /* CPLD extension (data 0) */
294 MPP45_GPIO, /* CPLD extension (data 1) */
295 MPP46_GPIO, /* CPLD extension (data 2) */
296 MPP47_GPIO, /* CPLD extension (addr 0) */
297 MPP48_GPIO, /* CPLD extension (addr 1) */
298 MPP49_GPIO, /* CPLD extension (addr 2) */
299 0
300};
301
302static unsigned int net5big_v2_mpp_config[] __initdata = {
303 MPP0_SPI_SCn,
304 MPP1_SPI_MOSI,
305 MPP2_SPI_SCK,
306 MPP3_SPI_MISO,
307 MPP6_SYSRST_OUTn,
308 MPP7_GPO, /* Request power-off */
309 MPP8_TW_SDA,
310 MPP9_TW_SCK,
311 MPP10_UART0_TXD,
312 MPP11_UART0_RXD,
313 MPP13_GPIO, /* Rear power switch (on|auto) */
314 MPP14_GPIO, /* USB fuse alarm */
315 MPP15_GPIO, /* Rear power switch (auto|off) */
316 MPP16_GPIO, /* SATA HDD1 power */
317 MPP17_GPIO, /* SATA HDD2 power */
318 MPP20_GE1_0,
319 MPP21_GE1_1,
320 MPP22_GE1_2,
321 MPP23_GE1_3,
322 MPP24_GE1_4,
323 MPP25_GE1_5,
324 MPP26_GE1_6,
325 MPP27_GE1_7,
326 MPP28_GPIO, /* USB enable host vbus */
327 MPP29_GPIO, /* CPLD extension ALE */
328 MPP30_GE1_10,
329 MPP31_GE1_11,
330 MPP32_GE1_12,
331 MPP33_GE1_13,
332 MPP34_GPIO, /* Rear Push button */
333 MPP35_GPIO, /* Inhibit switch power-off */
334 MPP36_GPIO, /* SATA HDD1 presence */
335 MPP37_GPIO, /* SATA HDD2 presence */
336 MPP38_GPIO, /* SATA HDD3 presence */
337 MPP39_GPIO, /* SATA HDD4 presence */
338 MPP40_GPIO, /* SATA HDD5 presence */
339 MPP41_GPIO, /* SATA HDD3 power */
340 MPP42_GPIO, /* SATA HDD4 power */
341 MPP43_GPIO, /* SATA HDD5 power */
342 MPP44_GPIO, /* CPLD extension (data 0) */
343 MPP45_GPIO, /* CPLD extension (data 1) */
344 MPP46_GPIO, /* CPLD extension (data 2) */
345 MPP47_GPIO, /* CPLD extension (addr 0) */
346 MPP48_GPIO, /* CPLD extension (addr 1) */
347 MPP49_GPIO, /* CPLD extension (addr 2) */
348 0
349};
350
351#define NETXBIG_V2_GPIO_POWER_OFF 7
352
353static void netxbig_v2_power_off(void)
354{
355 gpio_set_value(NETXBIG_V2_GPIO_POWER_OFF, 1);
356}
357
358static void __init netxbig_v2_init(void)
359{
360 /*
361 * Basic setup. Needs to be called early.
362 */
363 kirkwood_init();
364 if (machine_is_net2big_v2())
365 kirkwood_mpp_conf(net2big_v2_mpp_config);
366 else
367 kirkwood_mpp_conf(net5big_v2_mpp_config);
368
369 netxbig_v2_sata_power_init();
370
371 kirkwood_ehci_init();
372 kirkwood_ge00_init(&netxbig_v2_ge00_data);
373 if (machine_is_net5big_v2())
374 kirkwood_ge01_init(&netxbig_v2_ge01_data);
375 kirkwood_sata_init(&netxbig_v2_sata_data);
376 kirkwood_uart0_init();
377 spi_register_board_info(netxbig_v2_spi_slave_info,
378 ARRAY_SIZE(netxbig_v2_spi_slave_info));
379 kirkwood_spi_init();
380 kirkwood_i2c_init();
381 i2c_register_board_info(0, netxbig_v2_i2c_info,
382 ARRAY_SIZE(netxbig_v2_i2c_info));
383
384 platform_device_register(&netxbig_v2_gpio_buttons);
385
386 if (gpio_request(NETXBIG_V2_GPIO_POWER_OFF, "power-off") == 0 &&
387 gpio_direction_output(NETXBIG_V2_GPIO_POWER_OFF, 0) == 0)
388 pm_power_off = netxbig_v2_power_off;
389 else
390 pr_err("netxbig_v2: failed to configure power-off GPIO\n");
391}
392
393#ifdef CONFIG_MACH_NET2BIG_V2
394MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
395 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
396 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
397 .boot_params = 0x00000100,
398 .init_machine = netxbig_v2_init,
399 .map_io = kirkwood_map_io,
400 .init_irq = kirkwood_init_irq,
401 .timer = &netxbig_v2_timer,
402MACHINE_END
403#endif
404
405#ifdef CONFIG_MACH_NET5BIG_V2
406MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
407 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
408 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
409 .boot_params = 0x00000100,
410 .init_machine = netxbig_v2_init,
411 .map_io = kirkwood_map_io,
412 .init_irq = kirkwood_init_irq,
413 .timer = &netxbig_v2_timer,
414MACHINE_END
415#endif
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 421b82f7c63d..685f34a9634b 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -439,6 +439,7 @@ static void __init dns323_init(void)
439 */ 439 */
440 if (dns323_dev_id() == MV88F5181_DEV_ID) { 440 if (dns323_dev_id() == MV88F5181_DEV_ID) {
441 dns323_leds[0].active_low = 1; 441 dns323_leds[0].active_low = 1;
442 gpio_request(DNS323_GPIO_LED_POWER1, "Power Led Enable");
442 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0); 443 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
443 } 444 }
444 445