History log of /drivers/usb/musb/ux500_dma.c
Revision Date Author Comments
50f9f7983773b92af10d8c4d3175a2692559c493 06-Aug-2014 Hans Wennborg <hans@hanshq.net> usb: musb: ux500: fix decimal printf format specifiers prefixed with 0x

The prefix suggests the number should be printed in hex, so use
the %x specifier to do that.

Found by using regex suggested by Joe Perches.

Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
086ed9a0bcca0201301b74a0c5160c04f2f38f8b 13-Dec-2013 Lee Jones <lee.jones@linaro.org> usb: musb: ux500_dma: fix potential NULL dereference error

static checker warning: "drivers/usb/musb/ux500_dma.c:335
ux500_dma_controller_start()
error: potential NULL dereference 'param_array'."

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
0f2aa8caeaa043f6cbe6281eb72efba5ff860904 21-Aug-2013 Lee Jones <lee.jones@linaro.org> usb: musb: ux500: Add check for NULL board data

Dan Carpenter's automatic Smatch checker found an anomaly in the ux500
MUSB driver, whereby board data was checked before use in all but one
occasion. It is believed that it needs to be checked every time.

Smatch complaint:
drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start()
error: we previously assumed 'data' could be null (see line 313)

Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
c1a7d67c1901347bdb3d06536cd69d018fbf2c4b 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> usb: musb: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
66c01883ef19bf4537b16931567b7d35c65356ad 19-Jun-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de> usb: musb: dma: merge ->start/stop into create/destroy

The core code creates a controller and immediately after that it calls
the ->start() callback. This one might drop an error but nobody cares.
The same thing happens in the destroy corner: First ->stop() called
followed by destroy callback. So why not merge those two into the same
function since there is no difference.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2968da0b2c7297a29d49c7084d6865c2cf627093 15-May-2013 Lee Jones <lee.jones@linaro.org> usb: musb: ux500: attempt to find channels by name before using pdata

If we can ever get to a state where we can solely search for DMA channels
by name, this will almost completely alleviate the requirement to pass
copious amounts of information though platform data. Here we take the
first step towards this. The next step will be to enable Device Tree
complete with name<->event_line mapping.

Cc: linux-usb@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5f6091a023ca435c49467348e388fa89e635436a 15-May-2013 Lee Jones <lee.jones@linaro.org> usb: musb: ux500: harden checks for platform data

In its current state, the ux500-musb driver uses platform data pointers
blindly with no prior checking. If no platform data pointer is passed
this will Oops the kernel. In this patch we ensure platform data and
board data are present prior to using them.

Cc: linux-usb@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
be2dbb09a014cba5691c8483ad2d0747d3eeb514 15-May-2013 Lee Jones <lee.jones@linaro.org> usb: musb: ux500: move channel number knowledge into the driver

For all ux500 based platforms the maximum number of end-points are used.
Move this knowledge into the driver so we can relinquish the burden from
platform data. This also removes quite a bit of complexity from the driver
and will aid us when we come to enable the driver for Device Tree.

Cc: linux-usb@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3147dad6fa457e0bb7edaab36f6d290c7048b49e 15-May-2013 Fabio Baltieri <fabio.baltieri@linaro.org> usb: musb: various cosmetic fixes on ux500 files

Various non functional coding style fixes on ux500_dma.c and
phy-ab8500-usb.c drivers.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
3ee1f2e6e51581d5cb9c312161a9a9b2f18f25bf 03-Apr-2013 Fabio Baltieri <fabio.baltieri@linaro.org> usb: musb: ux500_dma: drop references to U5500

Drop references to deprecated U5500 platform in driver comments.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
6b0cfc656f8a649fbfbe11e76e0aa301ee26879e 22-Mar-2013 Felipe Balbi <balbi@ti.com> usb: musb: ux500_dma: fix sparse warning

fix the following sparse warning:

drivers/usb/musb/ux500_dma.c:60:6: warning: symbol 'ux500_dma_callback' was not declared. Should it be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
399e0f4f00adbfdea2122c1daec0d4015f56cc7a 08-Mar-2013 Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> usb: musb: ux500_dma: add missing MEM resource check

Fix dma_controller_create() fail path in case memory resource is
missing.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
6a3b003620f0bd31390422619092fcb87cf1069e 06-Feb-2013 Felipe Balbi <balbi@ti.com> usb: musb: ux500_dma: kill compile warnings

Fix the following compile warnings:

drivers/usb/musb/ux500_dma.c: In function ‘ux500_configure_channel’:
drivers/usb/musb/ux500_dma.c:96:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/usb/musb/ux500_dma.c: In function ‘ux500_dma_is_compatible’:
drivers/usb/musb/ux500_dma.c:195:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Felipe Balbi <balbi@ti.com>
0f53e48132cd95b359fc79e0aa44db1c406b4eff 06-Feb-2013 Felipe Balbi <balbi@ti.com> usb: musb: dsps: add missing include

<linux/sizes.h> is the header defining SZ_4
and SZ_16M, we shouldn't depend on indirect
inclusion so let's explicitly include it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
41ac7b3ab7fe1d6175839947a877fdf95cbd2211 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> usb: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Olav Kongas <ok@artecdesign.ee>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
db298da2c31e1dcf7c9b7c9cef6217ad3449ebb7 24-Aug-2012 Arnd Bergmann <arnd@arndb.de> ARM: nomadik: move platform_data definitions

Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the nomadik include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: STEricsson <STEricsson_nomadik_linux@list.st.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andreas Westin <andreas.westin@stericsson.com>
07a67bbb95ea7977846bd851dab5f4f2be8e488c 09-Aug-2012 Shubhrajyoti D <shubhrajyoti@ti.com> usb: musb: Make dma_controller_create __devinit

dma_controller_create is called only from musb_init_controller
which is __devint so annotate dma_controller_create also with
__devint.

fixes the warn

WARNING: vmlinux.o(.devinit.text+0x6fa8): Section mismatch in reference from the function musb_init_controller() to the function .init.text:dma_controller_create()
The function __devinit musb_init_controller() references
a function __init dma_controller_create().
If dma_controller_create is only used by musb_init_controller then
annotate dma_controller_create with a matching annotation.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
16052827d98fbc13c31ebad560af4bd53e2b4dd5 08-Mar-2012 Alexandre Bounine <alexandre.bounine@idt.com> dmaengine/dma_slave: introduce inline wrappers

Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to hide new parameter from current users of affected interfaces.
Convert current users to use new wrappers instead of direct calls.
Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269].

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
258aea76f552cc755da92e7e823abbb85e021514 01-Feb-2012 Viresh Kumar <viresh.kumar@st.com> dmaengine: Pass dma_slave_config .device_fc = NULL for all existing users

.device_fc is added in struct dma_slave_config recently. All user drivers, which
want DMA to be the flow controller must pass this field as false. As earlier
driver don't look to use this feature, mark it false for now.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
be18a251892ab85d1bc10d87d336ee25f8dba615 17-Aug-2011 Per Forlin <per.forlin@linaro.org> usb: musb: ux500: optimize DMA callback routine

Skip the use of work queue and call musb_dma_completion() directly from
DMA callback context.

Here follows measurements on a Snowball board with ondemand governor active.

Performance using work queue:
(105 MB) copied, 6.23758 s, 16.8 MB/s
(105 MB) copied, 5.7151 s, 18.3 MB/s
(105 MB) copied, 5.83583 s, 18.0 MB/s
(105 MB) copied, 5.93611 s, 17.7 MB/s

Performance without work queue
(105 MB) copied, 5.62173 s, 18.7 MB/s
(105 MB) copied, 5.61811 s, 18.7 MB/s
(105 MB) copied, 5.57817 s, 18.8 MB/s
(105 MB) copied, 5.58549 s, 18.8 MB/s

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
8341544c9d95610f86b560333c7b22dd1096ca4f 14-Oct-2011 Vinod Koul <vinod.koul@linux.intel.com> USB-musb: move to dma_transfer_direction

fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves usb/musb driver to use new enum

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
afbd0749c0507d5fea980b3bfa76efc43af83d60 03-Aug-2011 Per Forlin <per.forlin@linaro.org> usb: musb: ux500: replace missing DBG with dev_dbg

ux500_dma.c fail to compile becase DBG has been removed from musb_debug.
Use dev_dbg for all prints.

Cc: stable@vger.kernel.org
Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Mian Yousaf Kaukab<mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
d366d39bab562545ccb4a5931d62d0fd9e6a8ffc 02-Aug-2011 Per Forlin <per.forlin@linaro.org> usb: musb: ux500: set dma config for both src and dst

The dma driver requires both src and dst to be set.
This fix is needed in order to run gadget mass storage.
Patch is verified on snowball.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-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>
8dcc8f72e3f3b7ed1ba1cd5641e15658e2140abe 22-Mar-2011 Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> usb: musb: ux500: add dma glue layer for ux500

Unaligned sizes and buffers are not supported and they will be filtered
out by is_compatible().

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>