09 Aug, 2012

1 commit


06 Jul, 2012

1 commit


02 Jul, 2012

1 commit


25 Jun, 2012

2 commits


04 Jun, 2012

1 commit

  • This appears to have been broken by
    commit 5cfb19ac604a68c030b245561f575c2d1bac1d49
    (ARM: davinci: streamline sysmod access)

    For now, fix by hardcoding USB_PHY_CTRL and DM355_DEEPSLEEP

    Tested on DM365 with defconfig changes.

    Signed-off-by: Jon Povey
    Acked-by: Sekhar Nori
    CC: Felipe Balbi
    Cc: # v3.4.x
    Signed-off-by: Felipe Balbi

    Jon Povey
     

18 Apr, 2012

1 commit


02 Mar, 2012

2 commits


27 Feb, 2012

1 commit

  • Use the new usb_phy_* functions with transceiver
    operations instead of the old otg functions.

    Includes fixes from Sascha Hauer.

    Signed-off-by: Heikki Krogerus
    Acked-by: Sascha Hauer
    Acked-by: Pavankumar Kondeti
    Acked-by: Li Yang
    Acked-by: Alan Stern
    Reviewed-by: Marek Vasut
    Signed-off-by: Felipe Balbi

    Heikki Krogerus
     

13 Feb, 2012

1 commit

  • Use struct usb_otg members with OTG specific functions instead
    of usb_phy members.

    [ balbi@ti.com: added a missing change on musb_gadget.c to avoid
    a compile error on a later patch ]

    Signed-off-by: Heikki Krogerus
    Reviewed-by: Marek Vasut
    Signed-off-by: Felipe Balbi

    Heikki Krogerus
     

31 Jan, 2012

1 commit

  • There's really no point in doing all that
    initcall trickery when we can safely let
    udev handle module probing for us.

    Remove all of that trickery, by moving everybody
    to module_init() and making proper use of
    platform_device_register() rather than
    platform_device_probe().

    Tested-by: Rajashekhara, Sudhakar
    Tested-by: Tasslehoff Kjappfot
    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

24 Jan, 2012

1 commit

  • Commit 0020afb369859472a461ef4af6410732e929d402 (ARM: mach-davinci:
    remove mach/memory.h) removed mach/memory.h for DaVinci which broke
    DaVinci MUSB build.

    mach/memory.h is not actually needed in davinci.c, so remove it.
    While at it, also remove some more machine specific inclulde
    files which are not needed for build.

    Tested on DM644x EVM using USB card reader.

    Cc: stable@vger.kernel.org # v3.2
    Signed-off-by: Sekhar Nori
    Signed-off-by: Felipe Balbi

    Sekhar Nori
     

08 Aug, 2011

1 commit


02 Jul, 2011

1 commit

  • the MUSB IP is always OTG, so there's no point
    in adding so many ifdefs on the code. Drop those
    and always compile the driver for OTG support.

    This also allows us to drop the useless "driver
    mode" choice. For doing that, we need to make
    musb depend on both Host and Peripheral side.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     

13 May, 2011

1 commit

  • We have a generic way of enabling/disabling
    different debug messages on a driver called
    DYNAMIC_PRINTK. Anyone interested in enabling
    just part of the debug messages, please read
    the documentation under:

    Documentation/dynamic-debug-howto.txt

    for information on how to use that great
    infrastructure.

    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

07 May, 2011

1 commit

  • Commit 3dacdf11 "usb: factor out state_string() on otg drivers"
    broke building musb drivers since there is already another
    otg_state_string() function in musb drivers, but with different
    prototype. Fix musb drivers to use common otg_state_string(), too.

    Also provide a nop for otg_state_string() if CONFIG_USB_OTG_UTILS
    is not defined.

    Signed-off-by: Anatolij Gustschin
    Signed-off-by: Greg Kroah-Hartman

    Anatolij Gustschin
     

10 Dec, 2010

5 commits


07 Dec, 2010

1 commit

  • preparing to a big refactor on musb code. We need
    to be able to compile in all glue layers (or at
    least all ARM-based ones) together and have a
    working binary.

    While preparing for that, we move every glue
    layer to export only one symbol, which is
    a struct musb_platform_ops, and make all
    other functions static.

    Later patches will come to allow for compiling
    all glue layers together and have a working
    binary.

    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

01 Dec, 2010

1 commit


23 Oct, 2010

1 commit

  • Since commit 461972d8a4c94bc44f11a13046041c78a7cf18dd (musb_core: don't call
    musb_platform_exit() twice), unloading the driver module results in a WARNING
    "kobject: '(null)' (c73de788): is not initialized, yet kobject_put() is being
    called." (or even kernel oops) on e.g. DaVincis, though only in the OTG mode.
    There exists dubious and unbalanced put_device() call in musb_free() which
    takes place only in the OTG mode. As this commit caused musb_platform_exit()
    to be called (and so unregister the NOP transceiver) before this put_device()
    call, this function references already freed memory.

    On the other hand, all the glue layers miss the otg_put_transceiver() call,
    complementary to the otg_get_transceiver() call that they do. So, I think
    the solution is to get rid of the strange put_device() call, and instead
    call otg_put_transceiver() in the glue layers...

    Signed-off-by: Sergei Shtylyov
    Cc: stable
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     

21 May, 2010

1 commit

  • Program the OTG_INTERFSEL register based on
    transcevier type passed from board file.

    Adapt signature of musb_platform_init() function
    for davinci, blackfin and tusb6010.

    Signed-off-by: Maulik Mankad
    Cc: David Brownell
    Cc: Sergei Shtylyov
    Cc: Olof Johansson
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Maulik Mankad
     

01 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

15 Feb, 2010

1 commit


24 Dec, 2009

1 commit


13 Jul, 2009

3 commits

  • Get rid of some obnoxious and inappropriate messaging, mostly on
    DaVinci, when usbcore tries to autosuspend a root hub if just a
    mini/micro-A connector is connected. Symptom: endless stream of
    messages reading like:

    musb_bus_suspend 2221: trying to suspend as a_wait_vrise is_active=1

    Improve that musb bus suspend primitive a bit. Take advantage of
    this call to update the OTG state machine if appropriate, moving
    the device out of the A_WAIT_VRISE state. There's basically no
    timer for that state transition just now, except with tusb6010;
    that can make trouble.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Numbering for GPIOs on the pcf857x chips on the dm644x EVM board
    changed when DaVinci chips with more GPIOs were supported. Update
    the GPIO number used for nVBUS_DRV.

    Longer term, we need a better abstraction of board-specific setup in
    this code so we're not hard-coding board specific GPIOs into the
    driver, but for now this at least gets it back to working with
    mainline davinci core code.

    Signed-off-by: Kevin Hilman
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     
  • Finish merging updates for DM355 chips into musb/davinci.c now
    that its support is in mainline: kick in new DRVVBUS controls.

    Signed-off-by: David Brownell
    Signed-off-by: Kevin Hilman
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

16 Jun, 2009

3 commits

  • Let the otg_transceiver in MUSB be managed by an external driver;
    don't assume it's integrated. OMAP3 chips need it to be external,
    and there may be ways to interact with the transceiver which add
    functionality to the system.

    Platform init code is responsible for setting up the transeciver,
    probably using the NOP transceiver for integrated transceivers.
    External ones will use whatever the board init code provided,
    such as twl4030 or something more hands-off.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • As DaVinci DM646x has a dedicated CPPI DMA interrupt, replace
    cppi_completion() (which has always been kind of layering
    violation) by a complete CPPI interrupt handler.

    [ dbrownell@users.sourceforge.net: only cppi_dma.c needs platform
    device header, not cppi_dma.h ]

    Signed-off-by: Dmitry Krivoschekov
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     
  • The gadget EP0 code routinely ignores an interrupt at end of
    the data phase because of musb_g_ep0_giveback() resetting the
    state machine to "idle, waiting for SETUP" phase prematurely.

    The driver also prematurely leaves the status phase on
    receiving the SetupEnd interrupt.

    As there were still unhandled endpoint 0 interrupts happening
    from time to time after fixing these issues, there turned to
    be yet another culprit: two distinct gadget states collapsed
    into one.

    The (missing) state that comes after STATUS IN/OUT states was
    typically indiscernible from them since the corresponding
    interrupts tend to happen within too little period of time
    (due to only a zero-length status packet in between) and so
    they got coalesced; yet this state is not the same as the next
    one which is associated with the reception of a SETUP packet.

    Adding this extra state seems to have fixed the rest of the
    unhandled interrupts that generic_interrupt() and
    davinci_interrupt() hid by faking their result and only
    emitting a debug message -- so, stop doing that.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     

25 Mar, 2009

1 commit

  • Partial support for DaVinci DM355, on the EVM board; peripheral
    mode should work, once mainline merges DM355 support. Missing:

    (a) renumbering the GPIO for DRVVBUS on the DM6446 EVM,
    when DAVINCI_N_GPIO increases;

    (b) disabling DM355_DEEPSLEEP.DRVVBUS_OVERRIDE so VBUS is
    driven according to the ID signal, if cpu_is_..._dm355()

    The new PHY control bits are ignored on DM6446.

    Signed-off-by: David Brownell
    Cc: Kevin Hilman
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

28 Feb, 2009

1 commit

  • Now that the musb build fixes for DaVinci got merged (RC3?), kick in
    the other bits needed to get it finally *working* in mainline:

    - Use clk_enable()/clk_disable() ... the "always enable USB clocks"
    code this originally relied on has since been removed.

    - Initialize the USB device only after the relevant I2C GPIOs are
    available, so the host side can properly enable VBUS.

    - Tweak init sequencing to cope with mainline's relatively late init
    of the I2C system bus for power switches, transceivers, and so on.

    Sanity tested on DM6664 EVM for host and peripheral modes; that system
    won't boot with CONFIG_PM enabled, so OTG can't yet be tested. Also
    verified on OMAP3.

    (Unrelated: correct the MODULE_PARM_DESC spelling of musb_debug.)

    Signed-off-by: David Brownell
    Cc: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

28 Jan, 2009

1 commit

  • Trying once more to get this merged. The original was submitted
    for 2.6.27-rc2 or so, and never got correctly merged. Neither
    were any of the numerous subsequent resends. Sigh.

    CC drivers/usb/musb/davinci.o
    drivers/usb/musb/davinci.c:35:32: error: mach/arch/hardware.h: No such file or directory
    drivers/usb/musb/davinci.c:36:30: error: mach/arch/memory.h: No such file or directory
    drivers/usb/musb/davinci.c:37:28: error: mach/arch/gpio.h: No such file or directory
    drivers/usb/musb/davinci.c:373: error: redefinition of 'musb_platform_set_mode'
    drivers/usb/musb/davinci.c:368: error: previous definition of 'musb_platform_set_mode' was here

    Signed-off-by: David Brownell
    Acked-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

08 Jan, 2009

1 commit