Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch fixes the following sparse warnings.
dma_addr_t can be either u32 or u64 so we should cast to the
largest type and use the format specifier %llx.
drivers/spi/spi-atmel.c: In function ‘atmel_spi_next_xfer_dma_submit’:
drivers/spi/spi-atmel.c:631:2: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:631:2: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c: In function ‘atmel_spi_pdc_next_xfer’:
drivers/spi/spi-atmel.c:734:3: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:734:3: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:773:3: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:773:3: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 9 has type ‘dma_addr_t’ [-Wformat]
Signed-off-by: Emil Goode <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Commit 048177ce3b3962852fd34a7e04938959271c7e70 (spi: spi-davinci:
convert to DMA engine API) introduced a regression: dma_map_single()
is called with direction DMA_FROM_DEVICE for rx and for tx.
Signed-off-by: Christian Eggers <[email protected]>
Acked-by: Matt Porter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected] # v3.7.x+
|
|
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Most SPI drivers that implement runtime PM support use identical code to
do so: they acquire a runtime PM lock in prepare_transfer_hardware() and
then they release it in unprepare_transfer_hardware(). The variations in
this are mostly missing error checking and the choice to use autosuspend.
Since these runtime PM calls are normally the only thing in the prepare
and unprepare callbacks and the autosuspend API transparently does the
right thing on devices with autosuspend disabled factor all of this out
into the core with a flag to enable the behaviour.
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
Acked-by: Linus Walleij <[email protected]>
|
|
Currently the tegra slink driver acquires a runtime PM reference for the
duration of each transfer. This may result in the IP being powered down
between transfers which would be at best wasteful. Instead it is better
to do this in the callbacks that are generated before and after starting
a series of transfers, keeping the IP powered throughout.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Laxman Dewangan <[email protected]>
|
|
Currently the tegra sflash driver acquires a runtime PM reference for the
duration of each transfer. This may result in the IP being powered down
between transfers which would be at best wasteful. Instead it is better
to do this in the callbacks that are generated before and after starting
a series of transfers, keeping the IP powered throughout.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Laxman Dewangan <[email protected]>
|
|
Currently the tegra114 driver acquires a runtime PM reference for the
duration of each transfer. This may result in the IP being powered down
between transfers which would be at best wasteful. Instead it is better
to do this in the callbacks that are generated before and after starting
a series of transfers, keeping the IP powered throughout.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Laxman Dewangan <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Andrew Lunn <[email protected]>
|
|
Enable auto loading by udev when spi-imx is compiled as a module.
Signed-off-by: Niels de Vos <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Enable the build of drivers which don't have any real build time
dependency on their architecture or platform with COMPILE_TEST,
providing better build time coverage.
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Mark Brown <[email protected]>
|
|
Let checkers like sparse know that the locking imbalances are intentional
in these functions.
Signed-off-by: Mark Brown <[email protected]>
|
|
Previously the runtime PM API insisted on having callbacks for everything
but this requirement was removed a while ago so the empty callbacks can
also be removed.
Signed-off-by: Mark Brown <[email protected]>
|
|
This adds no meaningful value.
Signed-off-by: Mark Brown <[email protected]>
|
|
Keystone2 SOCs share the SPI IP block with DaVinci based SOCs. Update
the config bits so that its usable on Keystone2 based SOCs.
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
sdd->ops->request is unsigned int, not unsigned long.
Also, sdd->rx_dma.ch is a 'struct dma_chan *'.
Thus, (void *) is converted to (struct dma_chan *)(unsigned long),
in order to fix possible sparse warnings.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix the following build warnings when LPAE is enabled:
drivers/spi/spi-s3c64xx.c:1466:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type
'resource_size_t' [-Wformat]
drivers/spi/spi-s3c64xx.c:1466:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type
'resource_size_t' [-Wformat]
Use vsprintf extension %pR to format resource.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix the following checkpatch error and warnings:
ERROR: "(foo*)" should be "(foo *)"
WARNING: line over 80 characters
WARNING: quoted string split across lines
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Since the driver has been converted to use the core message pump code
the only use of the messsage queue in the driver is a check to see if
it is empty which will always succeed since nothing ever adds to the
queue. Just remove the queue.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
|
|
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
As devm_ioremap_resource() is used on probe, there is no need to explicitly
check the return value from platform_get_resource(), as this is something that
devm_ioremap_resource() takes care by itself.
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Make spi core calculate the message length while
populating the other transfer parameters.
Usecase, driver can use it to populate framelength filed in their
controller.
Signed-off-by: Sourav Poddar <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Since commit 2025172e3 (spi/bitbang: Use core message pump), the following
kernel crash is seen:
Unable to handle kernel NULL pointer dereference at virtual address 0000000d
pgd = 80004000
[0000000d] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 1 PID: 48 Comm: spi32766 Not tainted 3.11.0-rc1+ #4
task: bfa3e580 ti: bfb90000 task.ti: bfb90000
PC is at spi_bitbang_transfer_one+0x50/0x248
LR is at spi_bitbang_transfer_one+0x20/0x248
...
,and also the following build warning:
drivers/spi/spi-bitbang.c: In function 'spi_bitbang_start':
drivers/spi/spi-bitbang.c:436:31: warning: assignment from incompatible pointer type [enabled by default]
In order to fix it, we need to change the first parameter of
spi_bitbang_transfer_one() to 'struct spi_master *master'.
Tested on a mx6qsabrelite by succesfully probing a SPI NOR flash.
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
In xilinx_spi_probe() we use xspi->irq to store negative error codes so
it has to be signed. We weren't going to use the upper bit any way so
this is fine.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Convert drivers using bitbang to use the core mesasge pump infrastructure,
saving some code and meaning that these drivers get to take advantage of
work done on improving the core implementation.
Signed-off-by: Mark Brown <[email protected]>
|
|
The SPI core provides infrastructure for standard message queueing. Use
that instead of handling it in the driver.
Signed-off-by: H Hartley Sweeten <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to
avoid common clk framework warnings.
Signed-off-by: Boris BREZILLON <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
|
|
|
|
Use devm_request_irq() for irq allocation which
simplify driver code.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
It simplifies driver probing.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
devm_ioremap_resource() automatically checks that
struct resource is initialized.
Also group platform_get_resource() and devm_ioremap_resource()
together.
And remove mem resource from struct xilinx_spi.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
dev.of_node is in struct device all the time.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This is a more traditional name and makes things a bit clearer when
referring to actual struct devices as we do frequently during probe().
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Michal Simek <[email protected]>
|
|
In the past there used to be a separate platform device type for device
tree systems so the probe and removal functions were split into generic
and bus sections. Since this is no longer the case simplify the code (and
remove some unprototyped exports) by factoring everything into the bus
probe() and remove().
Signed-off-by: Mark Brown <[email protected]>
|
|
Saves code and reduces the possibility of error.
Signed-off-by: Mark Brown <[email protected]>
|
|
We have nice specifier in kernel for that.
It changes separator from ',' (comma) to space, though it's not a big deal
since it's just a debug message.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Missing this will cause some user cases fail when they want to change spi
transfer mode.
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|