aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2012-08-14 16:43:41 -0400
committerJason Cooper <jason@lakedaemon.net>2012-09-21 11:12:59 -0400
commitdd88db78daafb008b8e732dc1224812c93dc228a (patch)
tree8db5b99bd20e45240f6e6d1c987dc333e763f4fe
parent4f48b7fc5ab6286ab4a9522928aa1acc163a4bf3 (diff)
ARM: kirkwood: DT board setup for Seagate FreeAgent Dockstar
This add a DT compatible board specific setup for the Seagate FreeAgent Dockstar. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dockstar.c61
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/common.h6
5 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 76bc8473f1a1..d033b7acead7 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -94,6 +94,13 @@ config MACH_TS219_DT
94 or MV6282. If you have the wrong one, the buttons will not 94 or MV6282. If you have the wrong one, the buttons will not
95 work. 95 work.
96 96
97config MACH_DOCKSTAR_DT
98 bool "Seagate FreeAgent Dockstar (Flattened Device Tree)"
99 select ARCH_KIRKWOOD_DT
100 help
101 Say 'Y' here if you want your kernel to support the
102 Seagate FreeAgent Dockstar (Flattened Device Tree).
103
97config MACH_GOFLEXNET_DT 104config MACH_GOFLEXNET_DT
98 bool "Seagate GoFlex Net (Flattened Device Tree)" 105 bool "Seagate GoFlex Net (Flattened Device Tree)"
99 select ARCH_KIRKWOOD_DT 106 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index f5484dcca9fc..d809cd542a00 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
26obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 26obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
27obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o 27obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o
28obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o 28obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o
29obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
29obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o 30obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o
30obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o 31obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
31obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o 32obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c
new file mode 100644
index 000000000000..6beff21b4a0d
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-dockstar.c
@@ -0,0 +1,61 @@
1/*
2 * arch/arm/mach-kirkwood/board-dockstar.c
3 *
4 * Seagate FreeAgent Dockstar Board Init for drivers not converted to
5 * flattened device tree yet.
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 * Copied and modified for Seagate GoFlex Net support by
12 * Joshua Coombs <josh.coombs@gmail.com> based on ArchLinux ARM's
13 * GoFlex kernel patches.
14 *
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/ata_platform.h>
21#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 <plat/mvsdio.h>
34#include "common.h"
35#include "mpp.h"
36
37static struct mv643xx_eth_platform_data dockstar_ge00_data = {
38 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
39};
40
41static 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
48void __init dockstar_dt_init(void)
49{
50 /*
51 * Basic setup. Needs to be called early.
52 */
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);
61}
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 9b3ec175e40b..30a4caa2b76c 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -81,6 +81,9 @@ static void __init kirkwood_dt_init(void)
81 if (of_machine_is_compatible("qnap,ts219")) 81 if (of_machine_is_compatible("qnap,ts219"))
82 qnap_dt_ts219_init(); 82 qnap_dt_ts219_init();
83 83
84 if (of_machine_is_compatible("seagate,dockstar"))
85 dockstar_dt_init();
86
84 if (of_machine_is_compatible("seagate,goflexnet")) 87 if (of_machine_is_compatible("seagate,goflexnet"))
85 goflexnet_init(); 88 goflexnet_init();
86 89
@@ -101,6 +104,7 @@ static const char *kirkwood_dt_board_compat[] = {
101 "iom,iconnect", 104 "iom,iconnect",
102 "raidsonic,ib-nas62x0", 105 "raidsonic,ib-nas62x0",
103 "qnap,ts219", 106 "qnap,ts219",
107 "seagate,dockstar",
104 "seagate,goflexnet", 108 "seagate,goflexnet",
105 "buffalo,lsxl", 109 "buffalo,lsxl",
106 "iom,ix2-200", 110 "iom,ix2-200",
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index d5d406469b74..8f2520fa0562 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -82,6 +82,12 @@ void ib62x0_init(void);
82static inline void ib62x0_init(void) {}; 82static inline void ib62x0_init(void) {};
83#endif 83#endif
84 84
85#ifdef CONFIG_MACH_DOCKSTAR_DT
86void dockstar_dt_init(void);
87#else
88static inline void dockstar_dt_init(void) {};
89#endif
90
85#ifdef CONFIG_MACH_GOFLEXNET_DT 91#ifdef CONFIG_MACH_GOFLEXNET_DT
86void goflexnet_init(void); 92void goflexnet_init(void);
87#else 93#else