imx6: use upstream gateworks board names
[openwrt.git] / target / linux / imx6 / patches-3.10 / 0001-usb-chipidea-improve-kconfig.patch
1 From: Peter Chen <peter.chen@freescale.com>
2 Subject: [PATCH] usb: chipidea: improve kconfig
3
4 Randy Dunlap <rdunlap@infradead.org> reported this problem
5 on i386:
6
7 > drivers/built-in.o: In function `ci_hdrc_host_init':
8 > (.text+0x2ce75c): undefined reference to `ehci_init_driver'
9 >
10 > When USB_EHCI_HCD=m and USB_CHIPIDEA=y.
11
12 In fact, this problem is existed on all platforms which are using
13 chipidea driver. The root cause of this problem is the chipidea host
14 uses symbol exported from ehci-hcd, but chipidea core
15 does not depends on USB_EHCI_HCD. So, chipidea driver
16 will not be compiled as module if USB_EHCI_HCD=m.
17
18 It is very hard to give a perfect solution since chipidea core
19 depends on USB || USB_GADGET, and chipdiea host depends on
20 both USB_EHCI_HCD and USB_CHIPIDEA, the same problem exists for
21 gadget.
22
23 To fix this problem, we had to have below assumptions:
24
25 - If USB_EHCI_HCD=y && USB_GADGET=y, USB_CHIPIDEA can be 'y'.
26
27 - If USB_EHCI_HCD=m && USB_GADGET=y, USB_CHIPIDEA=m
28 or USB_CHIPIDEA_HOST can't be seen if USB_CHIPIDEA=y.
29 It will cause compile error due to no glue layer for ehci:
30
31 > error: #error "missing bus glue for ehci-hcd"
32
33 So, we had to compile USB_CHIPIDEA=m if USB_EHCI_HCD=m,
34 current ehci hcd core guarantee it.
35
36 - If USB_EHCI_HCD=y && USB_GADGET=m, USB_CHIPIDEA=m
37 or USB_CHIPIDEA_UDC can't be seen if USB_CHIPIDEA=y.
38 Of cos, the gadget will out of working at this situation,
39 so the user had to compile USB_CHIPIDEA=m.
40
41 - USB_EHCI_HCD=m && USB_GADGET=m, we can't see
42 USB_CHIPIDEA_HOST and USB_CHIPIDEA_UDC unless
43 USB_CHIPIDEA=m.
44
45 The reason why it has above assumptions:
46 - If both ehci core and gadget core build as module,
47 the chipidea has to build as module.
48 - If one of ehci core or gadget core is built in, another
49 is built as module, we can only enable the function which
50 is built in, or enable both roles as modules (USB_CHIPIDEA=m),
51 since chipidea core driver takes care of both host and device roles.
52
53 Signed-off-by: Peter Chen <peter.chen@freescale.com>
54 Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
55 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
56 ---
57  drivers/usb/chipidea/Kconfig | 6 +++---
58  1 file changed, 3 insertions(+), 3 deletions(-)
59
60 --- a/drivers/usb/chipidea/Kconfig
61 +++ b/drivers/usb/chipidea/Kconfig
62 @@ -12,15 +12,15 @@ if USB_CHIPIDEA
63  
64  config USB_CHIPIDEA_UDC
65         bool "ChipIdea device controller"
66 -       depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA
67 +       depends on USB_GADGET=y || USB_CHIPIDEA=m
68         help
69           Say Y here to enable device controller functionality of the
70           ChipIdea driver.
71  
72  config USB_CHIPIDEA_HOST
73         bool "ChipIdea host controller"
74 -       depends on USB=y || USB=USB_CHIPIDEA
75 -       depends on USB_EHCI_HCD=y
76 +       depends on USB=y
77 +       depends on USB_EHCI_HCD=y || USB_CHIPIDEA=m
78         select USB_EHCI_ROOT_HUB_TT
79         help
80           Say Y here to enable host controller functionality of the