diff options
author | Ashley Hughes <ashley.hughes@blueyonder.co.uk> | 2016-11-19 02:16:39 -0500 |
---|---|---|
committer | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2016-11-19 03:14:28 -0500 |
commit | ecfe69639157b6f70f53a7bc250efb4614c0eb31 (patch) | |
tree | e75a791d0dd1d535ff5e62806bdd7de6b01bfb37 | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) |
ARM: orion5x: remove legacy support of ls-chl
This patch removes the legacy support of ls-chl which is converted to the
device tree.
[gregory.clement@free-electrons.com: removal extracted from a wider patch]
Signed-off-by: Ashley Hughes <ashley.hughes@blueyonder.co.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
-rw-r--r-- | arch/arm/mach-orion5x/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ls-chl-setup.c | 331 |
3 files changed, 0 insertions, 339 deletions
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 89bb0fc796bd..633442ad4e4c 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -84,13 +84,6 @@ config MACH_LINKSTATION_PRO | |||
84 | Buffalo Linkstation Pro/Live platform. Both v1 and | 84 | Buffalo Linkstation Pro/Live platform. Both v1 and |
85 | v2 devices are supported. | 85 | v2 devices are supported. |
86 | 86 | ||
87 | config MACH_LINKSTATION_LSCHL | ||
88 | bool "Buffalo Linkstation Live v3 (LS-CHL)" | ||
89 | select I2C_BOARDINFO if I2C | ||
90 | help | ||
91 | Say 'Y' here if you want your kernel to support the | ||
92 | Buffalo Linkstation Live v3 (LS-CHL) platform. | ||
93 | |||
94 | config MACH_LINKSTATION_MINI | 87 | config MACH_LINKSTATION_MINI |
95 | bool "Buffalo Linkstation Mini (Flattened Device Tree)" | 88 | bool "Buffalo Linkstation Mini (Flattened Device Tree)" |
96 | select ARCH_ORION5X_DT | 89 | select ARCH_ORION5X_DT |
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 4b2502b4ca0d..ae91872eeee4 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile | |||
@@ -18,7 +18,6 @@ obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o | |||
18 | obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o | 18 | obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o |
19 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o | 19 | obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o |
20 | obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o | 20 | obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o |
21 | obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o | ||
22 | 21 | ||
23 | obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o | 22 | obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o |
24 | obj-$(CONFIG_MACH_D2NET_DT) += board-d2net.o | 23 | obj-$(CONFIG_MACH_D2NET_DT) += board-d2net.o |
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c deleted file mode 100644 index dfdaa8a498a4..000000000000 --- a/arch/arm/mach-orion5x/ls-chl-setup.c +++ /dev/null | |||
@@ -1,331 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/ls-chl-setup.c | ||
3 | * | ||
4 | * Maintainer: Ash Hughes <ashley.hughes@blueyonder.co.uk> | ||
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/physmap.h> | ||
15 | #include <linux/mv643xx_eth.h> | ||
16 | #include <linux/leds.h> | ||
17 | #include <linux/gpio_keys.h> | ||
18 | #include <linux/gpio-fan.h> | ||
19 | #include <linux/input.h> | ||
20 | #include <linux/i2c.h> | ||
21 | #include <linux/ata_platform.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include "common.h" | ||
26 | #include "mpp.h" | ||
27 | #include "orion5x.h" | ||
28 | |||
29 | /***************************************************************************** | ||
30 | * Linkstation LS-CHL Info | ||
31 | ****************************************************************************/ | ||
32 | |||
33 | /* | ||
34 | * 256K NOR flash Device bus boot chip select | ||
35 | */ | ||
36 | |||
37 | #define LSCHL_NOR_BOOT_BASE 0xf4000000 | ||
38 | #define LSCHL_NOR_BOOT_SIZE SZ_256K | ||
39 | |||
40 | /***************************************************************************** | ||
41 | * 256KB NOR Flash on BOOT Device | ||
42 | ****************************************************************************/ | ||
43 | |||
44 | static struct physmap_flash_data lschl_nor_flash_data = { | ||
45 | .width = 1, | ||
46 | }; | ||
47 | |||
48 | static struct resource lschl_nor_flash_resource = { | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | .start = LSCHL_NOR_BOOT_BASE, | ||
51 | .end = LSCHL_NOR_BOOT_BASE + LSCHL_NOR_BOOT_SIZE - 1, | ||
52 | }; | ||
53 | |||
54 | static struct platform_device lschl_nor_flash = { | ||
55 | .name = "physmap-flash", | ||
56 | .id = 0, | ||
57 | .dev = { | ||
58 | .platform_data = &lschl_nor_flash_data, | ||
59 | }, | ||
60 | .num_resources = 1, | ||
61 | .resource = &lschl_nor_flash_resource, | ||
62 | }; | ||
63 | |||
64 | /***************************************************************************** | ||
65 | * Ethernet | ||
66 | ****************************************************************************/ | ||
67 | |||
68 | static struct mv643xx_eth_platform_data lschl_eth_data = { | ||
69 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
70 | }; | ||
71 | |||
72 | /***************************************************************************** | ||
73 | * RTC 5C372a on I2C bus | ||
74 | ****************************************************************************/ | ||
75 | |||
76 | static struct i2c_board_info __initdata lschl_i2c_rtc = { | ||
77 | I2C_BOARD_INFO("rs5c372a", 0x32), | ||
78 | }; | ||
79 | |||
80 | /***************************************************************************** | ||
81 | * LEDs attached to GPIO | ||
82 | ****************************************************************************/ | ||
83 | |||
84 | #define LSCHL_GPIO_LED_ALARM 2 | ||
85 | #define LSCHL_GPIO_LED_INFO 3 | ||
86 | #define LSCHL_GPIO_LED_FUNC 17 | ||
87 | #define LSCHL_GPIO_LED_PWR 0 | ||
88 | |||
89 | static struct gpio_led lschl_led_pins[] = { | ||
90 | { | ||
91 | .name = "alarm:red", | ||
92 | .gpio = LSCHL_GPIO_LED_ALARM, | ||
93 | .active_low = 1, | ||
94 | }, { | ||
95 | .name = "info:amber", | ||
96 | .gpio = LSCHL_GPIO_LED_INFO, | ||
97 | .active_low = 1, | ||
98 | }, { | ||
99 | .name = "func:blue:top", | ||
100 | .gpio = LSCHL_GPIO_LED_FUNC, | ||
101 | .active_low = 1, | ||
102 | }, { | ||
103 | .name = "power:blue:bottom", | ||
104 | .gpio = LSCHL_GPIO_LED_PWR, | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | static struct gpio_led_platform_data lschl_led_data = { | ||
109 | .leds = lschl_led_pins, | ||
110 | .num_leds = ARRAY_SIZE(lschl_led_pins), | ||
111 | }; | ||
112 | |||
113 | static struct platform_device lschl_leds = { | ||
114 | .name = "leds-gpio", | ||
115 | .id = -1, | ||
116 | .dev = { | ||
117 | .platform_data = &lschl_led_data, | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | /***************************************************************************** | ||
122 | * SATA | ||
123 | ****************************************************************************/ | ||
124 | static struct mv_sata_platform_data lschl_sata_data = { | ||
125 | .n_ports = 2, | ||
126 | }; | ||
127 | |||
128 | /***************************************************************************** | ||
129 | * LS-CHL specific power off method: reboot | ||
130 | ****************************************************************************/ | ||
131 | /* | ||
132 | * On the LS-CHL, the shutdown process is following: | ||
133 | * - Userland monitors key events until the power switch goes to off position | ||
134 | * - The board reboots | ||
135 | * - U-boot starts and goes into an idle mode waiting for the user | ||
136 | * to move the switch to ON position | ||
137 | * | ||
138 | */ | ||
139 | |||
140 | static void lschl_power_off(void) | ||
141 | { | ||
142 | orion5x_restart(REBOOT_HARD, NULL); | ||
143 | } | ||
144 | |||
145 | /***************************************************************************** | ||
146 | * General Setup | ||
147 | ****************************************************************************/ | ||
148 | #define LSCHL_GPIO_USB_POWER 9 | ||
149 | #define LSCHL_GPIO_AUTO_POWER 17 | ||
150 | #define LSCHL_GPIO_POWER 18 | ||
151 | |||
152 | /**************************************************************************** | ||
153 | * GPIO Attached Keys | ||
154 | ****************************************************************************/ | ||
155 | #define LSCHL_GPIO_KEY_FUNC 15 | ||
156 | #define LSCHL_GPIO_KEY_POWER 8 | ||
157 | #define LSCHL_GPIO_KEY_AUTOPOWER 10 | ||
158 | #define LSCHL_SW_POWER 0x00 | ||
159 | #define LSCHL_SW_AUTOPOWER 0x01 | ||
160 | #define LSCHL_SW_FUNC 0x02 | ||
161 | |||
162 | static struct gpio_keys_button lschl_buttons[] = { | ||
163 | { | ||
164 | .type = EV_SW, | ||
165 | .code = LSCHL_SW_POWER, | ||
166 | .gpio = LSCHL_GPIO_KEY_POWER, | ||
167 | .desc = "Power-on Switch", | ||
168 | .active_low = 1, | ||
169 | }, { | ||
170 | .type = EV_SW, | ||
171 | .code = LSCHL_SW_AUTOPOWER, | ||
172 | .gpio = LSCHL_GPIO_KEY_AUTOPOWER, | ||
173 | .desc = "Power-auto Switch", | ||
174 | .active_low = 1, | ||
175 | }, { | ||
176 | .type = EV_SW, | ||
177 | .code = LSCHL_SW_FUNC, | ||
178 | .gpio = LSCHL_GPIO_KEY_FUNC, | ||
179 | .desc = "Function Switch", | ||
180 | .active_low = 1, | ||
181 | }, | ||
182 | }; | ||
183 | |||
184 | static struct gpio_keys_platform_data lschl_button_data = { | ||
185 | .buttons = lschl_buttons, | ||
186 | .nbuttons = ARRAY_SIZE(lschl_buttons), | ||
187 | }; | ||
188 | |||
189 | static struct platform_device lschl_button_device = { | ||
190 | .name = "gpio-keys", | ||
191 | .id = -1, | ||
192 | .num_resources = 0, | ||
193 | .dev = { | ||
194 | .platform_data = &lschl_button_data, | ||
195 | }, | ||
196 | }; | ||
197 | |||
198 | #define LSCHL_GPIO_HDD_POWER 1 | ||
199 | |||
200 | /**************************************************************************** | ||
201 | * GPIO Fan | ||
202 | ****************************************************************************/ | ||
203 | |||
204 | #define LSCHL_GPIO_FAN_LOW 16 | ||
205 | #define LSCHL_GPIO_FAN_HIGH 14 | ||
206 | #define LSCHL_GPIO_FAN_LOCK 6 | ||
207 | |||
208 | static struct gpio_fan_alarm lschl_alarm = { | ||
209 | .gpio = LSCHL_GPIO_FAN_LOCK, | ||
210 | }; | ||
211 | |||
212 | static struct gpio_fan_speed lschl_speeds[] = { | ||
213 | { | ||
214 | .rpm = 0, | ||
215 | .ctrl_val = 3, | ||
216 | }, { | ||
217 | .rpm = 1500, | ||
218 | .ctrl_val = 2, | ||
219 | }, { | ||
220 | .rpm = 3250, | ||
221 | .ctrl_val = 1, | ||
222 | }, { | ||
223 | .rpm = 5000, | ||
224 | .ctrl_val = 0, | ||
225 | }, | ||
226 | }; | ||
227 | |||
228 | static int lschl_gpio_list[] = { | ||
229 | LSCHL_GPIO_FAN_HIGH, LSCHL_GPIO_FAN_LOW, | ||
230 | }; | ||
231 | |||
232 | static struct gpio_fan_platform_data lschl_fan_data = { | ||
233 | .num_ctrl = ARRAY_SIZE(lschl_gpio_list), | ||
234 | .ctrl = lschl_gpio_list, | ||
235 | .alarm = &lschl_alarm, | ||
236 | .num_speed = ARRAY_SIZE(lschl_speeds), | ||
237 | .speed = lschl_speeds, | ||
238 | }; | ||
239 | |||
240 | static struct platform_device lschl_fan_device = { | ||
241 | .name = "gpio-fan", | ||
242 | .id = -1, | ||
243 | .num_resources = 0, | ||
244 | .dev = { | ||
245 | .platform_data = &lschl_fan_data, | ||
246 | }, | ||
247 | }; | ||
248 | |||
249 | /**************************************************************************** | ||
250 | * GPIO Data | ||
251 | ****************************************************************************/ | ||
252 | |||
253 | static unsigned int lschl_mpp_modes[] __initdata = { | ||
254 | MPP0_GPIO, /* LED POWER */ | ||
255 | MPP1_GPIO, /* HDD POWER */ | ||
256 | MPP2_GPIO, /* LED ALARM */ | ||
257 | MPP3_GPIO, /* LED INFO */ | ||
258 | MPP4_UNUSED, | ||
259 | MPP5_UNUSED, | ||
260 | MPP6_GPIO, /* FAN LOCK */ | ||
261 | MPP7_GPIO, /* SW INIT */ | ||
262 | MPP8_GPIO, /* SW POWER */ | ||
263 | MPP9_GPIO, /* USB POWER */ | ||
264 | MPP10_GPIO, /* SW AUTO POWER */ | ||
265 | MPP11_UNUSED, | ||
266 | MPP12_UNUSED, | ||
267 | MPP13_UNUSED, | ||
268 | MPP14_GPIO, /* FAN HIGH */ | ||
269 | MPP15_GPIO, /* SW FUNC */ | ||
270 | MPP16_GPIO, /* FAN LOW */ | ||
271 | MPP17_GPIO, /* LED FUNC */ | ||
272 | MPP18_UNUSED, | ||
273 | MPP19_UNUSED, | ||
274 | 0, | ||
275 | }; | ||
276 | |||
277 | static void __init lschl_init(void) | ||
278 | { | ||
279 | /* | ||
280 | * Setup basic Orion functions. Needs to be called early. | ||
281 | */ | ||
282 | orion5x_init(); | ||
283 | |||
284 | orion5x_mpp_conf(lschl_mpp_modes); | ||
285 | |||
286 | /* | ||
287 | * Configure peripherals. | ||
288 | */ | ||
289 | orion5x_ehci0_init(); | ||
290 | orion5x_ehci1_init(); | ||
291 | orion5x_eth_init(&lschl_eth_data); | ||
292 | orion5x_i2c_init(); | ||
293 | orion5x_sata_init(&lschl_sata_data); | ||
294 | orion5x_uart0_init(); | ||
295 | orion5x_xor_init(); | ||
296 | |||
297 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, | ||
298 | ORION_MBUS_DEVBUS_BOOT_ATTR, | ||
299 | LSCHL_NOR_BOOT_BASE, | ||
300 | LSCHL_NOR_BOOT_SIZE); | ||
301 | platform_device_register(&lschl_nor_flash); | ||
302 | |||
303 | platform_device_register(&lschl_leds); | ||
304 | |||
305 | platform_device_register(&lschl_button_device); | ||
306 | |||
307 | platform_device_register(&lschl_fan_device); | ||
308 | |||
309 | i2c_register_board_info(0, &lschl_i2c_rtc, 1); | ||
310 | |||
311 | /* usb power on */ | ||
312 | gpio_set_value(LSCHL_GPIO_USB_POWER, 1); | ||
313 | |||
314 | /* register power-off method */ | ||
315 | pm_power_off = lschl_power_off; | ||
316 | |||
317 | pr_info("%s: finished\n", __func__); | ||
318 | } | ||
319 | |||
320 | MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") | ||
321 | /* Maintainer: Ash Hughes <ashley.hughes@blueyonder.co.uk> */ | ||
322 | .atag_offset = 0x100, | ||
323 | .nr_irqs = ORION5X_NR_IRQS, | ||
324 | .init_machine = lschl_init, | ||
325 | .map_io = orion5x_map_io, | ||
326 | .init_early = orion5x_init_early, | ||
327 | .init_irq = orion5x_init_irq, | ||
328 | .init_time = orion5x_timer_init, | ||
329 | .fixup = tag_fixup_mem32, | ||
330 | .restart = orion5x_restart, | ||
331 | MACHINE_END | ||