diff options
author | Roman Yeryomin <roman@advem.lv> | 2016-08-22 02:36:50 +0300 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-08-23 15:41:27 +0200 |
commit | f046737e92f9a13acbe9139e1ded83287d31eeb5 (patch) | |
tree | a99693b42935d5d4ea1addf3514003df4e7898bd /target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch | |
parent | e58c20aac319e5d9722caed2d64b6338c6b04b85 (diff) | |
download | upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.gz upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.tar.bz2 upstream-f046737e92f9a13acbe9139e1ded83287d31eeb5.zip |
gemini: add Linux 4.4 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
[Jo-Philipp Wich: change commit title]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch')
-rw-r--r-- | target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch b/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch new file mode 100644 index 0000000000..2a61d828ea --- /dev/null +++ b/target/linux/gemini/patches-4.4/132-arm-gemini-register-usb.patch @@ -0,0 +1,65 @@ +--- a/arch/arm/mach-gemini/board-wbd111.c ++++ b/arch/arm/mach-gemini/board-wbd111.c +@@ -145,6 +145,7 @@ static void __init wbd111_init(void) + platform_register_watchdog(); + platform_device_register(&wbd111_phy_device); + platform_register_ethernet(&gmac_data); ++ platform_register_usb(0); + } + + MACHINE_START(WBD111, "Wiliboard WBD-111") +--- a/arch/arm/mach-gemini/board-wbd222.c ++++ b/arch/arm/mach-gemini/board-wbd222.c +@@ -147,6 +147,7 @@ static void __init wbd222_init(void) + platform_register_watchdog(); + platform_device_register(&wbd222_phy_device); + platform_register_ethernet(&gmac_data); ++ platform_register_usb(0); + } + + MACHINE_START(WBD222, "Wiliboard WBD-222") +--- a/arch/arm/mach-gemini/board-rut1xx.c ++++ b/arch/arm/mach-gemini/board-rut1xx.c +@@ -105,6 +105,7 @@ static void __init rut1xx_init(void) + platform_register_watchdog(); + platform_device_register(&rut1xx_phy_device); + platform_register_ethernet(&gmac_data); ++ platform_register_usb(0); + } + + MACHINE_START(RUT100, "Teltonika RUT100") +--- a/arch/arm/mach-gemini/board-nas4220b.c ++++ b/arch/arm/mach-gemini/board-nas4220b.c +@@ -134,10 +134,23 @@ static void __init ib4220b_gmac_init(voi + GLOBAL_ARBITRATION1_CTRL)); + } + ++static void __init usb_ib4220b_init(void) ++{ ++ unsigned int val; ++ ++ val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) + ++ GLOBAL_MISC_CTRL)); ++ val &= ~(USB0_PLUG_MINIB | USB1_PLUG_MINIB); ++ val |= USB0_VBUS_ON | USB1_VBUS_ON; ++ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) + ++ GLOBAL_MISC_CTRL)); ++} ++ + static void __init ib4220b_init(void) + { + gemini_gpio_init(); + ib4220b_gmac_init(); ++ usb_ib4220b_init(); + platform_register_uart(); + platform_register_pflash(SZ_16M, NULL, 0); + platform_device_register(&ib4220b_led_device); +@@ -146,6 +159,8 @@ static void __init ib4220b_init(void) + platform_register_watchdog(); + platform_device_register(&ib4220b_phy_device); + platform_register_ethernet(&ib4220b_gmac_data); ++ platform_register_usb(0); ++ platform_register_usb(1); + } + + MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B") |