Vinod Koul [Tue, 27 Mar 2012 08:23:00 +0000 (13:53 +0530)]
dmaengine: imx: fix the build failure on x86_64
commit
6bd081277ea0 "dmaengine: imx-dma: merge old dma-v1.c with
imx-dma.c" removed the dependency in config for the imx dma driver,
whereas it should depend on ARCH_MXS
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:15 +0000 (14:54 +0100)]
dmaengine: i.MX: Fix merge of cookie branch.
When merging DMA cookie changes a small chunk
of code was dropped. This broke imx-dma driver.
This patch adds this chunk again and fixes the problem.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:14 +0000 (14:54 +0100)]
dmaengine: i.MX: Add support for interleaved transfers.
i.MX2 and i.MX1 chips have the possibility to do
interleaved transfers with two constraints:
- Only one chunk can be used (i.e. only 2D transfers are allowed).
- Only 2 interleaved configurations can be applied at the same time
for all channels.
Since this patch adds a new resource 'slots_2d' which is shared
by all the DMA channels and to avoid disgustin locking BUGs, the
'lock' member has been moved to the global 'imxdma_engine' structure.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:13 +0000 (14:54 +0100)]
dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
There were some 'pr_crit' and 'pr_debug' messages due to the
initial merge. Replace them by 'dev_dbg' and 'dev_warn' to be
consistent.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:12 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
These global variables are integrated into the dmaengine structure.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:11 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
Since this function is always used with 'desc' as first argument
and 'desc->sg' as second argument, the latter is clearly redundant
and can be removed.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:10 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove internal structure.
This structure was created to allow an smoothless
merge but was meant to be removed. Remaining members
'hw_chaining' and 'watchdog' are moved to the channel
structure.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:09 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
Use per-descriptor 'len' field to keep track of the remaining bytes
instead. This goes on the direction of eventually removing the
'internal' structure.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:08 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
It makes no sense keeping an 'in_use' flag when the multiple descriptor
mechanism already prevents a new DMA transfer to be issued when another
one is in course.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:07 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove sg member from internal structure.
This member is redundant, because it is already present in
descriptor structure. Removing it will make further removing
of 'internal' structure easier.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:06 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
Removing this function allows moving 'ccr_to_device' and
'ccr_from_device' from internal struct to channel struct.
This repesents a step forward towards removing auxiliary
'internal' structure.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:05 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
This function is only used once in the driver and uses some
intermediary variables that are not needed anymore. For this
reason it's been merged with 'imxdma_control'.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:04 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
This function is only used once in the driver and has a lot of checks
that are not needed anymore. For this reason it's been merged
with 'imxdma_enable_hw'.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:03 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove dma_mode member of internal structure.
dmaengine now provides 'enum dma_transfer_direction' to properly
specify DMA transfer direction. For this reason, DMA_MODE_* defines
are replaced by this new type and therefore dma_mode member becomes
redundant.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:02 +0000 (14:54 +0100)]
dmaengine: imx-dma: remove data member from internal structure.
Internal structure is just an auxiliary structure used for the initial
merge which is meant to be gone. As data member is not use anywhere
we can simply remove it.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Thu, 22 Mar 2012 13:54:01 +0000 (14:54 +0100)]
dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
It is mainly a simple merge changing the prefix of some
functions to fit the imx-dma namings.
As there are no users of the old dma-v1.c api we can safely
remove this file.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Nicolas Ferre [Wed, 14 Mar 2012 11:41:43 +0000 (12:41 +0100)]
dmaengine: at_hdmac: add slave config operation
This patch introduces DMA_SLAVE_CONFIG to at_hdmac Atmel DMA driver.
It is needed to fix a regression in the use of atmel-mci.c driver on Atmel
AT91 platforms brouth by e2b35f3:
"dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes"
We remove some parts of the private structure "at_dma_slave" and use the
information provided by "struct dma_slave_config": source/destination
peripheral registers and access width.
AT_DMA_SLAVE_WIDTH_* values used previously are not needed anymore as we
now use the standard ones. Although some conversion functions are needed to
match register expected values.
Some AT91 sub-architecture specific files are slightly touched by this patch
but it cannot be split because it can break compilation.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Alexandre Bounine [Thu, 8 Mar 2012 20:35:13 +0000 (15:35 -0500)]
dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
Add context parameter to device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to allow passing client/target specific information associated
with the data transfer.
Modify all affected DMA engine drivers.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Alexandre Bounine [Thu, 8 Mar 2012 21:11:18 +0000 (16:11 -0500)]
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>
Fabio Estevam [Thu, 8 Mar 2012 12:26:39 +0000 (09:26 -0300)]
dma: imx-sdma: Treat firmware messages as warnings instead of erros
As the SDMA controller can operate without an external firmware being loaded,
treat the firmware related messages as warnings rather than errors.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Tue, 13 Mar 2012 07:09:49 +0000 (12:39 +0530)]
Merge branch 'rmk_cookie_fixes2' into next
Conflicts:
drivers/dma/imx-dma.c
drivers/dma/pl330.c
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Tue, 13 Mar 2012 06:28:12 +0000 (11:58 +0530)]
dmaengine: fix for cookie changes and merge
Fixed trivial issues in drivers:
drivers/dma/imx-sdma.c
drivers/dma/intel_mid_dma.c
drivers/dma/ioat/dma_v3.c
drivers/dma/iop-adma.c
drivers/dma/sirf-dma.c
drivers/dma/timb_dma.c
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Tue, 13 Mar 2012 06:26:44 +0000 (11:56 +0530)]
dmaengine: pl330: fix the pl330 build after cookie cleanup
drivers/dma/pl330.c: In function 'pl330_control':
drivers/dma/pl330.c:342: error: 'struct dma_pl330_chan' has no member named
'completed'
Reported by: Jassi Brar <jassisinghbrar@gmail.com>
Suggested by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:36:27 +0000 (22:36 +0000)]
dmaengine: ensure all DMA engine drivers initialize their cookies
Ensure all DMA engine drivers initialize their cookies in the same way,
so that they all behave in a similar fashion. This means their first
issued cookie will be 2 rather than 1, and will increment to INT_MAX
before returning 1 and starting over.
In connection with this, Dan Williams said:
> Russell King wrote:
> > Secondly, some DMA engine drivers initialize the dma_chan cookie to 0,
> > others to 1. Is there a reason for this, or are these all buggy?
>
> I know that ioat and iop-adma expect 0 to mean "I have cleaned up this
> descriptor and it is idle", and would break if zero was an in-flight
> cookie value. The reserved usage of zero is an driver internal
> concern, but I have no problem formalizing it as a reserved value.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:36:07 +0000 (22:36 +0000)]
dmaengine: fix cookie handling in iop-adma.c and ppc4xx/adma.c
Dan Williams said:
> > Russell King wrote:
> > Firstly, we have DMA_MIN_COOKIE which has value 1 - so any cookies below
> > that aren't valid. That seems sane.
> >
> > We seem to have different behaviours:
> >
> > - cookie = c->cookie;
> > - cookie++;
> > - if (cookie < 0)
> > - cookie = 1;
> > - c->cookie = cookie;
> > - tx->cookie = cookie;
> >
> > c->cookie here is initialized to zero, so the first cookie given out will
> > be 1. This is how most DMA engine drivers implement this.
> >
> > Then we have this:
> >
> > cookie = chan->common.cookie;
> > cookie++;
> > if (cookie <= 1)
> > cookie = 2;
> >
> > /* initialize the completed cookie to be less than
> > * the most recently used cookie
> > */
> > chan->common.completed_cookie = cookie - 1;
> > chan->common.cookie = sw_desc->async_tx.cookie = cookie;
> >
> > Again, chan->common.cookie starts off at 0. The first cookie given out
> > will be 2, and 1 will never be used. There are three drivers which
> > implement it this way.
> >
> > Why is there this difference, and can these three be corrected to behave
> > the same way as the first (and therefore the assignment of cookies
> > consolidated?)
>
> Yes, they should be consolidated, and I believe they have drifted only
> because there were no good common helpers and murphy's law took over.
So lets fix this up to use the common dma_cookie_assign() helper.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:35:47 +0000 (22:35 +0000)]
dmaengine: consolidate initialization of cookies
Provide a common function to initialize a channels cookie values.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:35:27 +0000 (22:35 +0000)]
dmaengine: consolidate tx_status functions
Now that we have the completed cookie in the dma_chan structure, we
can consolidate the tx_status functions by providing a function to set
the txstate structure and returning the DMA status. We also provide
a separate helper to set the residue for cookies which are still in
progress.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:35:07 +0000 (22:35 +0000)]
dmaengine: provide a common function for completing a dma descriptor
Provide a common function to do the cookie mechanics for completing
a DMA descriptor.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:34:46 +0000 (22:34 +0000)]
dmaengine: consolidate assignment of DMA cookies
Everyone deals with assigning DMA cookies in the same way (it's part of
the API so they should be), so lets consolidate the common code into a
helper function to avoid this duplication.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:34:26 +0000 (22:34 +0000)]
dmaengine: add private header file
Add a local private header file to contain definitions and declarations
which should only be used by DMA engine drivers.
We also fix linux/dmaengine.h to use LINUX_DMAENGINE_H to guard against
multiple inclusion.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Tue, 6 Mar 2012 22:34:06 +0000 (22:34 +0000)]
dmaengine: move last completed cookie into generic dma_chan structure
Every DMA engine implementation declares a last completed dma cookie
in their private dma channel structures. This is pointless, and
forces driver specific code. Move this out into the common dma_chan
structure.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Russell King - ARM Linux [Mon, 5 Mar 2012 20:15:11 +0000 (20:15 +0000)]
dmaengine: mv_xor: remove write-only is_complete_cookie
mv_xor's is_complete_cookie is only ever written to, but never read.
This is silly, remove the write-only structure member.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Fri, 9 Mar 2012 09:25:25 +0000 (14:55 +0530)]
Revert "drivers/dma: linux/module.h included twice"
This reverts commit
865d9438eb1f7670d2e88849f059db551b320887.
The module.h incsuion twice has been updated tree wide hence this is not
required to be merged.
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Boojin Kim [Mon, 26 Dec 2011 09:55:47 +0000 (18:55 +0900)]
DMA: PL330: Support MEMTOMEM transmit w/o RMB, WMB
The DMAC PL330 r1p0 version fixed the lockup error being on r0p0.
This patch supports the DMA transmission without memory barrier
operation when the revision of DMAC PL330 is the next of r0p0.
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Boojin Kim [Mon, 26 Dec 2011 09:51:41 +0000 (18:51 +0900)]
DMA: PL330: Removes useless function
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Boojin Kim [Mon, 26 Dec 2011 09:49:52 +0000 (18:49 +0900)]
DMA: PL330: Merge PL330 driver into drivers/dma/
Currently there were two part of DMAC PL330 driver for
support old styled s3c-pl330 which has been merged into
drivers/dma/pl330.c driver. Actually, there is no reason
to separate them now.
Basically this patch merges arch/arm/common/pl330.c into
drivers/dma/pl330.c driver and removes useless exported
symbol, externed function and so on.
The newer pl330 driver tested on SMDKV310 and SMDK4212 boards
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Fabio Estevam [Wed, 29 Feb 2012 14:20:38 +0000 (11:20 -0300)]
dma: imx-sdma: Print a message when firmare fails to be requested
Print a message when firmare fails to be requested in the case of platform data being used.
While at it, distinguish between the error messages of the device tree and platform data cases.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Fabio Estevam [Wed, 29 Feb 2012 14:20:37 +0000 (11:20 -0300)]
dma: imx-sdma: Let the driver be probed even if no firware is found
On the device tree case the code bails out when the firmware name cannot be found
or if the firmware fails to be requested.
Fix this behaviour as the SDMA engine can still operate with the built-in
ROM scripts.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Fri, 2 Mar 2012 08:28:47 +0000 (09:28 +0100)]
dmaengine: Add support for multiple descriptors for imx-dma.
dmaengine specifies the possibility that several descriptors
can be queued for transfer. It also indicates that tasklets
must be used for DMA callbacks.
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Javier Martin [Tue, 28 Feb 2012 16:08:17 +0000 (17:08 +0100)]
dmaengine: Add support for MEMCPY for imx-dma.
MEMCPY transfers allow DMA copies from memory to
memory. This patch has been tested with dmatest
device driver.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Fabio Estevam [Tue, 21 Feb 2012 14:51:59 +0000 (12:51 -0200)]
dma: dmaengine: Distinguish between 'dmaengine: failed to get' messages
The message "dmaengine: failed to get" can come from two possible locations within dmaengine.c.
In order to distinguish between them, replace "dmaengine" with __func__ string so that the
source function of the error message can be easily identified.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Danny Kukawka [Wed, 15 Feb 2012 19:20:26 +0000 (20:20 +0100)]
drivers/dma: linux/module.h included twice
drivers/dma/imx-dma.c and drivers/dma/imx-sdma.c included
'linux/module.h' twice, remove the duplicates.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:28 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Remove unused fields in struct dw_dma_slave
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:27 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes
There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:26 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG
This patch adds support for DMA_SLAVE_CONFIG in dwc DMAC controller. Fields in
struct dw_dma_slave for passing similar data are preserved in this patch untill
all existing users are fixed.
That will be handled later in this patchset.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:25 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on mem side
64 bit transfers are possible on both sides in slave transfers (memory as well
as peripherals). This patch adds support for it memory side 64 bit transfers.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:23 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Don't handle block interrupts
Block interrupts give interrupt on completion of every LLI, which is actually
too much interrupts. This is just not required for current functioning of
dw_dmac.
So, just don't handle them at all.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:22 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Use dev_get_platdata() instead of accessing dev directly
Use already defined function dev_get_platdata() instead of accessing
pdev->dev.data.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:21 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Don't use magic number for total number of channels
Total number of channels is passed in pdata->nr_channels variable, thus we must
not use magic number '7' for total number of channels.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Viresh Kumar [Wed, 1 Feb 2012 10:42:20 +0000 (16:12 +0530)]
dmaengine/amba-pl08x: Take flow controller info from DMA_SLAVE_CONFIG
Flow controller information is passed now from DMA_SLAVE_CONFIG option. This
patch makes changes in pl08x driver to use device_fc from it instead of platform
data.
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>
Viresh Kumar [Wed, 1 Feb 2012 10:42:19 +0000 (16:12 +0530)]
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>
Viresh Kumar [Wed, 1 Feb 2012 10:42:18 +0000 (16:12 +0530)]
dmaengine: Add flow controller information to dma_slave_config
Flow controller is programmable for few controllers and there are few
intelligent peripherals like, Synopsys JPEG controller, that needs to be a flow
controller of DMA transfers on dest side.
For this, currently two drivers, pl08x and dw_dmac, support flow controller to
be passed from platform to these drivers.
Perhaps, this should be a part of struct dma_slave_config. This patch adds
another field device_fc to this structure. User drivers must pass this as true
if they want to be flow controller of certain transfers.
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>
Rajeev KUMAR [Wed, 1 Feb 2012 10:42:17 +0000 (16:12 +0530)]
dmaengine/dw_dmac: Hibernation support in dw_dmac
The suspend and resume implementation is through dev_pm_ops in dmac. So
in order to support hibernation, freeze, thaw, restore and poweroff
features are required.
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Acked-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Adrian Hunter [Tue, 31 Jan 2012 10:49:00 +0000 (12:49 +0200)]
dmaengine: intel_mid_dma: move pm_runtime_put
Move pm_runtime_put() to the end of intel_mid_dma_free_chan_resources()
because there is no sense in allowing runtime suspend while the driver
is still accessing the device.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Adrian Hunter [Tue, 31 Jan 2012 10:48:59 +0000 (12:48 +0200)]
dmaengine: intel_mid_dma: fix error status mask
The error status mask (MASK_ERR) has the same format as the other
masks (MASK_TFR, MASK_BLOCK etc) and must be cleared the same way.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Philippe Rétornaz [Tue, 24 Jan 2012 13:22:01 +0000 (14:22 +0100)]
i.MX SDMA: Fix burstsize settings
Commit
6584cb88 (ARM i.MX dma: Fix burstsize settings) fixed
the mxcmmc driver but forgot to fix the SDMA driver to handle the
correct burtsize.
This make the SD card access works again with DMA on i.MX31 boards.
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Wed, 1 Feb 2012 17:01:14 +0000 (22:31 +0530)]
Merge branch 'fixes' into next
Guennadi Liakhovetski [Wed, 18 Jan 2012 09:14:29 +0000 (10:14 +0100)]
ARM: mach-shmobile: both USB DMAC instances on sh7372 are slave-only
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Guennadi Liakhovetski [Wed, 18 Jan 2012 09:14:25 +0000 (10:14 +0100)]
dma: sh_dma: not all SH DMAC implementations support MEMCPY
Add a flag to allow platforms to specify, whether a DMAC instance supports
the MEMCPY operation. To avoid regressions, preserve the current default.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Vinod Koul [Tue, 31 Jan 2012 08:18:53 +0000 (13:48 +0530)]
Merge branch 'fixes' into next
Vinod Koul [Tue, 31 Jan 2012 08:04:15 +0000 (13:34 +0530)]
Merge branch fixes of git://git./linux/kernel/git/djbw/dmaengine.git
Nikolaus Voss [Tue, 17 Jan 2012 09:28:33 +0000 (10:28 +0100)]
at_hdmac: bugfix for enabling channel irq
commit
463894705e4089d0ff69e7d877312d496ac70e5b deleted redundant
chan_id and chancnt initialization in dma drivers as this is done
in dma_async_device_register().
However, atc_enable_irq() relied on chan_id set before registering
the device, what left only channel 0 functional for this driver.
This patch introduces atc_enable/disable_chan_irq() as a variant
of atc_enable/disable_irq() with the channel as explicit argument.
Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:10:01 +0000 (11:10 +0800)]
dma/imx-sdma: convernt to use bit ops
We don't need extra lock, so we use non-atomic bit ops to set/clear bits,
merge event_mask0 and event_mask1 into an array, it helps use bit ops.
It also fixs the issue:
sdmac->event_mask0 = 1 << sdmac->event_id0;
sdmac->event_mask1 = 1 << (sdmac->event_id0 - 32);
It event_id0 < 32, it shifts negative number. If event_id0 >= 32, it
shifts number >= sizeof(int). Both the cases behavior is undefined.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:10:00 +0000 (11:10 +0800)]
dma/imx-sdma: use num_events to validate event_id0
event number is not always 32. use num_events for checking instead.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:09:59 +0000 (11:09 +0800)]
dma/imx-sdma: move clk_enable out of sdma_request_channel
It makes clk_enable/disable pair more readable, and fix one bug:
sdma_init calls sdma_request_channel, but seems don't know
sdma_request_channel enabled the clock.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
[fixed typo in commit log]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:09:58 +0000 (11:09 +0800)]
dma/imx-sdma: call sdma_set_channel_priority after sdma_request_channel
sdma_request_channel sets the default priority. sdma_alloc_chan_resources
should call sdma_set_channel_priority thereafter to over write it.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:09:57 +0000 (11:09 +0800)]
dma/imx-sdma: use readl_relaxed/writel_relaxed and use writel when necessary
use readl_relaxed/writel_relaxed in most places, and use writel when
enable channel, because it needs memory barrier.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Richard Zhao [Fri, 13 Jan 2012 03:09:56 +0000 (11:09 +0800)]
dma/imx-sdma: let sdma_run_channel call sdma_enable_channel
Let all enable channel code call sdma_enable_channel.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Julia Lawall [Thu, 12 Jan 2012 21:49:29 +0000 (22:49 +0100)]
drivers/dma/amba-pl08x.c: adjust double test
Rewrite a duplicated test to test the correct value
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E;
@@
(
* E
|| ... || E
|
* E
&& ... && E
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Julia Lawall [Thu, 12 Jan 2012 09:55:06 +0000 (10:55 +0100)]
drivers/dma/pl330.c: add missing iounmap
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.
This patch additionally adds calls to clk_disable and clk_put.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (<+...e...+>) S
... when any
when != iounmap(e)
*if (...)
{ ... when != iounmap(e)
return ...; }
... when any
iounmap(e);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Sascha Hauer [Mon, 9 Jan 2012 09:32:50 +0000 (10:32 +0100)]
dma: imx-sdma: start transfer in issue_pending
The DMA engine API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[corrected change log to DMA engine API insteadof DMA API]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Sascha Hauer [Mon, 9 Jan 2012 09:32:49 +0000 (10:32 +0100)]
dma: imx-dma: start transfer in issue_pending
The DMA engine API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[corrected change log to DMA engine API insteadof DMA API]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Sascha Hauer [Mon, 9 Jan 2012 09:32:48 +0000 (10:32 +0100)]
ASoC: i.MX: Add missing dma_async_issue_pending
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Sascha Hauer [Mon, 9 Jan 2012 09:32:47 +0000 (10:32 +0100)]
mmc: mxcmmc: add missing dma_async_issue_pending
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Dr. David Alan Gilbert [Thu, 25 Aug 2011 23:13:55 +0000 (16:13 -0700)]
dmaengine: fix missing 'cnt' in ?: in dmatest
Hi,
On the latest tree my compiler has started giving the warning:
drivers/dma/dmatest.c:575:28: warning: the omitted middle operand in ?: will always be ?true?, suggest explicit middle operand [-Wparentheses]
The following patch fixes the missing middle clause with the same
fix that Nicolas Ferre used in the similar clauses.
(There seems to have been a race between him fixing that and
the extra clause going in a little later).
I don't actually know the dmatest code/structures, nor do I own
any hardware to test it on (assuming it needs a DMA engine);
but this patch builds, the existing code is almost certainly
wrong and the fix is the same as the corresponding lines above it.
(WTH is x=y?:z legal C anyway?)
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Linus Torvalds [Thu, 19 Jan 2012 23:04:48 +0000 (15:04 -0800)]
Linux 3.3-rc1
Linus Torvalds [Thu, 19 Jan 2012 22:53:06 +0000 (14:53 -0800)]
Merge branches 'sched-urgent-for-linus', 'perf-urgent-for-linus' and 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/accounting, proc: Fix /proc/stat interrupts sum
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT
x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore
x86/kprobes: Fix typo transferred from Intel manual
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
x86, tsc: Fix SMI induced variation in quick_pit_calibrate()
x86, opcode: ANDN and Group 17 in x86-opcode-map.txt
x86/kconfig: Move the ZONE_DMA entry under a menu
x86/UV2: Add accounting for BAU strong nacks
x86/UV2: Ack BAU interrupt earlier
x86/UV2: Remove stale no-resources test for UV2 BAU
x86/UV2: Work around BAU bug
x86/UV2: Fix BAU destination timeout initialization
x86/UV2: Fix new UV2 hardware by using native UV2 broadcast mode
x86: Get rid of dubious one-bit signed bitfield
Linus Torvalds [Thu, 19 Jan 2012 22:52:03 +0000 (14:52 -0800)]
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
gpio bug fixes for v3.3
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
gpio: tps65910: Use correct offset for gpio initialization
gpio/it8761e: Restrict it8761e gpio driver to x86.
gpio-ml-ioh: cleanup __iomem annotation usage
gpio-ml-ioh: cleanup NULL pointer checking
gpio-pch: cleanup __iomem annotation usage
gpio-pch: cleanup NULL pointer checking
Linus Torvalds [Thu, 19 Jan 2012 22:49:16 +0000 (14:49 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
qnx4: don't leak ->BitMap on late failure exits
qnx4: reduce the insane nesting in qnx4_checkroot()
qnx4: di_fname is an array, for crying out loud...
vfs: remove printk from set_nlink()
wake up s_wait_unfrozen when ->freeze_fs fails
H. Peter Anvin [Thu, 19 Jan 2012 20:41:25 +0000 (12:41 -0800)]
x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
In checkin
303395ac3bf3 x86: Generate system call tables and unistd_*.h from tables
the feature macros in <asm/unistd.h> were unified between 32 and 64
bits. Unfortunately 32 bits requires __ARCH_WANT_SYS_IPC and this was
inadvertently dropped.
Reported-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/CALLzPKbeXN5gdngo8uYYU8mAow=XhrwBFBhKfG811f37BubQOg@mail.gmail.com
H. Peter Anvin [Thu, 19 Jan 2012 20:56:50 +0000 (12:56 -0800)]
Merge remote-tracking branch 'linus/master' into x86/urgent
Linus Torvalds [Thu, 19 Jan 2012 19:46:08 +0000 (11:46 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
KEYS: Permit key_serial() to be called with a const key pointer
keys: fix user_defined key sparse messages
ima: fix cred sparse warning
MPILIB: Add a missing ENOMEM check
Al Viro [Thu, 19 Jan 2012 18:54:36 +0000 (13:54 -0500)]
qnx4: don't leak ->BitMap on late failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Thu, 19 Jan 2012 18:40:57 +0000 (13:40 -0500)]
qnx4: reduce the insane nesting in qnx4_checkroot()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Thu, 19 Jan 2012 18:19:42 +0000 (13:19 -0500)]
qnx4: di_fname is an array, for crying out loud...
(struct qnx4_inode_entry *)(bh->b_data + some_offset)->di_fname
is not going to be NULL, TYVM...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
David Howells [Wed, 18 Jan 2012 10:04:29 +0000 (10:04 +0000)]
KEYS: Permit key_serial() to be called with a const key pointer
Permit key_serial() to be called with a const key pointer.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Mimi Zohar [Wed, 18 Jan 2012 10:03:14 +0000 (10:03 +0000)]
keys: fix user_defined key sparse messages
Replace the rcu_assign_pointer() calls with rcu_assign_keypointer().
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Mimi Zohar [Wed, 18 Jan 2012 03:11:28 +0000 (22:11 -0500)]
ima: fix cred sparse warning
Fix ima_policy.c sparse "warning: dereference of noderef expression"
message, by accessing cred->uid using current_cred().
Changelog v1:
- Change __cred to just cred (based on David Howell's comment)
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Linus Torvalds [Thu, 19 Jan 2012 03:26:11 +0000 (19:26 -0800)]
uml: fix compile for x86-64
Randy Dunlap reports that we get
arch/x86/um/shared/sysdep/ptrace.h:7:20: error: redefinition of 'regs_return_value'
arch/x86/um/shared/sysdep/ptrace.h:7:20: note: previous definition of 'regs_return_value' was here
when compiling UML for x86-64.
Stephen Rothwell root-caused it and says:
"Caused by commit
d7e7528bcd45 ("Audit: push audit success and retcode
into arch ptrace.h") (another patch that was never in linux-next :-().
This file now needs protection against double inclusion."
so let's do as the man says.
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Analyzed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Wed, 18 Jan 2012 10:03:54 +0000 (10:03 +0000)]
MPILIB: Add a missing ENOMEM check
Add a missing ENOMEM check.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Linus Torvalds [Thu, 19 Jan 2012 00:29:42 +0000 (16:29 -0800)]
Merge branch 'for-next-merge' of git://git./linux/kernel/git/nab/target-pending
* 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
ib_srpt: Initial SRP Target merge for v3.3-rc1
Linus Torvalds [Wed, 18 Jan 2012 23:59:18 +0000 (15:59 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits)
target: Set additional sense length field in sense data
target: Remove legacy device status check from transport_execute_tasks
target: Remove __transport_execute_tasks() for each processing context
target: Remove extra se_device->execute_task_lock access in fast path
target: Drop se_device TCQ queue_depth usage from I/O path
target: Fix possible NULL pointer with __transport_execute_tasks
target: Remove TFO->check_release_cmd() fabric API caller
tcm_fc: Convert ft_send_work to use target_submit_cmd
target: Add target_submit_cmd() for process context fabric submission
target: Make target_put_sess_cmd use target_release_cmd_kref
target: Set response format in INQUIRY response
target: tcm_mod_builder: small fixups
Documentation/target: Fix tcm_mod_builder.py build breakage
target: remove overagressive ____cacheline_aligned annoations
tcm_loop: bump max_sectors
target/configs: remove trailing newline from udev_path and alias
iscsi-target: fix chap identifier simple_strtoul usage
target: remove useless casts
target: simplify target_check_cdb_and_preempt
target: Move core_scsi3_check_cdb_abort_and_preempt
...
Linus Torvalds [Wed, 18 Jan 2012 23:51:48 +0000 (15:51 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux
This includes initial support for the recently published ACPI 5.0 spec.
In particular, support for the "hardware-reduced" bit that eliminates
the dependency on legacy hardware.
APEI has patches resulting from testing on real hardware.
Plus other random fixes.
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
intel_idle: Split up and provide per CPU initialization func
ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
ACPI processor: Remove unneeded cpuidle_unregister_driver call
intel idle: Make idle driver more robust
intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
intel_idle: remove redundant local_irq_disable() call
ACPI processor: Fix error path, also remove sysdev link
ACPI: processor: fix acpi_get_cpuid for UP processor
intel_idle: fix API misuse
ACPI APEI: Convert atomicio routines
ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
ACPI: Fix possible alignment issues with GAS 'address' references
ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
ACPI: Store SRAT table revision
ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
ACPI, Record ACPI NVS regions
ACPI, APEI, EINJ, Refine the fix of resource conflict
...
Stefan Berger [Wed, 18 Jan 2012 03:07:30 +0000 (22:07 -0500)]
tpm: fix (ACPI S3) suspend regression
This patch fixes an (ACPI S3) suspend regression introduced in commit
68d6e6713fcb ("tpm: Introduce function to poll for result of self test")
and occurring with an Infineon TPM and tpm_tis and tpm_infineon drivers
active.
The suspend problem occurred if the TPM was disabled and/or deactivated
and therefore the TPM_PCRRead checking the result of the (asynchronous)
self test returned an error code which then caused the tpm_tis driver to
become inactive and this then seemed to have negatively influenced the
suspend support by the tpm_infineon driver... Besides that the tpm_tis
drive may stay active even if the TPM is disabled and/or deactivated.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 18 Jan 2012 23:41:27 +0000 (15:41 -0800)]
nvme: fix merge error due to change of 'make_request_fn' fn type
The type of 'make_request_fn' changed in
5a7bbad27a4 ("block: remove
support for bio remapping from ->make_request"), but the merge of the
nvme driver didn't take that into account, and as a result the driver
would compile with a warning:
drivers/block/nvme.c: In function 'nvme_alloc_ns':
drivers/block/nvme.c:1336:2: warning: passing argument 2 of 'blk_queue_make_request' from incompatible pointer type [enabled by default]
include/linux/blkdev.h:830:13: note: expected 'void (*)(struct request_queue *, struct bio *)' but argument is of type 'int (*)(struct request_queue *, struct bio *)'
It's benign, but the warning is annoying.
Reported-by: Stephen Rothwell <sfr@canb.auug.org>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stephen Rothwell [Wed, 18 Jan 2012 23:24:31 +0000 (10:24 +1100)]
xen: using EXPORT_SYMBOL requires including export.h
Fix these warnings:
drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]
And this build error:
ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 18 Jan 2012 21:46:13 +0000 (13:46 -0800)]
Merge branch 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linux
* 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linux:
i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS Semiconductor
i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOH
i2c-eg20t: modified the setting of transfer rate.
i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus number
i2c: OMAP: Add DT support for i2c controller
I2C: OMAP: NACK without STP
I2C: OMAP: correct SYSC register offset for OMAP4
Linus Torvalds [Wed, 18 Jan 2012 20:53:54 +0000 (12:53 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (57 commits)
[media] as3645a: Fix compilation by including slab.h
[media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c
[media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c
[media] ds3000: using logical && instead of bitwise &
[media] v4l2-ctrls: make control names consistent
[media] DVB: dib0700, add support for Nova-TD LEDs
[media] DVB: dib0700, add corrected Nova-TD frontend_attach
[media] DVB: dib0700, separate stk7070pd initialization
[media] DVB: dib0700, move Nova-TD Stick to a separate set
[media] : add MODULE_FIRMWARE to dib0700
[media] DVB-CORE: remove superfluous DTV_CMDs
[media] s5p-jpeg: adapt to recent videobuf2 changes
[media] s5p-g2d: fixed a bug in controls setting function
[media] s5p-mfc: Fix volatile controls setup
[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
[media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test
[media] s5p-fimc: Fix incorrect control ID assignment
[media] dvb_frontend: Don't call get_frontend() if idle
[media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T
[media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters
...
Linus Torvalds [Wed, 18 Jan 2012 20:53:36 +0000 (12:53 -0800)]
Merge branch 'fix/asoc' of git://git./linux/kernel/git/tiwai/sound
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: Wait for WM8993 FLL to stabilise
ASoC: core - Free platform DAPM context at platform removal.
ASoC: dapm - Fix check for codec context in dapm_power_widgets().
ASoC: sgtl5000: update author email address
ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
Laxman Dewangan [Wed, 18 Jan 2012 14:37:35 +0000 (20:07 +0530)]
gpio: tps65910: Use correct offset for gpio initialization
Using the correct gpio offset for setting the initial value
of gpio when setting output direction.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>