1. 18 6月, 2013 1 次提交
    • P
      usb: chipidea: improve kconfig · 20a677fd
      Peter Chen 提交于
      Randy Dunlap <rdunlap@infradead.org> reported this problem
      on i386:
      
      > drivers/built-in.o: In function `ci_hdrc_host_init':
      > (.text+0x2ce75c): undefined reference to `ehci_init_driver'
      >
      > When USB_EHCI_HCD=m and USB_CHIPIDEA=y.
      
      In fact, this problem is existed on all platforms which are using
      chipidea driver. The root cause of this problem is the chipidea host
      uses symbol exported from ehci-hcd, but chipidea core
      does not depends on USB_EHCI_HCD. So, chipidea driver
      will not be compiled as module if USB_EHCI_HCD=m.
      
      It is very hard to give a perfect solution since chipidea core
      depends on USB || USB_GADGET, and chipdiea host depends on
      both USB_EHCI_HCD and USB_CHIPIDEA, the same problem exists for
      gadget.
      
      To fix this problem, we had to have below assumptions:
      
      - If USB_EHCI_HCD=y && USB_GADGET=y, USB_CHIPIDEA can be 'y'.
      
      - If USB_EHCI_HCD=m && USB_GADGET=y, USB_CHIPIDEA=m
      or USB_CHIPIDEA_HOST can't be seen if USB_CHIPIDEA=y.
      It will cause compile error due to no glue layer for ehci:
      
      > error: #error "missing bus glue for ehci-hcd"
      
      So, we had to compile USB_CHIPIDEA=m if USB_EHCI_HCD=m,
      current ehci hcd core guarantee it.
      
      - If USB_EHCI_HCD=y && USB_GADGET=m, USB_CHIPIDEA=m
      or USB_CHIPIDEA_UDC can't be seen if USB_CHIPIDEA=y.
      Of cos, the gadget will out of working at this situation,
      so the user had to compile USB_CHIPIDEA=m.
      
      - USB_EHCI_HCD=m && USB_GADGET=m, we can't see
      USB_CHIPIDEA_HOST and USB_CHIPIDEA_UDC unless
      USB_CHIPIDEA=m.
      
      The reason why it has above assumptions:
      - If both ehci core and gadget core build as module,
      the chipidea has to build as module.
      - If one of ehci core or gadget core is built in, another
      is built as module, we can only enable the function which
      is built in, or enable both roles as modules (USB_CHIPIDEA=m),
      since chipidea core driver takes care of both host and device roles.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      20a677fd
  2. 17 5月, 2013 1 次提交
  3. 03 11月, 2012 1 次提交
  4. 31 8月, 2012 1 次提交
    • M
      usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED · 85b8614d
      Michal Nazarewicz 提交于
      This commit removes USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED
      Kconfig options.  Since now kernel allows many UDC drivers to be
      compiled, those options may turn to no longer be valid.  For
      instance, if someone decides to build UDC that supports super
      speed and UDC that supports high speed only, the latter will be
      "assumed" to support super speed since USB_GADGET_SUPERSPEED will
      be selected by the former.
      
      The test of whether CONFIG_USB_GADGET_*SPEED was defined was just
      an optimisation which removed otherwise dead code (ie. if UDC is
      not dual speed, there is no need to handle cases that can happen
      if speed is high).  This commit removes those checks.
      Signed-off-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      85b8614d
  5. 11 8月, 2012 1 次提交
    • M
      usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module · 71a5e61b
      Marc Kleine-Budde 提交于
      Since commit "5e0aa49e usb: chipidea: use generic map/unmap routines",
      the udc part of the chipidea driver needs the generic usb gadget helper
      functions. If the chipidea driver with udc support is built into the
      kernel and usb gadget is built a module, the linking of the kernel
      fails with:
      
      drivers/built-in.o: In function `_hardware_dequeue':
      drivers/usb/chipidea/udc.c:527:
          undefined reference to `usb_gadget_unmap_request'
      drivers/usb/chipidea/udc.c:1269:
          undefined reference to `usb_gadget_unmap_request'
      drivers/usb/chipidea/udc.c:1821:
          undefined reference to `usb_del_gadget_udc'
      drivers/usb/chipidea/udc.c:443:
          undefined reference to `usb_gadget_map_request'
      drivers/usb/chipidea/udc.c:1774:
          undefined reference to `usb_add_gadget_udc'
      
      This patch changes the dependencies, so that udc support can only be
      activated if the linux gadget support (USB_GADGET) is builtin or both
      chipidea driver and USB_GADGET are modular. Same dependencies for the
      chipidea host support and the linux host side USB support (USB).
      
      While there, fix the indention of chipidea the help text.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71a5e61b
  6. 10 7月, 2012 1 次提交
  7. 12 5月, 2012 3 次提交