9
0
Fork 0
Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Shiyan e4588cf311 Introduce device_spi_driver() macro and use it for SPI drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:45 +01:00
Alexander Shiyan 2f65379c98 SPI: Rename spi_register_driver() for using with register_driver_macro()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 07:15:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6d0d1392f4 mci_spi: add clock frequency change support
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>
2012-11-14 21:09:41 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0738b3c6fe mci_spi: add sanity check
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>
2012-11-14 21:09:41 +01:00
Franck Jullien d4695def29 mci_spi: always compute command crc byte
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>
2012-11-14 21:08:55 +01:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer e5c12670d3 Merge branch 'for-next/mmc' 2012-10-03 21:11:01 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
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>
2012-09-17 10:57:41 +02:00
Sascha Hauer 617bfbcbeb SPI: Put SPI devices on their own bus
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>
2012-09-14 11:47:24 +02:00
Franck Jullien f33ba0125d Fix endianness error on be target
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>
2012-09-14 08:40:10 +02:00
Sascha Hauer 0b3c58c820 mci: remove unused device argument from set_ios
This argmuent is unused in all drivers, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:27 +01:00
Sascha Hauer 0f9892cce8 mci core: replace discrete ios values with struct ios
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>
2012-02-09 12:40:11 +01:00
Jean-Christophe PLAGNIOL-VILLARD 57baef0939 mci_spi: specify hw_dev
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-06 09:42:30 +01:00
Sascha Hauer 3db0a1e7fe mmc spi: compile fix
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>
2011-11-28 09:38:16 +01:00
Franck Jullien 2aad209b78 mci: Add MCI over SPI support
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>
2011-11-25 12:38:29 +01:00