summaryrefslogtreecommitdiffstats
path: root/sys/dev/mmc
Commit message (Collapse)AuthorAgeFilesLines
* Report relative card address to NewBus as location string.mav2010-05-231-0/+10
|
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-2/+0
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
* read_ivar takes a uintptr_t * not a u_char *.imp2009-03-121-1/+1
|
* Add kernel dumping support. Works fine with sdhci controller driver.mav2009-02-171-1/+30
|
* o Define some symbols for a few items that are bare constants in theimp2009-02-032-16/+34
| | | | | | code. o Use NULL in preference to 0 for a few pointers. o default to bus timing normal, like we default to bus_width_1.
* Add one more debug level.mav2009-01-281-2/+2
|
* Improve mmc driver verbose logging.mav2009-01-281-12/+78
| | | | Make requests logging controllable by hw.mmc.debug sysctl.
* Default to normal bus timing mode on SD cards. In practice, mostimp2009-01-211-0/+1
| | | | | | cards people have today support high speed mode, so the timing field would be initialized to bus_timing_hs, but there are some slow cards...
* Fix minor style nit for file consistency.imp2009-01-211-5/+4
|
* Make the command reporting be under boot verbose.imp2009-01-211-6/+10
| | | | | Also, report a few other things under boot verbose. Small style nit to make new code look like old code in this file.
* Fix copy/paste mistake in variable name. This could lead to using incorrectmav2009-01-211-1/+1
| | | | bus frequency.
* Implement suspend/resume for mmc and mmcsd drivers.mav2008-12-062-66/+164
| | | | | | | | | | | Now it is possible to suspend/resume with inserted and active card. To reinitialize card on resume and to detect card change while suspended, implement bus rescan routines. It can also be used by controllers without card presence detection signals or with multiple cards per slot support. While there, cleanup msleep() usage. We have no any rights to exit without "request done" signal from driver as it could lead to modify after free.
* Report card erase sector size as disk stripe size.mav2008-11-231-0/+2
|
* Improve detach handling: close races, flush queue.mav2008-11-231-13/+16
|
* Allow card reader bridge driver to report maximum supported transfer size.mav2008-10-294-8/+8
| | | | | | | | | sdhci supports up to 65535 blocks transfers, at91_mci - one block. Enable multiblock operations disabled before to follow at91_mci driver limitations. Reviewed by: imp@
* Coalesce sequentional BIO_DELETE requests to slightly relax size and alignmentmav2008-10-181-8/+23
| | | | constraints required by the card.
* Implement BIO_DELETE command with MMC and SD erase commands.mav2008-10-184-149/+333
| | | | | | | | | | | | | | | | | Erase operation gives card's logic information about unused areas to help it implement wear-leveling with lower overhead comparing to usual writing. Erase is much faster then write and does not depends on data bus speed. Also as result of hitting in-card write logic optimizations I have measured up to 50% performance boost on writing undersized blocks into preerased areas. At the same time there are strict limitations on size and allignment of erase operations. We can erase only blocks aligned to the erase sector size and with size multiple of it. Different cards has different erase sector size which usually varies from 64KB to 4MB. SD cards actually allow to erase smaller blocks, but it is much more expensive as it is implemented via read-erase-write sequence and so not sutable for the BIO_DELETE purposes. Reviewed by: imp@
* Use GB suffix only from 10GB instead of 1GB.mav2008-10-121-1/+1
| | | | | | | There are lot of cards with uneven sizes and too strong rounding will lead to very significant rounding errors. Reviewed by: imp@
* style(9): spaces around operators.imp2008-10-121-8/+12
|
* Print the cards natural size.imp2008-10-121-24/+58
| | | | | | Move nested tertiary operator expressions into their own function. Remove extra blank line. cache sd->disk in 'd' to make the code easier to read.
* SELECT_CARD command with zero RCA deselects all cards and so has no reply.mav2008-10-111-1/+1
|
* Give mmcsd driver a bit more information about card. It allows to reorganizemav2008-10-113-14/+36
| | | | | 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.
* Add high capacity MMC cards support.mav2008-10-091-5/+17
|
* o Use seprate routines to decode cid and csd for sd and mmc cards. All theyimp2008-10-091-90/+103
| | | | | | | 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.
* Only voltage bits should be zero in send_op_cond argument to ignore busy.mav2008-10-081-2/+4
|
* Generic SD Host Controller driver going to be named sdhci.mav2008-10-081-1/+1
|
* Fix bit offset in mmc_sd_switch().mav2008-10-081-2/+2
|
* Set of mmc layer improvements:mav2008-10-086-35/+557
| | | | | | | - add MMC support. - add SDHC support. - add 4 and 8 bit bus width support. - add High Speed bus timing support.
* Define and use MMC_SECTOR_SIZE.imp2008-10-024-4/+12
| | | | Make mmc_get_media_size now return an off_t and remove now useless cast.
* MAXPHYS seems more stable on the AT91RM9200 boards that I have. Weimp2008-10-021-1/+1
| | | | | may need to ask the host controller for the right number to use here...
* Improve support for multiple block read/write. This code is currentlyimp2008-09-301-38/+42
| | | | | | | | | disabled by default because there's problems with it on AT91RM9200, currently the only host controller in the tree. I've not had time to track those problems to ground. I'm committing because this is important for other host controllers that are in the pipeline. Submitted by: mav@
* Make the media size return the block rather than the bytes on the device.imp2008-09-291-1/+1
|
* Explicitly set data to NULL rather than relying mmc_wait_for_cmd() toimp2008-09-291-1/+8
| | | | | | | do it for us. There may be commands we have to wait for that need to set data. Submitted by: mav@
* Minor style fixes from mav@ (with similar problems fixed where I noticedimp2008-09-292-4/+5
| | | | | | | | | them): #define<tab> zero memory when we allocate it Put device name in error message. Submitted by: mav@
* Conform to style(9) for return (foo); The files were a mix before.imp2008-09-292-12/+12
| | | | Submitted by: mav@
* Convert all C++ comments to C style. There's lots of folks that don'timp2008-09-291-23/+30
| | | | like them and they don't add enough to be worth standing out.
* The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST wereimp2008-09-291-2/+2
| | | | | | | the device in question, rather than the bus doing the requesting. Fix it so that it is the bus. Submitted by: mav@
* Add "caps" word to host bridge.imp2008-09-281-0/+2
|
* Implement power down, and power down the bus on detach.imp2008-09-281-1/+15
| | | | Submitted by: mav@
* When a device is read only, fail all non-read BIO requests.imp2008-09-281-1/+8
| | | | Submitted by: mav@
* Propigate read-only status of cards. Right now it is read only atimp2008-09-283-1/+14
| | | | | | | device attach time. We may need to read this more often in the future, but for now simplicity of implementation wins. Submitted by: mav@
* The OCR register defines both acceptable voltage bits, as well as bitsimp2008-09-282-2/+3
| | | | | | | for other things. Mask out the voltage only bits when returning the Vdd mask for voltage computation. Submitted by: mav@
* Other busses on the system use the official capitalization for theimp2008-09-281-1/+1
| | | | | | technology. Make mmc conform to that. Submitted by: mav@
* Fix line continuation whitespace.imp2008-09-281-2/+2
| | | | Submitted by: mav@
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-2/+2
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* MFp4: When querying the operating condition of SD cards (using theimp2007-06-051-1/+1
| | | | | | | | | | | | 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.
* A careful reading of the disclaimer that is required to download theimp2007-05-268-0/+216
| | | | | | | | | 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.
* First cut at making detach work. also add sdh as a possible mmc bridge.imp2007-05-152-10/+65
| | | | | Submitted by: Andrea Bittau (Andrea may have updated patches, but I've tested these)
* Don't need mmc_mode ivarimp2007-05-151-2/+0
|
OpenPOWER on IntegriCloud