dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

35 Commits

Author SHA1 Message Date
Felipe Contreras c6bde9b5ae usb: musb: cleanup kconfig
The whole thing depends on USB_MUSB_HDRC, just add an 'if'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-20 14:01:38 +02:00
Felipe Contreras 54a605f4ce usb: musb: trivial Kconfig cleanups
Shuffle the code a bit so the description is at the top.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-20 13:59:01 +02:00
Felipe Balbi 1e546aa6c4 usb: musb: drop ARCH dependency
musb core driver and tusb6010 glue layer don't
depend on anything which is ARCH-specific. It
builds fine on x86 and ARM. Dropping the dependency
so we can compile-test on linux-next.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12 11:51:53 +02:00
Arnd Bergmann 2e7fc3ba68 usb: musb: use a Kconfig choice to pick the right DMA method
The logic to allow only one DMA driver in MUSB is currently
flawed, because it also allows picking no DMA driver at all
and also not selecting PIO mode.

Using a choice statement makes this foolproof for now and
also simplifies the Makefile.

Unfortunately, we will have to revisit this when we start
supporting multiple ARM platforms in a single kernel binary,
because at that point we will actually need to select
multiple DMA drivers and pick the right one at run-time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12 11:51:41 +02:00
Luciano Coelho 0de174b56b usb: musb: hdrc: fix dependency on USB_GADGET_DUALSPEED in Kconfig
USB_MUSB_HDRC depends on USB_GADGET_DUALSPEED.  If HDRC is selected
but DUALSPEED is not, the kernel oopses:

[    3.132781] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    3.141296] pgd = c0004000
[    3.144134] [00000000] *pgd=00000000
[    3.147918] Internal error: Oops: 5 [#1] SMP
[    3.152404] Modules linked in:
[    3.155609] CPU: 0    Not tainted  (3.1.0-rc9-wl+ #417)
[    3.161132] PC is at composite_setup+0x738/0xbb4
[    3.165985] LR is at vprintk+0x400/0x47c
[    3.170135] pc : [<c031df90>]    lr : [<c004c150>]    psr: 60000093
[    3.170135] sp : c065dd50  ip : dfb1f0fc  fp : c065ddbc
[    3.182220] r10: 00000000  r9 : df8fcae8  r8 : df8fcaa0
[    3.187713] r7 : 00000000  r6 : df8eaa20  r5 : dfae8ea0  r4 : 00000000
[    3.194580] r3 : df8fcae8  r2 : 00010002  r1 : c065dc40  r0 : 00000047
[    3.201446] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    3.209228] Control: 10c53c7d  Table: 8000404a  DAC: 00000015
[    3.215270] Process swapper (pid: 0, stack limit = 0xc065c2f8)
[    3.221405] Stack: (0xc065dd50 to 0xc065e000)
[...]
[    3.415405] [<c031df90>] (composite_setup+0x738/0xbb4) from [<c0310d18>] (musb_g_ep0_irq+0x9d0/0xaf8)
[    3.425109] [<c0310d18>] (musb_g_ep0_irq+0x9d0/0xaf8) from [<c030fb04>] (musb_interrupt+0xb48/0xc74)
[    3.434722] [<c030fb04>] (musb_interrupt+0xb48/0xc74) from [<c030fc98>] (generic_interrupt+0x68/0x80)
[    3.444458] [<c030fc98>] (generic_interrupt+0x68/0x80) from [<c0095204>] (handle_irq_event_percpu+0x9c/0x234)
[    3.454925] [<c0095204>] (handle_irq_event_percpu+0x9c/0x234) from [<c00953e8>] (handle_irq_event+0x4c/0x6c)
[    3.465270] [<c00953e8>] (handle_irq_event+0x4c/0x6c) from [<c0097e10>] (handle_fasteoi_irq+0xd8/0x110)
[    3.475158] [<c0097e10>] (handle_fasteoi_irq+0xd8/0x110) from [<c0094d2c>] (generic_handle_irq+0x34/0x3c)
[    3.485260] [<c0094d2c>] (generic_handle_irq+0x34/0x3c) from [<c0014ae4>] (handle_IRQ+0x88/0xc8)
[    3.494537] [<c0014ae4>] (handle_IRQ+0x88/0xc8) from [<c00085b0>] (asm_do_IRQ+0x18/0x1c)
[    3.503051] [<c00085b0>] (asm_do_IRQ+0x18/0x1c) from [<c0429e78>] (__irq_svc+0x38/0xc0)

This patch changes Kconfig so that USB_GADGET_DUALSPEED is selected
automatically by USB_MUSB_HDRC.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14 11:51:18 -08:00
Mian Yousaf Kaukab d06785942d usb: musb: remove incorrectly added ARCH_U5500 define
ARCH_U8500 covers both MACH_U8500 and MACH_U5500

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14 11:51:18 -08:00
Rabin Vincent b61ae34270 usb: musb: fix Kconfig
After 622859634 (usb: musb: drop a gigantic amount of ifdeferry):

 - USB_GADGET_MUSB_HDRC is no longer selectable because it
   depends on the removed USB_MUSB_PERIPHERAL and USB_MUSB_OTG
   options

 - The Kconfig comment still says "Enable Host or Gadget support
   to see Inventra options", even though you now need to enable
   both of them to see Inventra options.

Fix the dependency and drop the anyway unnecessary comment.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-08-01 22:06:45 +03:00
Felipe Balbi 622859634a usb: musb: drop a gigantic amount of ifdeferry
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 <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01 14:31:10 -07:00
Mian Yousaf Kaukab d23894402b usb: musb: ux500: add configuration and build options for ux500 dma
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-05-18 14:43:16 +03:00
Felipe Balbi 1376d92f9e usb: musb: allow musb and glue layers to be modules
This in part reverts commit 7a180e70cf.
(usb: musb: temporarily make it bool) and while
at that we also allow glue layers to be compiled
as modules.

There are still some other changes needed
until we can have a fully functional build
with this setup, but we're getting there.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-05-13 14:34:05 +03:00
Felipe Balbi 5c8a86e10a usb: musb: drop unneeded musb_debug trickery
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 <balbi@ti.com>
2011-05-13 14:34:04 +03:00
Felipe Balbi 7a180e70cf usb: musb: temporarily make it bool
Due to the recent changes to musb's glue layers,
we can't compile musb-hdrc as a module - compilation
will break due to undefined symbol musb_debug. In
order to fix that, we need a big re-work of the
debug support on the MUSB driver.

Because that would mean a lot of new code coming
into the -rc series, it's best to defer that to
next merge window and for now just disable module
support for MUSB.

Once we get the refactor of the debugging support
done, we can simply revert this patch and things
will go back to normal again.

Cc: stable@kernel.org # v2.6.38
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-04-13 11:51:25 +03:00
Hema HK 4c42fbc99f usb: musb: TWL6030: Selecting TWL6030_USB transceiver
Selecting the twl6030-usb for OMAP4430SDP and OMAP4PANDA boards and
adding OMAP4 internal phy code for compilation

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10 14:45:59 +02:00
Mian Yousaf Kaukab 4bc36fd31b usb: musb: add support for ux500 platform
Initial support for u8500 and u5500 platform.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10 10:21:36 +02:00
Felipe Balbi 05ac10dd68 usb: musb: trivial search and replace patch
change all ocurrences of musb_hdrc to musb-hdrc.

We will call glue layer drivers musb-<glue layer>,
so in order to keep things somewhat standard, let's
change the underscore into a dash.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10 10:21:10 +02:00
Felipe Balbi 7c92554642 usb: musb: add Kconfig options for each glue layer
This will make things simpler when choosing which
glue layer to compile. It avoids a lot of magic
around the "default" Kconfig option and lets the
user choose what exactly s/he wants to compile.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-12-10 10:21:09 +02:00
Ajay Kumar Gupta eb83092c2b USB: musb: add musb support for AM35x
AM35x has musb interface and uses CPPI4.1 DMA engine.
Current patch supports only PIO mode. DMA support can be
added later once basic CPPI4.1 DMA patch is accepted.

Also added USB_MUSB_AM35X which is required to differentiate musb ips
between OMAP3x and AM35x. This config would be used to for below
purposes,
        - Select am35x.c instead of omap2430.c for compilation
          at drivers/usb/musb directory. Please note there are
          significant differneces in these two files as musb ip
          in quite different on AM35x.

	  Please note that in multi omap configuration only omap2430.c
	  file will get compiled and we would require to select only
	  AM35x based board config to compile am35x.c

        - Select workaround codes applicable for AM35x musb issues.
          one such workaround is for bytewise read issue on AM35x.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:22:16 -07:00
Sergei Shtylyov 3ee076dea6 usb: musb: introduce DA8xx/OMAP-L1x glue layer
Texas Instruments DA8xx/OMAP-L1x glue layer for the
MUSBMHRDC driver.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Yadviga Grigorieva <yadviga@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:21:52 -07:00
Maulik Mankad c71b1b9c21 USB: MUSB: Build MUSB driver for OMAP4
This patch updates the Makefile to build the
MUSB driver for OMAP4. It also sets the Kconfig
options for OMAP4.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:32 -07:00
Sergei Shtylyov c6a39eec9d MUSB: fix DaVinci glue layer dependency
CONFIG_ARCH_DAVINCI now embraces both the "real" DaVinci and DA8xx/OMAP-L1x --
on which the DaVinci glue layer won't work. Change the Makefile dependency to
CONFIG_ARCH_DAVINCI_DMx which corresponds to "real" DaVinci.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-30 09:25:09 -07:00
Tony Lindgren a8eb7ca0cb omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3
Replace ARCH_OMAP34XX with ARCH_OMAP3

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:02 -08:00
Cliff Cai 8ba63a2296 USB: musb: Blackfin code needs NOP_USB_XCEIV too
Otherwise we get the link failure:
drivers/built-in.o: In function 'musb_platform_init':
drivers/usb/musb/blackfin.c:300: undefined reference to 'usb_nop_xceiv_register'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:24 -08:00
Sonic Zhang 1c47cb018d USB: musb: update Blackfin processor dependency
Do not allow MUSB driver to be selected on derivatives that don't have the
MUSB controller on them.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:24 -08:00
Mike Frysinger e3c6f15fec USB: musb: invert arch depend string
The MUSB code relies on platform implementations that currently only
exists for Arm and Blackfin processors, so have the MUSB Kconfig depend
upon those arches.

This should prevent other arches from building MUSB via randconfig.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-12 14:36:28 -07:00
Mike Frysinger b20cf90650 USB: musb: make HAVE_CLK support optional
The Blackfin port doesn't support HAVE_CLK and the musb driver works fine
with support stubbed out, so take the existing Blackfin clk stubs and move
them to common musb code so we can drop the Kconfig dependency.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09 13:52:07 -07:00
Gupta, Ajay Kumar e8e2ff462d USB: musb: fix the nop registration for OMAP3EVM
OMAP3EVM uses ISP1504 phy which doesn't require any programming and
thus has to use NOP otg transceiver.

Cleanups being done:
	- Remove unwanted code in usb-musb.c file
	- Register NOP in OMAP3EVM board file using
	  usb_nop_xceiv_register().
	- Select NOP_USB_XCEIV for OMAP3EVM boards.
	- Don't enable TWL4030_USB in omap3_evm_defconfig

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Eino-Ville Talvala <talvala@stanford.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07 16:05:13 -07:00
David Brownell 84e250ffa7 musb: proper hookup to transceiver drivers
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 <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15 21:44:40 -07:00
David Brownell a227fd7db7 USB: musb: partial DaVinci dm355 support
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 <dbrownell@users.sourceforge.net>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
David Brownell cd67435ef9 USB: musb: Kconfig fix
The Blackfin MUSB Kconfig text didn't properly parenthesise its
dependencies.  This was visible in non-Blackfin configs by the
way the user interfaces lost track of dependencies, when doing
a bunch of test builds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:35 -08:00
David Brownell 37daa925cf USB: musb_hdrc: another davinci buildfix (otg related)
The DaVinci code had an implementation of the OTG transceiver glue
too; make it use the new-standard one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27 16:15:32 -08:00
Bryan Wu 085ad4067b USB: musb: add Blackfin Kconfig options and Makefile
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07 10:00:08 -08:00
David Brownell c767c1c6f1 usb: musb_hdrc build fixes
Minor musb_hdrc updates:

  - so it'll build on DaVinci, given relevant platform updates;
      * remove support for an un-shipped OTG prototype
      * rely on gpiolib framework conversion for the I2C GPIOs
      * the <asm/arch/hdrc_cnf.h> mechanism has been removed

  - catch comments up to the recent removal of the per-SOC header
    with the silicon configuration data;

  - and remove two inappropriate "inline" declarations which
    just bloat host side code.

There are still some more <asm/arch/XYZ.h> ==> <mach/XYZ.h>
changes needed in this driver, catching up to the relocation
of most of the include/asm-arm/arch-* contents.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: stable <stable@kernel.org> [2.6.27]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:40:59 -07:00
Andrew Morton 09fa14aa92 USB: drivers/usb/musb/: disable it on SuperH
In file included from drivers/usb/musb/musb_core.h:59,
                 from drivers/usb/musb/musb_core.c:108:
drivers/usb/musb/musb_io.h:42: error: conflicting types for '__raw_readsl'
/usr/src/devel/arch/sh/include/asm/io.h:112: error: previous declaration of '__raw_readsl' was here
drivers/usb/musb/musb_io.h:42: error: conflicting types for '__raw_readsl'
/usr/src/devel/arch/sh/include/asm/io.h:112: error: previous declaration of '__raw_readsl' was here
drivers/usb/musb/musb_io.h:44: error: conflicting types for 'readsw'
/usr/src/devel/arch/sh/include/asm/io.h:164: error: previous definition of 'readsw' was here
drivers/usb/musb/musb_io.h:46: error: conflicting types for 'readsb'
/usr/src/devel/arch/sh/include/asm/io.h:163: error: previous definition of 'readsb' was here
drivers/usb/musb/musb_io.h:49: error: conflicting types for '__raw_writesl'
/usr/src/devel/arch/sh/include/asm/io.h:111: error: previous declaration of '__raw_writesl' was here
drivers/usb/musb/musb_io.h:49: error: conflicting types for '__raw_writesl'
/usr/src/devel/arch/sh/include/asm/io.h:111: error: previous declaration of '__raw_writesl' was here
drivers/usb/musb/musb_io.h:51: error: conflicting types for 'writesw'
/usr/src/devel/arch/sh/include/asm/io.h:164: error: previous definition of 'writesw' was here
drivers/usb/musb/musb_io.h:53: error: conflicting types for 'writesb'
/usr/src/devel/arch/sh/include/asm/io.h:163: error: previous definition of 'writesb' was here

Cc: Karsten Keil <kkeil@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-09-23 13:58:09 -07:00
Felipe Balbi e8164f64ca usb: musb: get rid of MUSB_LOGLEVEL and use parameter
We can change debugging level on the fly via
/sys/module/musb_hdrc/parameters/debug.

We can also get rid of the LOGLEVEL facility in Kconfig
and rely only in module parameter.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:26:34 -07:00
Felipe Balbi 550a7375fe USB: Add MUSB and TUSB support
This patch adds support for MUSB and TUSB controllers
integrated into omap2430 and davinci. It also adds support
for external tusb6010 controller.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-13 17:33:00 -07:00