07 Apr, 2013
4 commits
-
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
Signed-off-by: Andreas Larsson
Signed-off-by: Grant Likely -
Acked-by: Anton Vorontsov
Signed-off-by: Andreas Larsson
Signed-off-by: Grant Likely -
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
Signed-off-by: Andreas Larsson
Signed-off-by: Grant Likely -
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
Signed-off-by: Andreas Larsson
Signed-off-by: Grant Likely
04 Apr, 2013
2 commits
-
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
Signed-off-by: Mark Brown -
This reverts commit faa98f7ea6c720beec8a800c9ac6975f760467e2 which was
applied in error due to discussion ending up in the wrong thread.
01 Apr, 2013
19 commits
-
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
Signed-off-by: Mark Brown -
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
Signed-off-by: Wenyou Yang
Signed-off-by: Mark Brown -
Signed-off-by: Nicolas Ferre
Signed-off-by: Wenyou Yang
Signed-off-by: Mark Brown -
Signed-off-by: Wenyou Yang
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown -
The "has_dma_support" needed for future use with dmaengine driver.
[Fixed some unneded ternery operators -- broonie]
Signed-off-by: Wenyou Yang
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown -
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.Signed-off-by: Alexandru Gheorghiu
Signed-off-by: Mark Brown -
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.Signed-off-by: Alexandru Gheorghiu
Signed-off-by: Mark Brown -
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
Signed-off-by: Anatolij Gustschin
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org -
The variable bits_per_word is initialized but never used
otherwise, so remove the unused variable.Signed-off-by: Wei Yongjun
Acked-By: Laxman Dewangan
Signed-off-by: Mark Brown -
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.Signed-off-by: Sachin Kamat
Signed-off-by: Mark Brown -
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.Signed-off-by: Sachin Kamat
Acked-by: Thomas Chou
Signed-off-by: Mark Brown -
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
Reviewed-by: Doug Anderson
Signed-off-by: Doug Anderson
Acked-by: Linus Walleij
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown -
The core can do the validation for us.
Signed-off-by: Mark Brown
-
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
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
26 Mar, 2013
1 commit
-
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
Signed-off-by: Mark Brown
13 Mar, 2013
14 commits
-
Use devm_ioremap_resource() which provides its own error messages.
Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
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
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
It only does one check, so just do the check directly in the caller.
Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
The check would belong in bcm63xx_spi_setup if the spi subsystem
weren't already doing the check for us, so just drop it.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
bcm63xx_spi_check_transfer is only called from one place that has
t always set, so directly check the transfer's bits_per_word.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
Instead of fixing up the bits_per_word (which the spi subsystem already
does for us), check it for supported values.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
It is only written, but never read.
Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
The spi subsystem already provides this info in a more extensive
debug print except for the nsecs/bit - which wasn't calculated anyway
and fixed to 0.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
The spi subsystem already checks the mode bits before calling setup.
Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
Use proper clk_prepare/unprepare calls in preparation for switching
to the generic clock framework.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
When msg_ctl_width is set to an invalid value we try to disable the
clock despite it never being enabled. Fix it by jumping to the correct
label.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
This fixes the following warning:
drivers/spi/spi-bcm63xx.c: In function 'bcm63xx_spi_setup':
drivers/spi/spi-bcm63xx.c:157:6: warning: unused variable 'ret'Signed-off-by: Kevin Cernekee
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
The prepare_transfer_hardware() is called in atomic context and
calling synchronous runtime pm calls can create scheduling deadlock.Therefore, in place of calling runtime PM calls from prepare/unprepare
message transfer, calling this in transfer_one_message().Signed-off-by: Laxman Dewangan
Tested-by: Stephen Warren
Signed-off-by: Mark Brown