gemini: add 3.18 support
[openwrt/svn-archive/archive.git] / target / linux / gemini / patches-3.18 / 132-arm-gemini-register-usb.patch
1 --- a/arch/arm/mach-gemini/board-wbd111.c
2 +++ b/arch/arm/mach-gemini/board-wbd111.c
3 @@ -145,6 +145,7 @@ static void __init wbd111_init(void)
4 platform_register_watchdog();
5 platform_device_register(&wbd111_phy_device);
6 platform_register_ethernet(&gmac_data);
7 + platform_register_usb(0);
8 }
9
10 MACHINE_START(WBD111, "Wiliboard WBD-111")
11 --- a/arch/arm/mach-gemini/board-wbd222.c
12 +++ b/arch/arm/mach-gemini/board-wbd222.c
13 @@ -147,6 +147,7 @@ static void __init wbd222_init(void)
14 platform_register_watchdog();
15 platform_device_register(&wbd222_phy_device);
16 platform_register_ethernet(&gmac_data);
17 + platform_register_usb(0);
18 }
19
20 MACHINE_START(WBD222, "Wiliboard WBD-222")
21 --- a/arch/arm/mach-gemini/board-rut1xx.c
22 +++ b/arch/arm/mach-gemini/board-rut1xx.c
23 @@ -105,6 +105,7 @@ static void __init rut1xx_init(void)
24 platform_register_watchdog();
25 platform_device_register(&rut1xx_phy_device);
26 platform_register_ethernet(&gmac_data);
27 + platform_register_usb(0);
28 }
29
30 MACHINE_START(RUT100, "Teltonika RUT100")
31 --- a/arch/arm/mach-gemini/board-nas4220b.c
32 +++ b/arch/arm/mach-gemini/board-nas4220b.c
33 @@ -134,10 +134,23 @@
34 GLOBAL_ARBITRATION1_CTRL));
35 }
36
37 +static void __init usb_ib4220b_init(void)
38 +{
39 + unsigned int val;
40 +
41 + val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
42 + GLOBAL_MISC_CTRL));
43 + val &= ~(USB0_PLUG_MINIB | USB1_PLUG_MINIB);
44 + val |= USB0_VBUS_ON | USB1_VBUS_ON;
45 + writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
46 + GLOBAL_MISC_CTRL));
47 +}
48 +
49 static void __init ib4220b_init(void)
50 {
51 gemini_gpio_init();
52 ib4220b_gmac_init();
53 + usb_ib4220b_init();
54 platform_register_uart();
55 platform_register_pflash(SZ_16M, NULL, 0);
56 platform_device_register(&ib4220b_led_device);
57 @@ -146,6 +159,8 @@ static void __init ib4220b_init(void)
58 platform_register_watchdog();
59 platform_device_register(&ib4220b_phy_device);
60 platform_register_ethernet(&ib4220b_gmac_data);
61 + platform_register_usb(0);
62 + platform_register_usb(1);
63 }
64
65 MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")