aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 13:39:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 13:39:26 -0500
commitdb5b0ae00712b5176d7405e7a1dd2bfd6e8f5070 (patch)
tree4e874d81ca9037dda1007178bbc9613649d43305 /arch/arm/mach-kirkwood
parent6be35c700f742e911ecedd07fcc43d4439922334 (diff)
parent64507dd7028e3e0145077e73b8374bd75aea117c (diff)
Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree conversions and enablement from Olof Johansson: "Continued device tree conversion and enablement across a number of platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other smaller series as well. ux500 has seen continued conversion for platforms. Several platforms have seen pinctrl-via-devicetree conversions for simpler multiplatform. Tegra is adding data for new devices/drivers, and Exynos has a bunch of new bindings and devices added as well. So, pretty much the same progression in the right direction as the last few releases." Fix up conflicts as per Olof. * tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (185 commits) ARM: ux500: Rename dbx500 cpufreq code to be more generic ARM: dts: add missing ux500 device trees ARM: ux500: Stop registering the PCM driver from platform code ARM: ux500: Move board specific GPIO info out to subordinate DTS files ARM: ux500: Disable the MMCI gpio-regulator by default ARM: Kirkwood: remove kirkwood_ehci_init() from new boards ARM: Kirkwood: Add support LED of OpenBlocks A6 ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6 ARM: kirkwood: Add NAND partiton map for OpenBlocks A6 ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6 ARM: kirkwood: Add support DT of second I2C bus ARM: kirkwood: Convert mplcec4 board to pinctrl ARM: Kirkwood: Convert km_kirkwood to pinctrl ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl ARM: Kirkwood: Convert IX2-200 to pinctrl. ARM: Kirkwood: Convert lsxl boards to pinctrl. ARM: Kirkwood: Convert ib62x0 to pinctrl. ARM: Kirkwood: Convert GoFlex Net to pinctrl. ARM: Kirkwood: Convert dreamplug to pinctrl. ARM: Kirkwood: Convert dockstar to pinctrl. ...
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/Kconfig5
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c54
-rw-r--r--arch/arm/mach-kirkwood/board-dockstar.c16
-rw-r--r--arch/arm/mach-kirkwood/board-dreamplug.c15
-rw-r--r--arch/arm/mach-kirkwood/board-goflexnet.c24
-rw-r--r--arch/arm/mach-kirkwood/board-ib62x0.c35
-rw-r--r--arch/arm/mach-kirkwood/board-iconnect.c18
-rw-r--r--arch/arm/mach-kirkwood/board-iomega_ix2_200.c26
-rw-r--r--arch/arm/mach-kirkwood/board-km_kirkwood.c13
-rw-r--r--arch/arm/mach-kirkwood/board-lsxl.c28
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c36
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c1
-rw-r--r--arch/arm/mach-kirkwood/board-nsa310.c4
-rw-r--r--arch/arm/mach-kirkwood/board-openblocks_a6.c5
-rw-r--r--arch/arm/mach-kirkwood/board-ts219.c26
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c1
16 files changed, 7 insertions, 300 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index d018ad4bcc3c..503d7dd944ff 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -46,6 +46,11 @@ config MACH_GURUPLUG
46 46
47config ARCH_KIRKWOOD_DT 47config 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
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
22static struct mv643xx_eth_platform_data dnskw_ge00_data = { 21static 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
26static 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
60static 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 */
66static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) 26static 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
77void __init dnskw_init(void) 37void __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 6912882b0aa9..d7196db33984 100644
--- a/arch/arm/mach-kirkwood/board-dockstar.c
+++ b/arch/arm/mach-kirkwood/board-dockstar.c
@@ -17,32 +17,16 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/mv643xx_eth.h> 19#include <linux/mv643xx_eth.h>
20#include <linux/gpio.h>
21#include "common.h" 20#include "common.h"
22#include "mpp.h"
23 21
24static struct mv643xx_eth_platform_data dockstar_ge00_data = { 22static struct mv643xx_eth_platform_data dockstar_ge00_data = {
25 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 23 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
26}; 24};
27 25
28static unsigned int dockstar_mpp_config[] __initdata = {
29 MPP29_GPIO, /* USB Power Enable */
30 MPP46_GPIO, /* LED green */
31 MPP47_GPIO, /* LED orange */
32 0
33};
34
35void __init dockstar_dt_init(void) 26void __init dockstar_dt_init(void)
36{ 27{
37 /* 28 /*
38 * Basic setup. Needs to be called early. 29 * Basic setup. Needs to be called early.
39 */ 30 */
40 kirkwood_mpp_conf(dockstar_mpp_config);
41
42 if (gpio_request(29, "USB Power Enable") != 0 ||
43 gpio_direction_output(29, 1) != 0)
44 pr_err("can't setup GPIO 29 (USB Power Enable)\n");
45 kirkwood_ehci_init();
46
47 kirkwood_ge00_init(&dockstar_ge00_data); 31 kirkwood_ge00_init(&dockstar_ge00_data);
48} 32}
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
index 8a8ebe09e512..08248e24ffcd 100644
--- a/arch/arm/mach-kirkwood/board-dreamplug.c
+++ b/arch/arm/mach-kirkwood/board-dreamplug.c
@@ -17,7 +17,6 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/platform_data/mmc-mvsdio.h> 18#include <linux/platform_data/mmc-mvsdio.h>
19#include "common.h" 19#include "common.h"
20#include "mpp.h"
21 20
22static struct mv643xx_eth_platform_data dreamplug_ge00_data = { 21static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
23 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 22 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
@@ -31,25 +30,11 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = {
31 /* unfortunately the CD signal has not been connected */ 30 /* unfortunately the CD signal has not been connected */
32}; 31};
33 32
34static unsigned int dreamplug_mpp_config[] __initdata = {
35 MPP0_SPI_SCn,
36 MPP1_SPI_MOSI,
37 MPP2_SPI_SCK,
38 MPP3_SPI_MISO,
39 MPP47_GPIO, /* Bluetooth LED */
40 MPP48_GPIO, /* Wifi LED */
41 MPP49_GPIO, /* Wifi AP LED */
42 0
43};
44
45void __init dreamplug_init(void) 33void __init dreamplug_init(void)
46{ 34{
47 /* 35 /*
48 * Basic setup. Needs to be called early. 36 * Basic setup. Needs to be called early.
49 */ 37 */
50 kirkwood_mpp_conf(dreamplug_mpp_config);
51
52 kirkwood_ehci_init();
53 kirkwood_ge00_init(&dreamplug_ge00_data); 38 kirkwood_ge00_init(&dreamplug_ge00_data);
54 kirkwood_ge01_init(&dreamplug_ge01_data); 39 kirkwood_ge01_init(&dreamplug_ge01_data);
55 kirkwood_sdio_init(&dreamplug_mvsdio_data); 40 kirkwood_sdio_init(&dreamplug_mvsdio_data);
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c
index 5dcd0d62aa42..9db979aec82e 100644
--- a/arch/arm/mach-kirkwood/board-goflexnet.c
+++ b/arch/arm/mach-kirkwood/board-goflexnet.c
@@ -19,40 +19,16 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/mv643xx_eth.h> 21#include <linux/mv643xx_eth.h>
22#include <linux/gpio.h>
23#include "common.h" 22#include "common.h"
24#include "mpp.h"
25 23
26static struct mv643xx_eth_platform_data goflexnet_ge00_data = { 24static struct mv643xx_eth_platform_data goflexnet_ge00_data = {
27 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 25 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
28}; 26};
29 27
30static unsigned int goflexnet_mpp_config[] __initdata = {
31 MPP29_GPIO, /* USB Power Enable */
32 MPP47_GPIO, /* LED Orange */
33 MPP46_GPIO, /* LED Green */
34 MPP45_GPIO, /* LED Left Capacity 3 */
35 MPP44_GPIO, /* LED Left Capacity 2 */
36 MPP43_GPIO, /* LED Left Capacity 1 */
37 MPP42_GPIO, /* LED Left Capacity 0 */
38 MPP41_GPIO, /* LED Right Capacity 3 */
39 MPP40_GPIO, /* LED Right Capacity 2 */
40 MPP39_GPIO, /* LED Right Capacity 1 */
41 MPP38_GPIO, /* LED Right Capacity 0 */
42 0
43};
44
45void __init goflexnet_init(void) 28void __init goflexnet_init(void)
46{ 29{
47 /* 30 /*
48 * Basic setup. Needs to be called early. 31 * Basic setup. Needs to be called early.
49 */ 32 */
50 kirkwood_mpp_conf(goflexnet_mpp_config);
51
52 if (gpio_request(29, "USB Power Enable") != 0 ||
53 gpio_direction_output(29, 1) != 0)
54 pr_err("can't setup GPIO 29 (USB Power Enable)\n");
55 kirkwood_ehci_init();
56
57 kirkwood_ge00_init(&goflexnet_ge00_data); 33 kirkwood_ge00_init(&goflexnet_ge00_data);
58} 34}
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c
index 6d3a56421142..9f6f496380d8 100644
--- a/arch/arm/mach-kirkwood/board-ib62x0.c
+++ b/arch/arm/mach-kirkwood/board-ib62x0.c
@@ -14,52 +14,17 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/gpio.h>
18#include <linux/input.h> 17#include <linux/input.h>
19#include "common.h" 18#include "common.h"
20#include "mpp.h"
21
22#define IB62X0_GPIO_POWER_OFF 24
23 19
24static struct mv643xx_eth_platform_data ib62x0_ge00_data = { 20static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
25 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 21 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
26}; 22};
27 23
28static unsigned int ib62x0_mpp_config[] __initdata = {
29 MPP0_NF_IO2,
30 MPP1_NF_IO3,
31 MPP2_NF_IO4,
32 MPP3_NF_IO5,
33 MPP4_NF_IO6,
34 MPP5_NF_IO7,
35 MPP18_NF_IO0,
36 MPP19_NF_IO1,
37 MPP22_GPIO, /* OS LED red */
38 MPP24_GPIO, /* Power off device */
39 MPP25_GPIO, /* OS LED green */
40 MPP27_GPIO, /* USB transfer LED */
41 MPP28_GPIO, /* Reset button */
42 MPP29_GPIO, /* USB Copy button */
43 0
44};
45
46static void ib62x0_power_off(void)
47{
48 gpio_set_value(IB62X0_GPIO_POWER_OFF, 1);
49}
50
51void __init ib62x0_init(void) 24void __init ib62x0_init(void)
52{ 25{
53 /* 26 /*
54 * Basic setup. Needs to be called early. 27 * Basic setup. Needs to be called early.
55 */ 28 */
56 kirkwood_mpp_conf(ib62x0_mpp_config);
57
58 kirkwood_ehci_init();
59 kirkwood_ge00_init(&ib62x0_ge00_data); 29 kirkwood_ge00_init(&ib62x0_ge00_data);
60 if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&
61 gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0)
62 pm_power_off = ib62x0_power_off;
63 else
64 pr_err("board-ib62x0: failed to configure power-off GPIO\n");
65} 30}
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index 24f5aa7f698b..c8ebde4919e2 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -13,31 +13,13 @@
13#include <linux/of.h> 13#include <linux/of.h>
14#include <linux/mv643xx_eth.h> 14#include <linux/mv643xx_eth.h>
15#include "common.h" 15#include "common.h"
16#include "mpp.h"
17 16
18static struct mv643xx_eth_platform_data iconnect_ge00_data = { 17static struct mv643xx_eth_platform_data iconnect_ge00_data = {
19 .phy_addr = MV643XX_ETH_PHY_ADDR(11), 18 .phy_addr = MV643XX_ETH_PHY_ADDR(11),
20}; 19};
21 20
22static unsigned int iconnect_mpp_config[] __initdata = {
23 MPP12_GPIO,
24 MPP35_GPIO,
25 MPP41_GPIO,
26 MPP42_GPIO,
27 MPP43_GPIO,
28 MPP44_GPIO,
29 MPP45_GPIO,
30 MPP46_GPIO,
31 MPP47_GPIO,
32 MPP48_GPIO,
33 0
34};
35
36void __init iconnect_init(void) 21void __init iconnect_init(void)
37{ 22{
38 kirkwood_mpp_conf(iconnect_mpp_config);
39
40 kirkwood_ehci_init();
41 kirkwood_ge00_init(&iconnect_ge00_data); 23 kirkwood_ge00_init(&iconnect_ge00_data);
42} 24}
43 25
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
index e4ed62c28f54..f655b2637b0e 100644
--- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
+++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
@@ -13,7 +13,6 @@
13#include <linux/mv643xx_eth.h> 13#include <linux/mv643xx_eth.h>
14#include <linux/ethtool.h> 14#include <linux/ethtool.h>
15#include "common.h" 15#include "common.h"
16#include "mpp.h"
17 16
18static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = { 17static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
19 .phy_addr = MV643XX_ETH_PHY_NONE, 18 .phy_addr = MV643XX_ETH_PHY_NONE,
@@ -21,35 +20,10 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
21 .duplex = DUPLEX_FULL, 20 .duplex = DUPLEX_FULL,
22}; 21};
23 22
24static unsigned int iomega_ix2_200_mpp_config[] __initdata = {
25 MPP12_GPIO, /* Reset Button */
26 MPP14_GPIO, /* Power Button */
27 MPP15_GPIO, /* Backup LED (blue) */
28 MPP16_GPIO, /* Power LED (white) */
29 MPP35_GPIO, /* OTB Button */
30 MPP36_GPIO, /* Rebuild LED (white) */
31 MPP37_GPIO, /* Health LED (red) */
32 MPP38_GPIO, /* SATA LED brightness control 1 */
33 MPP39_GPIO, /* SATA LED brightness control 2 */
34 MPP40_GPIO, /* Backup LED brightness control 1 */
35 MPP41_GPIO, /* Backup LED brightness control 2 */
36 MPP42_GPIO, /* Power LED brightness control 1 */
37 MPP43_GPIO, /* Power LED brightness control 2 */
38 MPP44_GPIO, /* Health LED brightness control 1 */
39 MPP45_GPIO, /* Health LED brightness control 2 */
40 MPP46_GPIO, /* Rebuild LED brightness control 1 */
41 MPP47_GPIO, /* Rebuild LED brightness control 2 */
42 0
43};
44
45void __init iomega_ix2_200_init(void) 23void __init iomega_ix2_200_init(void)
46{ 24{
47 /* 25 /*
48 * Basic setup. Needs to be called early. 26 * Basic setup. Needs to be called early.
49 */ 27 */
50 kirkwood_mpp_conf(iomega_ix2_200_mpp_config);
51
52 kirkwood_ehci_init();
53
54 kirkwood_ge01_init(&iomega_ix2_200_ge00_data); 28 kirkwood_ge01_init(&iomega_ix2_200_ge00_data);
55} 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
23static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = { 22static 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
27static unsigned int km_kirkwood_mpp_config[] __initdata = {
28 MPP8_GPIO, /* I2C SDA */
29 MPP9_GPIO, /* I2C SCL */
30 0
31};
32
33void __init km_kirkwood_init(void) 26void __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 7e18cad9b796..4ec8b7ae784a 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -15,9 +15,7 @@
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/mv643xx_eth.h> 17#include <linux/mv643xx_eth.h>
18#include <linux/gpio.h>
19#include "common.h" 18#include "common.h"
20#include "mpp.h"
21 19
22static struct mv643xx_eth_platform_data lsxl_ge00_data = { 20static struct mv643xx_eth_platform_data lsxl_ge00_data = {
23 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 21 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
@@ -27,23 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
27 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 25 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
28}; 26};
29 27
30static unsigned int lsxl_mpp_config[] __initdata = {
31 MPP10_GPO, /* HDD Power Enable */
32 MPP11_GPIO, /* USB Vbus Enable */
33 MPP18_GPO, /* FAN High Enable# */
34 MPP19_GPO, /* FAN Low Enable# */
35 MPP36_GPIO, /* Function Blue LED */
36 MPP37_GPIO, /* Alarm LED */
37 MPP38_GPIO, /* Info LED */
38 MPP39_GPIO, /* Power LED */
39 MPP40_GPIO, /* Fan Lock */
40 MPP41_GPIO, /* Function Button */
41 MPP42_GPIO, /* Power Switch */
42 MPP43_GPIO, /* Power Auto Switch */
43 MPP48_GPIO, /* Function Red LED */
44 0
45};
46
47/* 28/*
48 * On the LS-XHL/LS-CHLv2, the shutdown process is following: 29 * On the LS-XHL/LS-CHLv2, the shutdown process is following:
49 * - 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
@@ -57,21 +38,12 @@ static void lsxl_power_off(void)
57 kirkwood_restart('h', NULL); 38 kirkwood_restart('h', NULL);
58} 39}
59 40
60#define LSXL_GPIO_HDD_POWER 10
61#define LSXL_GPIO_USB_POWER 11
62
63void __init lsxl_init(void) 41void __init lsxl_init(void)
64{ 42{
65 /* 43 /*
66 * Basic setup. Needs to be called early. 44 * Basic setup. Needs to be called early.
67 */ 45 */
68 kirkwood_mpp_conf(lsxl_mpp_config);
69
70 /* usb and sata power on */
71 gpio_set_value(LSXL_GPIO_USB_POWER, 1);
72 gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
73 46
74 kirkwood_ehci_init();
75 kirkwood_ge00_init(&lsxl_ge00_data); 47 kirkwood_ge00_init(&lsxl_ge00_data);
76 kirkwood_ge01_init(&lsxl_ge01_data); 48 kirkwood_ge01_init(&lsxl_ge01_data);
77 49
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
index e78a227468e6..56bfe5a1605a 100644
--- a/arch/arm/mach-kirkwood/board-mplcec4.c
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -24,52 +24,16 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(2), 24 .phy_addr = MV643XX_ETH_PHY_ADDR(2),
25}; 25};
26 26
27static unsigned int mplcec4_mpp_config[] __initdata = {
28 MPP0_NF_IO2,
29 MPP1_NF_IO3,
30 MPP2_NF_IO4,
31 MPP3_NF_IO5,
32 MPP4_NF_IO6,
33 MPP5_NF_IO7,
34 MPP6_SYSRST_OUTn,
35 MPP7_GPO, /* Status LED Green High Active */
36 MPP10_UART0_TXD,
37 MPP11_UART0_RXD,
38 MPP12_SD_CLK,
39 MPP13_SD_CMD, /* Alt UART1_TXD */
40 MPP14_SD_D0, /* Alt UART1_RXD */
41 MPP15_SD_D1,
42 MPP16_SD_D2,
43 MPP17_SD_D3,
44 MPP18_NF_IO0,
45 MPP19_NF_IO1,
46 MPP28_GPIO, /* Input SYS_POR_DET (active High) */
47 MPP29_GPIO, /* Input SYS_RTC_INT (active High) */
48 MPP34_SATA1_ACTn,
49 MPP35_SATA0_ACTn,
50 MPP40_GPIO, /* LED User1 orange */
51 MPP41_GPIO, /* LED User1 green */
52 MPP44_GPIO, /* LED User0 orange */
53 MPP45_GPIO, /* LED User0 green */
54 MPP46_GPIO, /* Status LED Yellow High Active */
55 MPP47_GPIO, /* SD_CD# (in/IRQ)*/
56 0
57};
58
59
60static struct mvsdio_platform_data mplcec4_mvsdio_data = { 27static struct mvsdio_platform_data mplcec4_mvsdio_data = {
61 .gpio_card_detect = 47, /* MPP47 used as SD card detect */ 28 .gpio_card_detect = 47, /* MPP47 used as SD card detect */
62}; 29};
63 30
64 31
65
66void __init mplcec4_init(void) 32void __init mplcec4_init(void)
67{ 33{
68 /* 34 /*
69 * Basic setup. Needs to be called early. 35 * Basic setup. Needs to be called early.
70 */ 36 */
71 kirkwood_mpp_conf(mplcec4_mpp_config);
72 kirkwood_ehci_init();
73 kirkwood_ge00_init(&mplcec4_ge00_data); 37 kirkwood_ge00_init(&mplcec4_ge00_data);
74 kirkwood_ge01_init(&mplcec4_ge01_data); 38 kirkwood_ge01_init(&mplcec4_ge01_data);
75 kirkwood_sdio_init(&mplcec4_mvsdio_data); 39 kirkwood_sdio_init(&mplcec4_mvsdio_data);
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index 78596c4f76d2..8821720ab5a4 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -73,7 +73,6 @@ void __init ns2_init(void)
73 */ 73 */
74 kirkwood_mpp_conf(ns2_mpp_config); 74 kirkwood_mpp_conf(ns2_mpp_config);
75 75
76 kirkwood_ehci_init();
77 if (of_machine_is_compatible("lacie,netspace_lite_v2") || 76 if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
78 of_machine_is_compatible("lacie,netspace_mini_v2")) 77 of_machine_is_compatible("lacie,netspace_mini_v2"))
79 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 78 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
index 027ce83f3fe5..f58d2e1a4042 100644
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -85,10 +85,6 @@ void __init nsa310_init(void)
85 85
86 nsa310_gpio_init(); 86 nsa310_gpio_init();
87 87
88 /* this can be removed once the mainline kirkwood.dtsi gets
89 * the ehci configuration by default */
90 kirkwood_ehci_init();
91
92 kirkwood_pcie_id(&dev, &rev); 88 kirkwood_pcie_id(&dev, &rev);
93 89
94 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); 90 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c
index e807e8cfdd44..815fc6451d52 100644
--- a/arch/arm/mach-kirkwood/board-openblocks_a6.c
+++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c
@@ -55,8 +55,8 @@ static unsigned int openblocks_a6_mpp_config[] __initdata = {
55 MPP38_GPIO, /* INIT */ 55 MPP38_GPIO, /* INIT */
56 MPP39_GPIO, /* USB OC */ 56 MPP39_GPIO, /* USB OC */
57 MPP41_GPIO, /* LED: Red */ 57 MPP41_GPIO, /* LED: Red */
58 MPP42_GPIO, /* LED: Yellow */ 58 MPP42_GPIO, /* LED: Green */
59 MPP43_GPIO, /* LED: Green */ 59 MPP43_GPIO, /* LED: Yellow */
60 0, 60 0,
61}; 61};
62 62
@@ -66,6 +66,5 @@ void __init openblocks_a6_init(void)
66 * Basic setup. Needs to be called early. 66 * Basic setup. Needs to be called early.
67 */ 67 */
68 kirkwood_mpp_conf(openblocks_a6_mpp_config); 68 kirkwood_mpp_conf(openblocks_a6_mpp_config);
69 kirkwood_ehci_init();
70 kirkwood_ge00_init(&openblocks_ge00_data); 69 kirkwood_ge00_init(&openblocks_ge00_data);
71} 70}
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index f3bfedae3a20..acb0187c7ee1 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -23,47 +23,21 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <mach/kirkwood.h> 24#include <mach/kirkwood.h>
25#include "common.h" 25#include "common.h"
26#include "mpp.h"
27#include "tsx1x-common.h" 26#include "tsx1x-common.h"
28 27
29static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { 28static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = {
30 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 29 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
31}; 30};
32 31
33static unsigned int qnap_ts219_mpp_config[] __initdata = {
34 MPP0_SPI_SCn,
35 MPP1_SPI_MOSI,
36 MPP2_SPI_SCK,
37 MPP3_SPI_MISO,
38 MPP4_SATA1_ACTn,
39 MPP5_SATA0_ACTn,
40 MPP8_TW0_SDA,
41 MPP9_TW0_SCK,
42 MPP10_UART0_TXD,
43 MPP11_UART0_RXD,
44 MPP13_UART1_TXD, /* PIC controller */
45 MPP14_UART1_RXD, /* PIC controller */
46 MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */
47 MPP16_GPIO, /* Reset button (on devices with 88F6281) */
48 MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */
49 MPP37_GPIO, /* Reset button (on devices with 88F6282) */
50 MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */
51 MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */
52 0
53};
54
55void __init qnap_dt_ts219_init(void) 32void __init qnap_dt_ts219_init(void)
56{ 33{
57 u32 dev, rev; 34 u32 dev, rev;
58 35
59 kirkwood_mpp_conf(qnap_ts219_mpp_config);
60
61 kirkwood_pcie_id(&dev, &rev); 36 kirkwood_pcie_id(&dev, &rev);
62 if (dev == MV88F6282_DEV_ID) 37 if (dev == MV88F6282_DEV_ID)
63 qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 38 qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
64 39
65 kirkwood_ge00_init(&qnap_ts219_ge00_data); 40 kirkwood_ge00_init(&qnap_ts219_ge00_data);
66 kirkwood_ehci_init();
67 41
68 pm_power_off = qnap_tsx1x_power_off; 42 pm_power_off = qnap_tsx1x_power_off;
69} 43}
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index e2ec9d891fe3..15e69fcde9f4 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -76,7 +76,6 @@ void __init usi_topkick_init(void)
76 /* SATA0 power enable */ 76 /* SATA0 power enable */
77 gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); 77 gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
78 78
79 kirkwood_ehci_init();
80 kirkwood_ge00_init(&topkick_ge00_data); 79 kirkwood_ge00_init(&topkick_ge00_data);
81 kirkwood_sdio_init(&topkick_mvsdio_data); 80 kirkwood_sdio_init(&topkick_mvsdio_data);
82} 81}