aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorStefan Peter <s.peter@mpl.ch>2012-11-18 10:46:16 -0500
committerJason Cooper <jason@lakedaemon.net>2012-11-21 16:00:23 -0500
commit5492a1108bbd40e14a895c07b6a4952022e82f7c (patch)
tree1a5258cb245123997fae87a5d2e9e0cc03fb6d8b /arch/arm/mach-kirkwood
parentafcad884252b171ff6f2ac78eb43c2f5db612dd0 (diff)
ARM: kirkwood: Add support for the MPL CEC4
Signed-off-by: Stefan Peter <s.peter@mpl.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c80
-rw-r--r--arch/arm/mach-kirkwood/common.h6
5 files changed, 98 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index a5b766e13304..141b105ce8d9 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -137,6 +137,13 @@ config MACH_INETSPACE_V2_DT
137 Say 'Y' here if you want your kernel to support the LaCie 137 Say 'Y' here if you want your kernel to support the LaCie
138 Internet Space v2 NAS, using Flattened Device Tree. 138 Internet Space v2 NAS, using Flattened Device Tree.
139 139
140config MACH_MPLCEC4_DT
141 bool "MPL CEC4 (Flattened Device Tree)"
142 select ARCH_KIRKWOOD_DT
143 help
144 Say 'Y' here if you want your kernel to support the
145 MPL CEC4 (Flattened Device Tree).
146
140config MACH_NETSPACE_V2_DT 147config MACH_NETSPACE_V2_DT
141 bool "LaCie Network Space v2 NAS (Flattened Device Tree)" 148 bool "LaCie Network Space v2 NAS (Flattened Device Tree)"
142 select ARCH_KIRKWOOD_DT 149 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 8f7a34040af3..b5bc33467590 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
32obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o 32obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
33obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o 33obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
34obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o 34obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o
35obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
35obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o 36obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
36obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o 37obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
37obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o 38obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 87c53d175d35..33c0bc1e2f3a 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -103,6 +103,9 @@ static void __init kirkwood_dt_init(void)
103 of_machine_is_compatible("lacie,netspace_mini_v2")) 103 of_machine_is_compatible("lacie,netspace_mini_v2"))
104 ns2_init(); 104 ns2_init();
105 105
106 if (of_machine_is_compatible("mpl,cec4"))
107 mplcec4_init();
108
106 if (of_machine_is_compatible("usi,topkick")) 109 if (of_machine_is_compatible("usi,topkick"))
107 usi_topkick_init(); 110 usi_topkick_init();
108 111
@@ -130,6 +133,7 @@ static const char *kirkwood_dt_board_compat[] = {
130 "lacie,netspace_v2", 133 "lacie,netspace_v2",
131 "lacie,netspace_lite_v2", 134 "lacie,netspace_lite_v2",
132 "lacie,netspace_mini_v2", 135 "lacie,netspace_mini_v2",
136 "mpl,cec4",
133 "usi,topkick", 137 "usi,topkick",
134 "zyxel,nsa310", 138 "zyxel,nsa310",
135 NULL 139 NULL
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
new file mode 100644
index 000000000000..e78a227468e6
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -0,0 +1,80 @@
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
19static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
21};
22
23static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(2),
25};
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 = {
61 .gpio_card_detect = 47, /* MPP47 used as SD card detect */
62};
63
64
65
66void __init mplcec4_init(void)
67{
68 /*
69 * Basic setup. Needs to be called early.
70 */
71 kirkwood_mpp_conf(mplcec4_mpp_config);
72 kirkwood_ehci_init();
73 kirkwood_ge00_init(&mplcec4_ge00_data);
74 kirkwood_ge01_init(&mplcec4_ge01_data);
75 kirkwood_sdio_init(&mplcec4_mvsdio_data);
76 kirkwood_pcie_init(KW_PCIE0);
77}
78
79
80
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 652a7282cdb3..f86fcced0bb1 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -112,6 +112,12 @@ void km_kirkwood_init(void);
112static inline void km_kirkwood_init(void) {}; 112static inline void km_kirkwood_init(void) {};
113#endif 113#endif
114 114
115#ifdef CONFIG_MACH_MPLCEC4_DT
116void mplcec4_init(void);
117#else
118static inline void mplcec4_init(void) {};
119#endif
120
115#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ 121#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
116 defined(CONFIG_MACH_NETSPACE_V2_DT) || \ 122 defined(CONFIG_MACH_NETSPACE_V2_DT) || \
117 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ 123 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \