summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci_spi.c
Commit message (Collapse)AuthorAgeFilesLines
* crc: import crc_itu_t() from kernelSascha Hauer2019-03-041-2/+2
| | | | | | | | Our cyc_crc16() function is the same function as crc_itu_t() in the Linux kernel. Import and use crc_itu_t() from the Kernel for consistency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce device_spi_driver() macro and use it for SPI driversAlexander Shiyan2013-03-141-8/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* SPI: Rename spi_register_driver() for using with register_driver_macro()Alexander Shiyan2013-03-141-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci_spi: add clock frequency change supportJean-Christophe PLAGNIOL-VILLARD2012-11-141-1/+28
| | | | | | | | | setup the spi master correctly provide f_min and f_max Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci_spi: add sanity checkJean-Christophe PLAGNIOL-VILLARD2012-11-141-0/+11
| | | | | | | | | | as in linux SD/MMC support only mode 0 or 3 (if 0 not supported by the spi master) so if the mode is not 3 force 0 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci_spi: always compute command crc byteFranck Jullien2012-11-141-12/+0
| | | | | | | | | | | | The spec says: "the CMD8 CRC verification is always enabled. The Host shall set correct CRC in the argument ofCMD8. If CRC error is detected, card returns CRC error in R1 response regardless of command index." Make it simple, and compute crc on every commands. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-031-3/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mmc'Sascha Hauer2012-10-031-4/+4
|\ \
| * | Fix endianness error on be targetFranck Jullien2012-09-141-4/+4
| |/ | | | | | | | | | | | | Use be(xx)_to_cpu function to switch endianness intelligently. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / SPI: Put SPI devices on their own busSascha Hauer2012-09-141-1/+1
|/ | | | | | | | | This patch adds a SPI bus on which the SPI devices and drivers register. This makes it cleaner as SPI devices won't accidently end up probed by a platform_device driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* mci: remove unused device argument from set_iosSascha Hauer2012-02-091-2/+1
| | | | | | This argmuent is unused in all drivers, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci core: replace discrete ios values with struct iosSascha Hauer2012-02-091-1/+1
| | | | | | | As we'll need more arguments to set_ios over time put them in a struct mci_ios like the kernel does. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci_spi: specify hw_devJean-Christophe PLAGNIOL-VILLARD2012-01-061-0/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mmc spi: compile fixSascha Hauer2011-11-281-17/+12
| | | | | | | | | Without CRC support the mmc spi driver fails to compile with the following: drivers/mci/mci_spi.c:74:18: error: static declaration of 'crc7' follows non-static declaration Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: Add MCI over SPI supportFranck Jullien2011-11-251-0/+435
This patch adds MMC over SPI support to mci-core.c and mci_spi.c driver. This driver is useful when SOC doesn't have built-in MCI component. Tested with nios, 2Go SD-CARD and FAT file system. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>