summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-octeon.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-30Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/init', ↵Mark Brown1-68/+10
'spi/topic/mpc512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
2014-03-03spi: octeon: Convert to let spi core validate transfer speedAxel Lin1-2/+1
Set master->max_speed_hz then spi core will handle checking transfer speed. The behavior is different from current code when the speed_hz is greater than the maximum transfer speed supported by the controller. Unless there is other good reason, I think we had better make the behavior consistent with what spi core does. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03spi: octeon: Remove struct octeon_spi_setup usageAxel Lin1-62/+7
Current code uses struct octeon_spi_setup to store max_speed_hz, chip_select and mode settings of current spi device. We can always get the same settings in octeon_spi_do_transfer() by msg->spi. So this patch removes struct octeon_spi_setup and octeon_spi_setup, octeon_spi_cleanup functions. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-16spi: Remove explictly set bus_num and num_chipselect to default settingAxel Lin1-2/+0
The purpose of commit 1e8a52e18cfb "spi: By default setup spi_masters with 1 chipselect and dynamics bus number" is to avoid setting default value for bus_num and num_chipselect in spi master drivers. So let's remove the duplicate code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-By: David Daney <david.daney@cavium.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11spi: octeon: Remove unused bits_per_word from struct octeon_spi_setupAxel Lin1-2/+0
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03spi: octeon: Use list_is_last() instead of open-codedAxel Lin1-1/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03spi: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26spi: octeon: use devm_spi_register_master()Jingoo Han1-3/+1
Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20spi: octeon: Convert to use bits_per_word_maskAxel Lin1-27/+1
Since commit 543bb25 "spi: add ability to validate xfer->bits_per_word in SPI core", the driver can set bits_per_word_mask for the master then the SPI core will reject transfers that attempt to use an unsupported bits_per_word value. So we can remove octeon_spi_validate_bpw() and let SPI core handle the checking. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20spi: octeon: Remove unused bits_per_word variable in octeon_spi_do_transferAxel Lin1-4/+0
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20spi: octeon: Remove empty octeon_spi_nop_transfer_hardware functionAxel Lin1-7/+0
Both prepare_transfer_hardware and unprepare_transfer_hardware callbacks are optional, so we don't need to implement an empty function for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05spi: octeon: Remove my_master pointer from struct octeon_spiAxel Lin1-6/+4
Pass master to platform_set_drvdata() then we can remove my_master pointer. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2012-12-07spi: Remove HOTPLUG section attributesGrant Likely1-3/+3
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Bill Pemberton has done most of the legwork on this series. I've used his script to purge the attributes from the drivers/gpio tree. Reported-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-08-22spi: Add SPI master controller for OCTEON SOCs.David Daney1-0/+362
Add the driver, link it into the kbuild system and provide device tree binding documentation. Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Patchwork: http://patchwork.linux-mips.org/patch/4292/ Signed-off-by: John Crispin <blogic@openwrt.org>