Age | Commit message (Collapse) | Author | Files | Lines |
|
Don't silently ignore errors, report them.
Signed-off-by: Mark Brown <[email protected]>
|
|
The multiplatform conversion in commit 788437 (spi: s3c64xx: move to
generic dmaengine API) tested for the use of the Samsung-specific DMA
API with SAMSUNG_DMADEV when in fact S3C_DMA should be used. This
renderd DMA based transfers non-functional on platforms not using
dmaengine.
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
With device core now able to setup the default pin configuration,
the pin configuration code based on the deprecated Samsung specific
gpio bindings is removed.
Signed-off-by: Thomas Abraham <[email protected]>
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Reviewed-by: Doug Anderson <[email protected]>
Tested-by: Doug Anderson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
I've taken a full time position with Linaro and so I'll be using my
Linaro email address from this point on. It has also been many years
since I've touched any of the Xilinx related code so mark those items as
unmaintained.
In addition, Mark Brown is taking the lead on SPI maintainership now, so
I've reversed the order of our names for that entry.
Signed-off-by: Grant Likely <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Rob Herring <[email protected]>
|
|
Selecting CONFIG_DMADEVICES is optional, and we must
be able to continue even without DMA. Otherwise things
like omap4430sdp nfsroot will fail if DMA is not
selected.
Note that the driver already supports PIO mode, but
we fail to fall back to PIO if requesting DMA channels
fails.
Signed-off-by: Tony Lindgren <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The spi-s3c64xx uses a Samsung proprietary interface for
talking to the DMA engine, which does not work with
multiplatform kernels.
This version of the patch leaves the old code in place,
behind an #ifdef. This can be removed in the future,
after the s3c64xx platform start supporting the regular
dmaengine interface. An earlier version of this patch was
tested successfully on exynos5250 by Padma Venkat.
The conversion was rather mechanical, since the samsung
interface is just a shallow wrapper around the dmaengine
interface.
Signed-off-by: Arnd Bergmann <[email protected]>
|
|
spi_bitbang_setup() deasserts the chip select line to initialise
the device. The chip select GPIO line is obtained from
spi_gpio->cs_gpios[] private data.
Currently, devices that are not registered under devicetree
environment will call into spi_bitbang_setup() with stale
cs_gpios[].
This patch ensures spi_gpio->cs_gpios[] is always initialised prior
to calling spi_bitbang_setup().
Reviewed-by: Daniel Mack <[email protected]>
Signed-off-by: Josef Ahmad <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
There is no need to disable transmitter/receiver after each loop
iteration and re-enable it for next loop iteration. Enable the
transmitter/receiver before xfer loop starts and disable it when
the whole transfer is done.
Signed-off-by: Anatolij Gustschin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Currently the driver only uses one internal chip select.
Add support for gpio chip selects configured by cs-gpios
DT binding.
Signed-off-by: Anatolij Gustschin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
speed_hz is a write only member, so we can safely remove it and its
generation. Also fixes the missing clk_put after getting the periph
clock.
Signed-off-by: Jonas Gorski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Neither tegra20_spi_cdata nor tegra30_spi_cdata are used outside this
file so they can, and should, be static.
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Thierry Reding <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add SPI driver for NVIDIA's Tegra114 SPI controller. This controller
is different than the older SoCs SPI controller in internal design as
well as register interface.
This driver supports the:
- non DMA based transfer for smaller transfer i.e. less than FIFO depth.
- APB DMA based transfer for larger transfer i.e. more than FIFO depth.
- Clock gating through runtime PM callbacks.
- registration through DT only.
Signed-off-by: Laxman Dewangan <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
The platform data header is no longer used. Delete it.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver. Platform data is
therefore no longer required. Rework the driver to parse the device tree
directly into struct tegra_slink_data.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver. Platform data is
therefore no longer required. Rework the driver to parse the device tree
directly into struct tegra_sflash_data.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
There is no code to set spi->controller_data, and hence the HW CS logic
can never trigger. Remove the unused code.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This relies upon of_spi_register_master to find out which gpios to use.
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
running on SPARC
This adds support for the mostly register-compatible SPICTRL cores from the
GRLIB VHDL IP core library from Aeroflex Gaisler. They are normally running on
SPARC. A different entry in of_fsl_spi_match matches this core and indicates a
different hardware type that is used to set up different function pointers and
special cases.
The GRLIB core operates in cpu mode. The number of bits per word might be
limited. There might be native chipselects selected via a slave select
register. These differences to the FSL type cores, if present, are indicated by
a capabilities register. Other register and function differences exists but are
not relevant to the driver.
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
For being able to distinguishing between the regular type of cores and others
with different entries in of_fsl_spi_match.
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
accessed by a function pointer
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This is needed for a device in SPI_CS_HIGH mode that otherwise could start out
active for the first transaction.
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
environment
This makes the spi-fsl-spi driver usable in CPU mode outside of an FSL_SOC and
even an powerpc environment by moving CPM mode functionality to a separate file
that is only compiled and linked in an FSL_SOC environment and adding some
ifdefs to hide types and functions or provide alternatives.
For devicetree probing a "clock-frequency" property is used for clock frequency
instead of calls to FSL_SOC-specific functions.
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Andreas Larsson <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This reverts commit faa98f7ea6c720beec8a800c9ac6975f760467e2 which was
applied in error due to discussion ending up in the wrong thread.
|
|
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.
drivers/spi/spi-s3c64xx.c:1362:12: warning: 's3c64xx_spi_suspend' defined but not used [-Wunused-function]
drivers/spi/spi-s3c64xx.c:1381:12: warning: 's3c64xx_spi_resume' defined but not used [-Wunused-function]
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
The status of transfer is stored in controller data structure
so that it can be used not only by atmel_spi_msg_done() function.
This will be useful for upcoming dmaengine enabled driver.
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Wenyou Yang <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
register.
The "has_dma_support" needed for future use with dmaengine driver.
[Fixed some unneded ternery operators -- broonie]
Signed-off-by: Wenyou Yang <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Spi starts transfer using dma with DMA_CTRL_ACK which is not require
becasue spi driver does not use completed dma_desc after transfer
done and so it does not ack the dma descriptor. Removing the
DMA_CTRL_ACK flag to avoid memory leak in dma driver.
Signed-off-by: Laxman Dewangan <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Some SPI slave devices require asserted chip select signal across
multiple transfer segments of an SPI message. Currently the driver
always de-asserts the internal SS signal for every single transfer
segment of the message and ignores the 'cs_change' flag of the
transfer description. Disable the internal chip select (SS) only
if this is needed and indicated by the 'cs_change' flag.
Without this change, each partial transfer of a surrounding
multi-part SPI transaction might erroneously change the SS
signal, which might prevent slaves from answering the request
that was sent in a previous transfer segment because the
transaction could be considered aborted (SS was de-asserted
before reading the response).
Reported-by: Gerhard Sittig <[email protected]>
Signed-off-by: Anatolij Gustschin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
|
|
The variable bits_per_word is initialized but never used
otherwise, so remove the unused variable.
Signed-off-by: Wei Yongjun <[email protected]>
Acked-By: Laxman Dewangan <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Thomas Chou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
spi_pump_messages() calls into a controller driver with
unprepare_transfer_hardware() which is documented as "This may sleep".
As in the prepare_transfer_hardware() call below, we should release the
queue_lock spinlock before making the call.
Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
then release it to call unprepare_transfer_hardware().
Signed-off-by: Bryan Freed <[email protected]>
Reviewed-by: Doug Anderson <[email protected]>
Signed-off-by: Doug Anderson <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
It is possible that the handler gets interrupted after checking the
status. After it resumes the time out is due but the condition it was
waiting for might be true as well. Therefore it is necessary to check
the condition in case of an time out to be sure that the condition is
not true after the time passed by.
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The core can do the validation for us.
Signed-off-by: Mark Brown <[email protected]>
|
|
This driver only supports bits_per_word==8, so inform the SPI core of
this. Remove all the open-coded validation that's no longer needed.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Allow SPI masters to define the set of bits_per_word values they support.
If they do this, then the SPI core will reject transfers that attempt to
use an unsupported bits_per_word value. This eliminates the need for each
SPI driver to implement this checking in most cases.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The status of the interrupt is available in the status register,
so reading the clear pending register and writing back the same
value will not actually clear the pending interrupts. This patch
modifies the interrupt handler to read the status register and
clear the corresponding pending bit in the clear pending register.
Modified the hwInit function to clear all the pending interrupts.
Signed-off-by: Girish K S <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
|
|
The pointer to the driver data is never used to get the slave
controller data. We can delete the unused argument from the function.
Signed-off-by: Matthias Brugger <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use devm_ioremap_resource() which provides its own error messages.
Signed-off-by: Jonas Gorski <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
bcm63xx_spi_setup_transfer is called from only one place, and that has
t always set, to hz will always be t->speed_hz - just use it directly in
the two places instead of moving it in a local variable.
Signed-off-by: Jonas Gorski <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
It only does one check, so just do the check directly in the caller.
Signed-off-by: Jonas Gorski <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|