- 24 9月, 2007 9 次提交
-
-
由 David Brownell 提交于
Teach the MMC/SD/SDIO core about using SPI mode. - Use mmc_host_is_spi() so enumeration works through SPI signaling and protocols, not just the native versions. - Provide the SPI response type flags with each request issued, including requests from the new lock/unlock code. - Understand that cmd->resp[0] and mmc_get_status() results for SPI return different values than for "native" MMC/SD protocol; this affects resetting, checking card lock status, and some others. - Understand that some commands act a bit differently ... notably: * OP_COND command doesn't return the OCR * APP_CMD status doesn't have an R1_APP_CMD analogue Those changes required some new and updated primitives: - Provide utilities to access two SPI-only requests, and one request that wasn't previously needed: * mmc_spi_read_ocr() ... SPI only * mmc_spi_set_crc() ... SPI only (override by module parm) * mmc_send_cid() ... for use without broadcast mode - Updated internal routines: * Previous mmc_send_csd() modified into mmc_send_cxd_native(); it uses native "R2" responses, which include 16 bytes of data. * Previous mmc_send_ext_csd() becomes new mmc_send_cxd_data() helper for command-and-data access * Bugfix to that mmc_send_cxd_data() code: dma-to-stack is unsafe/nonportable, so kmalloc a bounce buffer instead. - Modified mmc_send_ext_csd() now uses mmc_send_cxd_data() helper - Modified mmc_send_csd(), and new mmc_spi_send_cid(), routines use those helper routines based on whether they're native or SPI The newest categories of cards supported by the MMC stack aren't expected to work yet with SPI: MMC or SD cards with over 4GB data, and SDIO. All those cards support SPI mode, so eventually they should work too. Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Increase delay for power up in order to support some slower boards. Also add some comments about why the delays are there. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Replace all cases of BUG_ON with WARN_ON where there is a chance (with varying degrees of slim) that the kernel can continue without incidence. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
SDIO doesn't have a CSD so it uses different timeout values than SD memory. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Nicolas Pitre 提交于
It is sometimes necessary to give up on trying to claim the host lock, especially if that happens in a thread that has to be stopped. While at it, fix the description for mmc_claim_host() which was wrong. Signed-off-by: NNicolas Pitre <npitre@mvista.com> Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Nicolas Pitre 提交于
The problem is that the sdio_bus must be registered before any SDIO drivers are registered against it otherwise the kernel sulks. Because the sdio_bus registration happens through module_init (equivalent to device_initcall), then any SDIO drivers linked before the SDIO core code in the kernel will be initialized first. Upcoming SDIO function drivers are likely to be located outside the drivers/mmc directory as it is common practice to group drivers according to their function rather than the bus they use. SDIO drivers are therefore likely to appear at random location in the kernel link. To make sure the sdio_bus is always initialized before any SDIO drivers, let's move the MMC init to the subsys_initcall level. Signed-off-by: NNicolas Pitre <npitre@mvista.com> Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Add the sdio bus type and basic device handling. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Really basic init sequence for SDIO cards. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 23 9月, 2007 2 次提交
-
-
由 Pierre Ossman 提交于
The write parameter in mmc_set_data_timeout() is redundant as the data structure contains information about the direction of the transfer. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 26 7月, 2007 4 次提交
-
-
由 Adrian Bunk 提交于
This patch makes the following needlessly global functions static: - sd_ops.c: mmc_app_cmd() - core.c: __mmc_release_bus() - core.c: mmc_start_request() Signed-off-by: NAdrian Bunk <bunk@stusta.de> Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Make sure that the debugging output in the core is complete. This should allow us to clean up all the extra debug output that each and every other host driver seems to contain. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
In the normal case, the host lock can be claimed directly. When it cannot, the caller will sleep. Make sure we don't have any latent bugs by always calling might_sleep(). Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Make sure the kerneldoc comments are up to date and relevant. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 10 7月, 2007 3 次提交
-
-
由 Pierre Ossman 提交于
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Move basic host class device handling to its own file for clarity. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Move bus operations to its own file for the sake of clarity. Also delegate sysfs attributes to bus handlers in preparation for other more exotic types. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 10 5月, 2007 1 次提交
-
-
由 Andrew Morton 提交于
Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 09 5月, 2007 1 次提交
-
-
由 Pierre Ossman 提交于
As mmc_detect_change() can be called from irq context, using claim (which can sleep) is inherently unsafe. Use the host spinlock instead, which also is faster. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 01 5月, 2007 12 次提交
-
-
由 Pierre Ossman 提交于
Since many have the system root on MMC/SD we must allow some foot shooting when it comes to resume. We cannot detect if a card is removed and reinserted during suspend, so the safe approach would be to assume it was, avoiding potential filesystem corruption. This will of course not work if you cannot release the card before suspend. This commit adds a compile time option that makes the MMC layer assume the card wasn't touched if it is redetected upon resume. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Delegate protocol handling to "bus handlers". This allows the core to just handle the task of arbitrating the bus. Initialisation and pampering of cards is now done by the different bus handlers. This design also allows MMC and SD (and later SDIO) to be more cleanly separated, allowing easier maintenance. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Move protocol operations and definitions into their own files in an effort to separate protocol handling and bus arbitration more clearly. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Create a "core" subdirectory to house the central bus handling functions. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
The classic MMC bus was defined as multi card bus system, which is reflected in the design in the MMC layer. When SD showed up, the bus topology was abandoned and a star topology (one card per host) was mandated. MMC version 4 has followed this, officially deprecating the bus topology. As we do not have any known users of the bus topology we can remove support for it. This will simplify the code and rectify some incorrect assumptions in the newer additions. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Suspending MMC/SD cards (versus removing and readding them) is an inherently unsafe operation and has even been broken for some time. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Make sure we kill of any pending detection runs when the host is removed instead of when it is freed. Also add some debugging to make sure the driver doesn't queue up more detection after it has removed the host. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
The "present" state indicates that the card is a registered device, so it is more clear to put it together with the actual registration. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Split out the type of card into its own field as it hardly qualifies as a state. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Support for MMC 4.2 sector based cards. This tweaks the init a bit and reads a new field out of the EXT_CSD. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Fix copy-n-paste error. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Now that we've fixed our only offender when it comes to strange sg list, add a check so that future users keep the sg list proper with regard to transfer size. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 06 3月, 2007 1 次提交
-
-
由 Pierre Ossman 提交于
The new high-speed timings are similar to each other and the old system, but not identical. And although things "just work" most of the time, sometimes it does not. So we need to start marking which hosts are known to fully comply with the new timings. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 05 2月, 2007 5 次提交
-
-
由 Pierre Ossman 提交于
MMC high-speed, wide bus support and SD high-speed are functions that aren't critical for correct operation of the card. As such, they shouldn't mark the card as bad or dead when there is a failure activating these features. This is needed in particular on some really stupid hardware (e.g. Winbond's) where not all data transfer commands are supported. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Many controllers have an upper limit on the number of blocks that can be transferred in one request. Allow the host drivers to specify this and make sure we avoid hitting this limit. Also change the max_sectors field to avoid confusion. This makes it map less directly to the block layer limits, but as they didn't apply directly on MMC cards anyway, this isn't a great loss. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Most controllers have an upper limit on the block size. Allow the host drivers to specify this and make sure we avoid hitting this limit. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Philip Langdale 提交于
Thanks to the generous donation of an SDHC card by John Gilmore, and the surprisingly enlightened decision by the SD Card Association to publish useful specs, I've been able to bash out support for SDHC. The changes are not too profound: i) Add a card flag indicating the card uses block level addressing and check it in the block driver. As we never took advantage of byte-level addressing, this simply involves skipping the block -> byte translation when sending commands. ii) The layout of the CSD is changed - a set of fields are discarded to make space for a larger C_SIZE. We did not reference any of the discarded fields except those related to the C_SIZE. iii) Read and write timeouts are fixed values and not calculated from CSD values. iv) Before invoking SEND_APP_OP_COND, we must invoke the new SEND_IF_COND to inform the card we support SDHC. Signed-off-by: NPhilipl Langdale <philipl@overt.org> Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
As card_busy was only used to indicate if the host was exclusively claimed and not really used to identify a particular card, replacing it with just a boolean makes things a lot more easily understandable. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
- 02 12月, 2006 2 次提交
-
-
由 Pierre Ossman 提交于
Modern SD cards support a clock speed of 50 MHz. Make sure we test for this capability and do the song and dance required to activate it. Activating high speed support actually modifies the TRAN_SPEED field of the CSD. But as the spec says that the cards must report 50 MHz, we might as well skip re-reading the CSD. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-
由 Pierre Ossman 提交于
Several fixes for mmc_delay(): * Repair if-clause that was supposed to detect sub-hz delays. * Change yield() to cond_resched() as yield() no longer has the semantics we desire. * mmc_delay() is used to guarantee protocol delays, so we cannot return early (i.e. use _interruptable). Based on patch by Amol Lad. Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
-