Alexander Motin
eecec5bd59
SELECT_CARD command with zero RCA deselects all cards and so has no reply.
2008-10-11 17:30:02 +00:00
Alexander Motin
67d752c3d4
Give mmcsd driver a bit more information about card. It allows to reorganize
...
log message in a way a bit more common for disk devices. Also it will allow
mmcsd driver to use MMC/SD specific commands when needed.
2008-10-11 13:05:13 +00:00
Alexander Motin
fa5f41d31c
Add high capacity MMC cards support.
2008-10-09 20:09:56 +00:00
Warner Losh
4871891e2c
o Use seprate routines to decode cid and csd for sd and mmc cards. All they
...
have in common right now is a memset. This saves a parameter to
these routines, as well as a level of indentation.
o Make mmc_get_bits a little clearer... It really only works on 128-bit
registers right now.
2008-10-09 19:47:28 +00:00
Alexander Motin
49dd20d149
Only voltage bits should be zero in send_op_cond argument to ignore busy.
2008-10-08 21:10:55 +00:00
Alexander Motin
8d66abb099
Generic SD Host Controller driver going to be named sdhci.
2008-10-08 20:00:51 +00:00
Alexander Motin
07492efe64
Fix bit offset in mmc_sd_switch().
2008-10-08 18:13:14 +00:00
Alexander Motin
c18f1e2627
Set of mmc layer improvements:
...
- add MMC support.
- add SDHC support.
- add 4 and 8 bit bus width support.
- add High Speed bus timing support.
2008-10-08 17:35:41 +00:00
Warner Losh
38c51cbe85
Define and use MMC_SECTOR_SIZE.
...
Make mmc_get_media_size now return an off_t and remove now useless cast.
2008-10-02 07:06:59 +00:00
Warner Losh
051bc8ead2
Make the media size return the block rather than the bytes on the device.
2008-09-29 18:55:45 +00:00
Warner Losh
4e0efe35fa
Explicitly set data to NULL rather than relying mmc_wait_for_cmd() to
...
do it for us. There may be commands we have to wait for that need to
set data.
Submitted by: mav@
2008-09-29 18:33:08 +00:00
Warner Losh
dece39ab88
Minor style fixes from mav@ (with similar problems fixed where I noticed
...
them):
#define<tab>
zero memory when we allocate it
Put device name in error message.
Submitted by: mav@
2008-09-29 18:17:23 +00:00
Warner Losh
128d0ff2c4
Conform to style(9) for return (foo); The files were a mix before.
...
Submitted by: mav@
2008-09-29 18:05:26 +00:00
Warner Losh
6fdacf52be
Convert all C++ comments to C style. There's lots of folks that don't
...
like them and they don't add enough to be worth standing out.
2008-09-29 01:32:21 +00:00
Warner Losh
e9bb9da34d
The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were
...
the device in question, rather than the bus doing the requesting. Fix
it so that it is the bus.
Submitted by: mav@
2008-09-29 01:28:30 +00:00
Warner Losh
5d2f651035
Implement power down, and power down the bus on detach.
...
Submitted by: mav@
2008-09-28 23:24:52 +00:00
Warner Losh
40fab6e7c7
Propigate read-only status of cards. Right now it is read only at
...
device attach time. We may need to read this more often in the
future, but for now simplicity of implementation wins.
Submitted by: mav@
2008-09-28 22:40:11 +00:00
Warner Losh
8aaa15e202
The OCR register defines both acceptable voltage bits, as well as bits
...
for other things. Mask out the voltage only bits when returning the
Vdd mask for voltage computation.
Submitted by: mav@
2008-09-28 22:27:29 +00:00
Warner Losh
2703cdbb1b
Other busses on the system use the official capitalization for the
...
technology. Make mmc conform to that.
Submitted by: mav@
2008-09-28 22:23:06 +00:00
Warner Losh
752fe3b39e
Fix line continuation whitespace.
...
Submitted by: mav@
2008-09-28 22:21:53 +00:00
Warner Losh
6634080bee
MFp4: When querying the operating condition of SD cards (using the
...
application specific SEND_OP_COND (CMD55 + ACMD41), go ahead and allow
100 tries. This gives a timeout of a second rather than the ~100ms
the old style produces.
I've had one old 16MB SD card which needs the extra time. I've now
had reports from the field that other cards need this too.
Originally done at BSDcan 2007 while waiting to give my embedding
madness minitalk.
2007-06-05 17:04:44 +00:00
Warner Losh
14eced725c
A careful reading of the disclaimer that is required to download the
...
SD Simplified specification, as well as other SD and SDIO
implemenations I've examined, suggest this disclaimer may be required.
It is unclear to me exactly what the license would be for, or why it
might be required. Err on the side of caution and include this
disclaimer so anybody deploying this code can judge for themselves. I
have no further unformation about the details.
2007-05-26 05:23:36 +00:00
Warner Losh
0e1466ac89
First cut at making detach work. also add sdh as a possible mmc bridge.
...
Submitted by: Andrea Bittau
(Andrea may have updated patches, but I've tested these)
2007-05-15 05:49:14 +00:00
Warner Losh
114b4164dd
Preliminary MMC stack. This stack supports SD 1.0 cards only, but
...
should be easily adapted to SD 2.0 (aka SDHC), SDIO, MMC and MMCplus
cards. At the present time, there's only one bridge driver for the
ARM9 based Atmel AT91RM9200.
2006-10-20 06:39:59 +00:00