aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-lib.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-14spi: fsl: Kill mpc8xxx_spi_cleanup and convert fsl_espi_setup to use devm_kzallocAxel Lin1-1/+0
In current code, master->cleanup and master->setup are not set in the same function. This makes it hard to read and not good for code maintain. One example is in fsl-spi.c, master->cleanup is overrided in mpc8xxx_spi_probe() which leads to a memory leak. This patch removes mpc8xxx_spi_cleanup() and converts fsl_espi_setup to use devm_kzalloc so we don't need to take care of freeing memory. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-04-07spi/spi-fsl-spi: Add support for gpio chipselects for GRLIB type coresAndreas Larsson1-0/+1
This relies upon of_spi_register_master to find out which gpios to use. Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-07spi/spi-fsl-spi: Add support for setting a maximum number of bits per wordAndreas Larsson1-0/+1
Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-07spi/spi-fsl-spi: Introduce a type for the driverAndreas Larsson1-0/+2
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 <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-07spi/spi-fsl-spi: Move setting non-zero tx and rx shifts to a function accessed by a function pointerAndreas Larsson1-0/+5
Acked-by: Anton Vorontsov <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-07spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environmentAndreas Larsson1-2/+4
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 <anton@enomsg.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-06spi: reorganize driversGrant Likely1-0/+123
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@linaro.org>