diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-03-07 10:45:32 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-03-07 11:37:50 +0100 |
commit | 0504cd22aa43b3af9f0a6a63f3904e06e6959bc4 (patch) | |
tree | 336f224916c48d867b7d9d31abd3a872f233a3bc | |
parent | f2516e53c1678faa9a23d27aadf2c2d8c3370a51 (diff) | |
download | mtk-20170518-0504cd22aa43b3af9f0a6a63f3904e06e6959bc4.zip mtk-20170518-0504cd22aa43b3af9f0a6a63f3904e06e6959bc4.tar.gz mtk-20170518-0504cd22aa43b3af9f0a6a63f3904e06e6959bc4.tar.bz2 |
ar71xx: fix build without CONFIG_NOP_USB_XCEIV (FS#593)
Open-code usb_phy_generic_register instead of calling it, since it is
really trivial. Avoid pulling CONFIG_NOP_USB_XCEIV into the kernel
config and add a proper dependency instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | package/kernel/linux/modules/usb.mk | 3 | ||||
-rw-r--r-- | target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch | 15 |
2 files changed, 7 insertions, 11 deletions
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index d384e30..591ba0a 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1387,9 +1387,8 @@ $(eval $(call KernelPackage,usbip-server)) define KernelPackage/usb-chipidea TITLE:=Host and device support for Chipidea controllers - DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget @TARGET_ar71xx +kmod-usb-ehci + DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget @TARGET_ar71xx +kmod-usb-ehci +kmod-usb-phy-nop KCONFIG:= \ - CONFIG_NOP_USB_XCEIV=y \ CONFIG_EXTCON \ CONFIG_USB_CHIPIDEA \ CONFIG_USB_CHIPIDEA_HOST=y \ diff --git a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch index 8972c40..26aab8e 100644 --- a/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch +++ b/target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch @@ -29,7 +29,7 @@ #include <asm/mach-ath79/ath79.h> #include <asm/mach-ath79/ar71xx_regs.h> -@@ -170,6 +173,54 @@ static void __init ar913x_usb_setup(void +@@ -170,6 +173,51 @@ static void __init ar913x_usb_setup(void &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2)); } @@ -48,10 +48,9 @@ + +static void __init ar933x_ci_usb_setup(void) +{ -+ u32 bootstrap; -+ enum usb_dr_mode dr_mode; + struct ci_hdrc_platform_data ci_pdata; -+ struct platform_device *phy; ++ enum usb_dr_mode dr_mode; ++ u32 bootstrap; + + bootstrap = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP); + if (bootstrap & AR933X_BOOTSTRAP_USB_MODE_HOST) { @@ -70,10 +69,8 @@ + ci_pdata.id_extcon.edev = ERR_PTR(-ENODEV); + ci_pdata.itc_setting = 1; + -+ /* register a nop PHY */ -+ phy = usb_phy_generic_register(); -+ if (IS_ERR(phy)) -+ return; ++ platform_device_register_simple("usb_phy_generic", ++ PLATFORM_DEVID_AUTO, NULL, 0); + + ath79_usb_register("ci_hdrc", -1, + AR933X_EHCI_BASE, AR933X_EHCI_SIZE, @@ -84,7 +81,7 @@ static void __init ar933x_usb_setup(void) { ath79_device_reset_set(AR933X_RESET_USBSUS_OVERRIDE); -@@ -185,6 +236,8 @@ static void __init ar933x_usb_setup(void +@@ -185,6 +233,8 @@ static void __init ar933x_usb_setup(void AR933X_EHCI_BASE, AR933X_EHCI_SIZE, ATH79_CPU_IRQ(3), &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2)); |