diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-27 19:27:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-27 19:27:28 -0400 |
commit | 1bfecd935849a45b6b47d9f011e1c278ff880512 (patch) | |
tree | 23c08a9c103c92e5a4a4cd3311823426c9d2bdf9 /arch/arm/mach-kirkwood | |
parent | 281b05392fc2cb26209b4d85abaf4889ab1991f3 (diff) | |
parent | a754a87ce8b17024358c1be8ee0232ef09a7055f (diff) |
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
"These changes are all specific to one board only. We're trying to
keep the number of board files low, but generally board level updates
are ok on platforms that are working on moving towards DT based
probing, which will eventually lead to removing them.
The board-ams-delta.c board file gets a conflict between the removal
of ams_delta_config and the addition of a lot of other data. The
Kconfig file has two changes in the same line, and in exynos, the
power domain cleanup conflicts with the addition of the image sensor
device.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[olof: Amended a fix for a mismerge to board-omap4panda.c]
Signed-off-by: Olof Johansson <olof@lixom.net>"
Fixed up some fairly trivial conflicts manually.
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
i.MX35-PDK: Add Camera support
ARM : mx35: 3ds-board: add framebuffer device
pxa/hx4700: Remove pcmcia platform_device structure
ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
ARM: pxa/hx4700: Remove unwanted request for GPIO105
ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
ARM: EXYNOS: Register JPEG on nuri
ARM: EXYNOS: Register JPEG on universal_c210
ARM: S5PV210: Enable JPEG on SMDKV210
ARM: S5PV210: Add JPEG board definition
ARM: EXYNOS: Enable JPEG on Origen
ARM: EXYNOS: Enable JPEG on SMDKV310
ARM: EXYNOS: Add __init attribute to universal_camera_init()
ARM: EXYNOS: Add __init attribute to nuri_camera_init()
ARM: S5PV210: Enable FIMC on SMDKC110
ARM: S5PV210: Enable FIMC on SMDKV210
ARM: S5PV210: Enable MFC on SMDKC110
ARM: S5PV210: Enable MFC on SMDKV210
ARM: EXYNOS: Enable G2D on SMDKV310
ARM: tegra: update defconfig
...
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/Kconfig | 14 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile.boot | 2 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 180 |
4 files changed, 197 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 7fc603b4689..90ceab76192 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -44,6 +44,20 @@ config MACH_GURUPLUG | |||
44 | Say 'Y' here if you want your kernel to support the | 44 | Say 'Y' here if you want your kernel to support the |
45 | Marvell GuruPlug Reference Board. | 45 | Marvell GuruPlug Reference Board. |
46 | 46 | ||
47 | config ARCH_KIRKWOOD_DT | ||
48 | bool "Marvell Kirkwood Flattened Device Tree" | ||
49 | select USE_OF | ||
50 | help | ||
51 | Say 'Y' here if you want your kernel to support the | ||
52 | Marvell Kirkwood using flattened device tree. | ||
53 | |||
54 | config MACH_DREAMPLUG_DT | ||
55 | bool "Marvell DreamPlug (Flattened Device Tree)" | ||
56 | select ARCH_KIRKWOOD_DT | ||
57 | help | ||
58 | Say 'Y' here if you want your kernel to support the | ||
59 | Marvell DreamPlug (Flattened Device Tree). | ||
60 | |||
47 | config MACH_TS219 | 61 | config MACH_TS219 |
48 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | 62 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" |
49 | help | 63 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 5dcaa81a2ec..acbc5e1db06 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | |||
20 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o | 20 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o |
21 | 21 | ||
22 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 22 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
23 | obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o | ||
diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot index 760a0efe758..16f93852230 100644 --- a/arch/arm/mach-kirkwood/Makefile.boot +++ b/arch/arm/mach-kirkwood/Makefile.boot | |||
@@ -1,3 +1,5 @@ | |||
1 | zreladdr-y += 0x00008000 | 1 | zreladdr-y += 0x00008000 |
2 | params_phys-y := 0x00000100 | 2 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 3 | initrd_phys-y := 0x00800000 |
4 | |||
5 | dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c new file mode 100644 index 00000000000..fbe6405602e --- /dev/null +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> | ||
3 | * | ||
4 | * arch/arm/mach-kirkwood/board-dt.c | ||
5 | * | ||
6 | * Marvell DreamPlug Reference Board Setup | ||
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/platform_device.h> | ||
16 | #include <linux/mtd/partitions.h> | ||
17 | #include <linux/ata_platform.h> | ||
18 | #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> | ||
25 | #include <linux/leds.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <linux/spi/flash.h> | ||
28 | #include <linux/spi/spi.h> | ||
29 | #include <linux/spi/orion_spi.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <mach/kirkwood.h> | ||
33 | #include <plat/mvsdio.h> | ||
34 | #include "common.h" | ||
35 | #include "mpp.h" | ||
36 | |||
37 | static struct of_device_id kirkwood_dt_match_table[] __initdata = { | ||
38 | { .compatible = "simple-bus", }, | ||
39 | { } | ||
40 | }; | ||
41 | |||
42 | struct mtd_partition dreamplug_partitions[] = { | ||
43 | { | ||
44 | .name = "u-boot", | ||
45 | .size = SZ_512K, | ||
46 | .offset = 0, | ||
47 | }, | ||
48 | { | ||
49 | .name = "u-boot env", | ||
50 | .size = SZ_64K, | ||
51 | .offset = SZ_512K + SZ_512K, | ||
52 | }, | ||
53 | { | ||
54 | .name = "dtb", | ||
55 | .size = SZ_64K, | ||
56 | .offset = SZ_512K + SZ_512K + SZ_512K, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | static const struct flash_platform_data dreamplug_spi_slave_data = { | ||
61 | .type = "mx25l1606e", | ||
62 | .name = "spi_flash", | ||
63 | .parts = dreamplug_partitions, | ||
64 | .nr_parts = ARRAY_SIZE(dreamplug_partitions), | ||
65 | }; | ||
66 | |||
67 | static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { | ||
68 | { | ||
69 | .modalias = "m25p80", | ||
70 | .platform_data = &dreamplug_spi_slave_data, | ||
71 | .irq = -1, | ||
72 | .max_speed_hz = 50000000, | ||
73 | .bus_num = 0, | ||
74 | .chip_select = 0, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | ||
79 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
80 | }; | ||
81 | |||
82 | static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | ||
83 | .phy_addr = MV643XX_ETH_PHY_ADDR(1), | ||
84 | }; | ||
85 | |||
86 | static struct mv_sata_platform_data dreamplug_sata_data = { | ||
87 | .n_ports = 1, | ||
88 | }; | ||
89 | |||
90 | static struct mvsdio_platform_data dreamplug_mvsdio_data = { | ||
91 | /* unfortunately the CD signal has not been connected */ | ||
92 | }; | ||
93 | |||
94 | static struct gpio_led dreamplug_led_pins[] = { | ||
95 | { | ||
96 | .name = "dreamplug:blue:bluetooth", | ||
97 | .gpio = 47, | ||
98 | .active_low = 1, | ||
99 | }, | ||
100 | { | ||
101 | .name = "dreamplug:green:wifi", | ||
102 | .gpio = 48, | ||
103 | .active_low = 1, | ||
104 | }, | ||
105 | { | ||
106 | .name = "dreamplug:green:wifi_ap", | ||
107 | .gpio = 49, | ||
108 | .active_low = 1, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | static struct gpio_led_platform_data dreamplug_led_data = { | ||
113 | .leds = dreamplug_led_pins, | ||
114 | .num_leds = ARRAY_SIZE(dreamplug_led_pins), | ||
115 | }; | ||
116 | |||
117 | static struct platform_device dreamplug_leds = { | ||
118 | .name = "leds-gpio", | ||
119 | .id = -1, | ||
120 | .dev = { | ||
121 | .platform_data = &dreamplug_led_data, | ||
122 | } | ||
123 | }; | ||
124 | |||
125 | static unsigned int dreamplug_mpp_config[] __initdata = { | ||
126 | MPP0_SPI_SCn, | ||
127 | MPP1_SPI_MOSI, | ||
128 | MPP2_SPI_SCK, | ||
129 | MPP3_SPI_MISO, | ||
130 | MPP47_GPIO, /* Bluetooth LED */ | ||
131 | MPP48_GPIO, /* Wifi LED */ | ||
132 | MPP49_GPIO, /* Wifi AP LED */ | ||
133 | 0 | ||
134 | }; | ||
135 | |||
136 | static void __init dreamplug_init(void) | ||
137 | { | ||
138 | /* | ||
139 | * Basic setup. Needs to be called early. | ||
140 | */ | ||
141 | kirkwood_mpp_conf(dreamplug_mpp_config); | ||
142 | |||
143 | spi_register_board_info(dreamplug_spi_slave_info, | ||
144 | ARRAY_SIZE(dreamplug_spi_slave_info)); | ||
145 | kirkwood_spi_init(); | ||
146 | |||
147 | kirkwood_ehci_init(); | ||
148 | kirkwood_ge00_init(&dreamplug_ge00_data); | ||
149 | kirkwood_ge01_init(&dreamplug_ge01_data); | ||
150 | kirkwood_sata_init(&dreamplug_sata_data); | ||
151 | kirkwood_sdio_init(&dreamplug_mvsdio_data); | ||
152 | |||
153 | platform_device_register(&dreamplug_leds); | ||
154 | } | ||
155 | |||
156 | static void __init kirkwood_dt_init(void) | ||
157 | { | ||
158 | kirkwood_init(); | ||
159 | |||
160 | if (of_machine_is_compatible("globalscale,dreamplug")) | ||
161 | dreamplug_init(); | ||
162 | |||
163 | of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); | ||
164 | } | ||
165 | |||
166 | static const char *kirkwood_dt_board_compat[] = { | ||
167 | "globalscale,dreamplug", | ||
168 | NULL | ||
169 | }; | ||
170 | |||
171 | DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") | ||
172 | /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ | ||
173 | .map_io = kirkwood_map_io, | ||
174 | .init_early = kirkwood_init_early, | ||
175 | .init_irq = kirkwood_init_irq, | ||
176 | .timer = &kirkwood_timer, | ||
177 | .init_machine = kirkwood_dt_init, | ||
178 | .restart = kirkwood_restart, | ||
179 | .dt_compat = kirkwood_dt_board_compat, | ||
180 | MACHINE_END | ||