[PATCH] MMC/SD SPI-mode driver

Patrick Kelsey kelsey at ieee.org
Sun Mar 11 02:13:19 UTC 2012


There are two .diff files attached to this message.  The first is an
MMC/SD SPI-mode driver (mmcspi) that implements the existing mmc/sd
bridge interface and talks to the spibus interface (the latter with a
few modifications).  The second is the changes to the ar71xx_spi
driver that I made to support the mmcspi driver.  I developed these
patches using a MikroTik RB450G and tested it with 31 different
microSD cards.

Change details for mmcspi.diff:

Existing mmc/sd stack:
- Added concept of bus type (bus_type_sd vs. bus_type_spi)
- Fixed some typos
- Fixed some math errors in csd decode
- Fixed bad lookup table
- Fixed bad arg to mmc_send_app_op_cond() during probe
- Added setting of block length on card
- Added detection (and skipping) of password-locked cards
- Avoid card select and bus timing commands when bus type is bus_type_spi
- Added new command flag MMC_CMD_IS_APP to annotate ACMD_x commands

Existing spibus interface:
- Incorporated Luiz Otavio O Souza's acquire/release/write patch
- Added configuration methods
- Added flag to allow transactions with chip select high (needed for
  proper sd card init)


Change details for ar71xx_spi.diff
- Incorporated Luiz Otavio O Souza's patch implementing his changes to spibus_if
- Added configuration methods and clock setting support


-Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mmcspi.diff
Type: application/octet-stream
Size: 84145 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20120311/e8993492/mmcspi-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ar71xx_spi.diff
Type: application/octet-stream
Size: 11148 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20120311/e8993492/ar71xx_spi-0001.obj


More information about the freebsd-mips mailing list