1. 24 1月, 2013 1 次提交
    • A
      USB: EHCI: fix build error in ehci-mxc · dba63b2f
      Alan Stern 提交于
      This patch (as1643b) fixes a build error in ehci-hcd when compiling for
      ARM with allmodconfig:
      
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      drivers/usb/host/ehci-mxc.c:280:31: warning: 'ehci_mxc_driver' defined but not used [-Wunused-variable]
      drivers/usb/host/ehci-hcd.c:1285:0: warning: "PLATFORM_DRIVER" redefined [enabled by default]
      drivers/usb/host/ehci-hcd.c:1255:0: note: this is the location of the previous definition
      
      The fix is to convert ehci-mxc over to the new "ehci-hcd is a library"
      scheme so that it can coexist peacefully with the ehci-platform
      driver.  As part of the conversion the ehci_mxc_priv data structure,
      which was allocated dynamically, is now placed where it belongs: in
      the private area at the end of struct ehci_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dba63b2f
  2. 15 11月, 2012 1 次提交
  3. 01 11月, 2012 1 次提交
    • A
      USB: EHCI: remove ehci_port_power() routine · c73cee71
      Alan Stern 提交于
      This patch (as1623) removes the ehci_port_power() routine and all the
      places that call it.  There's no reason for ehci-hcd to change the
      port power settings; the hub driver takes care of all that stuff.
      
      There is one exception: When the controller is resumed from
      hibernation or following a loss of power, the ports that are supposed
      to be handed over to a companion controller must be powered on first.
      Otherwise the handover won't work.  This process is not visible to the
      hub driver, so it has to be handled in ehci-hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c73cee71
  4. 15 10月, 2012 1 次提交
  5. 14 9月, 2012 1 次提交
  6. 11 8月, 2012 1 次提交
  7. 10 7月, 2012 1 次提交
    • A
      EHCI: centralize controller initialization · 1a49e2ac
      Alan Stern 提交于
      This patch (as1564c) converts the EHCI platform drivers to use the
      central ehci_setup() routine for generic controller initialization
      rather than each having its own idiosyncratic approach.
      
      The major point of difficulty lies in ehci-pci's many vendor- and
      device-specific workarounds.  Some of them have to be applied before
      calling ehci_setup() and some after, which necessitates a fair amount
      of code motion.  The other platform drivers require much smaller
      changes.
      
      One point not addressed by the patch is whether ports should be
      powered on or off following initialization.  The different drivers
      appear to handle this pretty much at random.  In fact it shouldn't
      matter, because the hub driver turns on power to all ports when it
      binds to the root hub.  Straightening that out will be left for
      another day.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a49e2ac
  8. 25 4月, 2012 2 次提交
  9. 27 2月, 2012 2 次提交
  10. 18 9月, 2011 1 次提交
  11. 09 8月, 2011 1 次提交
    • S
      usb/ehci-mxc: add missing inclusion of mach/hardware.h · 03a1d6bf
      Shawn Guo 提交于
      As cpu_is_mx stuff is being used in the driver, header mach/hardware.h
      should be explicitly included.
      
      The missing of the header is causing today's linux-next build error
      as bleow.
      
        CC      drivers/usb/host/ehci-hcd.o
      In file included from linux-next/drivers/usb/host/ehci-hcd.c:1190:0:
      linux-next/drivers/usb/host/ehci-mxc.c: In function 'ehci_mxc_drv_probe':
      linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx35'
      linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx25'
      linux-next/drivers/usb/host/ehci-mxc.c:185:2: error: implicit declaration of function 'cpu_is_mx51'
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      03a1d6bf
  12. 04 5月, 2011 1 次提交
  13. 11 2月, 2011 1 次提交
  14. 23 1月, 2011 2 次提交
  15. 03 1月, 2011 1 次提交
  16. 17 12月, 2010 1 次提交
    • F
      USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport · 0247a7bc
      Fabio Estevam 提交于
      In order to read/write to the i.MX OTG viewport register it is necessary to setup
      the PORTSCx register first.
      
      By default i.MX OTG port is configured for USB serial PHY. In order to use a ULPI PHY
      the PORTSCx register needs to be configured properly.
      
      commit 724c8525 (USB: ehci/mxc: compile fix) placed the PORTSC setup after the OTG
      viewport is accessed and this causes ULPI read/write to fail.
      
      Revert the PORTSC setup order.
      
      Tested on a MX31PDK board with a ISP1504 transceiver:
      
      ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
      mxc-ehci mxc-ehci.0: initializing i.MX USB Controller
      ULPI transceiver vendor/product ID 0x04cc/0x1504
      Found NXP ISP1504 ULPI transceiver.
      ULPI integrity check: passed.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0247a7bc
  17. 01 12月, 2010 1 次提交
  18. 11 11月, 2010 1 次提交
    • U
      USB: ehci/mxc: compile fix · 724c8525
      Uwe Kleine-König 提交于
      Commit
      	65fd4272 (USB: ehci tdi : let's tdi_reset set host mode)
      
      broke the build using ARM's mx51_defconfig:
      
       	  CC      drivers/usb/host/ehci-hcd.o
       	In file included from drivers/usb/host/ehci-hcd.c:1166:
       	drivers/usb/host/ehci-mxc.c: In function 'ehci_mxc_drv_probe':
       	drivers/usb/host/ehci-mxc.c:192: error: 'ehci' undeclared (first use in this function)
       	drivers/usb/host/ehci-mxc.c:192: error: (Each undeclared identifier is reported only once
       	drivers/usb/host/ehci-mxc.c:192: error: for each function it appears in.)
       	drivers/usb/host/ehci-mxc.c:117: warning: unused variable 'temp'
       	make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1
       	make[2]: *** [drivers/usb/host/ehci-hcd.o] Error 2
       	make[1]: *** [sub-make] Error 2
       	make: *** [all] Error 2
      
      Fix it together with the warning about the unused variable and use
      msleep instead of mdelay as requested by Alan Stern.
      
      Cc: Dinh Nguyen <Dinh.Nguyen@freescale.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Tested-by: NNguyen Dinh-R00091 <R00091@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      724c8525
  19. 23 10月, 2010 1 次提交
    • M
      USB: ehci tdi : let's tdi_reset set host mode · 65fd4272
      Matthieu CASTET 提交于
      tdi_reset is already taking care of setting host mode for tdi devices.
      Don't duplicate code in platform driver.
      
      Make ehci_halt a nop if the controller is not in host mode (otherwise it 
      will fail), and let's ehci_reset do the tdi_reset.
      We need to move hcd->has_tt flags before ehci_halt, in order ehci_halt 
      knows we are a tdi device.
      
      
      Before the setup routine was doing :
      - put controller in host mode
      - ehci_halt
      - ehci_init
      - hcd->has_tt = 1;
      - ehci_reset
      
      Now we do :
      - hcd->has_tt = 1;
      - ehci_halt
      - ehci_init
      - ehci_reset
      
      PS : now we handle correctly the device -> host transition.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65fd4272
  20. 26 7月, 2010 1 次提交
  21. 30 6月, 2010 1 次提交
    • W
      USB: ehci-mxc: bail out on transceiver problems · 4c9715de
      Wolfram Sang 提交于
      The old code registered the hcd even if there were no transceivers
      detected, leading to oopses like this if we try to probe a non-existant
      ULPI:
      
      [    2.730000] mxc-ehci mxc-ehci.0: unable to init transceiver
      [    2.740000] timeout polling for ULPI device
      [    2.740000] timeout polling for ULPI device
      [    2.750000] mxc-ehci mxc-ehci.0: unable to enable vbus on transceiver
      [    2.750000] mxc-ehci mxc-ehci.0: Freescale On-Chip EHCI Host Controller
      [    2.760000] mxc-ehci mxc-ehci.0: new USB bus registered, assigned bus number 2
      [    2.770000] Unhandled fault: external abort on non-linefetch (0x808) at 0xc4876184
      [    2.770000] Internal error: : 808 [#1] PREEMPT
      [    2.770000] last sysfs file:
      [    2.770000] Modules linked in:
      [    2.770000] CPU: 0    Not tainted  (2.6.33.5 #5)
      [    2.770000] PC is at ehci_hub_control+0x4d4/0x8f8
      [    2.770000] LR is at ehci_mxc_setup+0xbc/0xdc
      [    2.770000] pc : [<c0196dfc>]    lr : [<c019bc8c>]    psr: 00000093
      [    2.770000] sp : c3815e40  ip : 00000001  fp : 60000013
      [    2.770000] r10: c4876184  r9 : 00000000  r8 : c3814000
      [    2.770000] r7 : c391d2cc  r6 : 00000001  r5 : 00000001  r4 : 00000000
      [    2.770000] r3 : 80000000  r2 : 00000007  r1 : 80000000  r0 : c4876184
      [    2.770000] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM Segment kernel
      [    2.770000] Control: 0005317f  Table: a0004000  DAC: 00000017
      [    2.770000] Process swapper (pid: 1, stack limit = 0xc3814270)
      ...
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: stable <stable@kernel.org>
      Acked-by: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4c9715de
  22. 03 5月, 2010 1 次提交
  23. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  24. 03 3月, 2010 1 次提交
  25. 12 12月, 2009 1 次提交