1bc498be7c3eced90eb2929cf3a13907a202efb4
[openwrt/openwrt.git] / target / linux / generic / patches-4.9 / 012-usb-Make-sure-usb-phy-of-gets-built-in.patch
1 From 3d6159640da9c9175d1ca42f151fc1a14caded59 Mon Sep 17 00:00:00 2001
2 From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
3 Date: Thu, 13 Apr 2017 15:33:34 +0300
4 Subject: [PATCH] usb: Make sure usb/phy/of gets built-in
5
6 DWC3 driver uses of_usb_get_phy_mode() which is
7 implemented in drivers/usb/phy/of.c and in bare minimal
8 configuration it might not be pulled in kernel binary.
9
10 In case of ARC or ARM this could be easily reproduced with
11 "allnodefconfig" +CONFIG_USB=m +CONFIG_USB_DWC3=m.
12
13 On building all ends-up with:
14 ---------------------->8------------------
15 Kernel: arch/arm/boot/Image is ready
16 Kernel: arch/arm/boot/zImage is ready
17 Building modules, stage 2.
18 MODPOST 5 modules
19 ERROR: "of_usb_get_phy_mode" [drivers/usb/dwc3/dwc3.ko] undefined!
20 make[1]: *** [__modpost] Error 1
21 make: *** [modules] Error 2
22 ---------------------->8------------------
23
24 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
25 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
27 Cc: Geert Uytterhoeven <geert+renesas@glider.be>
28 Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
29 Cc: Thomas Gleixner <tglx@linutronix.de>
30 Cc: Felipe Balbi <balbi@kernel.org>
31 Cc: Felix Fietkau <nbd@nbd.name>
32 Cc: Jeremy Kerr <jk@ozlabs.org>
33 Cc: linux-snps-arc@lists.infradead.org
34 Cc: stable@vger.kernel.org
35 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36 ---
37 drivers/Makefile | 1 +
38 1 file changed, 1 insertion(+)
39
40 diff --git a/drivers/Makefile b/drivers/Makefile
41 index 2eced9afba53..8f8bdc9e3d29 100644
42 --- a/drivers/Makefile
43 +++ b/drivers/Makefile
44 @@ -104,6 +104,7 @@ obj-$(CONFIG_USB_PHY) += usb/
45 obj-$(CONFIG_USB) += usb/
46 obj-$(CONFIG_PCI) += usb/
47 obj-$(CONFIG_USB_GADGET) += usb/
48 +obj-$(CONFIG_OF) += usb/
49 obj-$(CONFIG_SERIO) += input/serio/
50 obj-$(CONFIG_GAMEPORT) += input/gameport/
51 obj-$(CONFIG_INPUT) += input/
52 --
53 2.11.0
54