aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
Commit message (Collapse)AuthorAgeFilesLines
* mmc: remove unused 'mode' from the mmc_host structureNicolas Pitre2007-12-121-4/+0
| | | | | | | | | | This field and corresponding defines are simply never used anywhere in the code. But its mere presence is enough to confuse some host driver authors who attempt to rely on it. Let's eliminate the possibility for confusion and remove it entirely. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* net: libertas sdio driverPierre Ossman2007-10-171-0/+6
| | | | | | | Add driver for Marvell's Libertas 8385 and 8686 wifi chips. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Dan Williams <dcbw@redhat.com>
* mmc: add led triggerPierre Ossman2007-09-241-0/+6
| | | | | | | Add a led trigger for each host controller that indicates if there is a request active on the controller. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* MMC headers learn about SPIDavid Brownell2007-09-233-13/+67
| | | | | | | | | | | | | | | | | | | | | | Teach the MMC/SD/SDIO system headers that some hosts use SPI mode - New host capabilities and status bits * MMC_CAP_SPI, with mmc_host_is_spi() test * mmc_host.use_spi_crc flag - SPI-specific declarations: * Response types, MMC_RSP_SPI_R* * Two SPI-only commands * Status bits used native to SPI: R1_SPI_*, R2_SPI_* - Fix a few (unrelated) whitespace bugs in the headers. - Reorder a few mmc_host fields, removing several bytes of padding None of these changes affect current code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: store vendor stringsPierre Ossman2007-09-232-0/+5
| | | | | | | Store vendor strings found in CISTPL_VERS_1 so that function drivers can access them. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add sdio_f0_readb() and sdio_f0_writeb()David Vrabel2007-09-231-0/+5
| | | | | | | | | Add sdio_f0_readb() and sdio_f0_writeb() functions to reading and writing function 0 registers. Writes outside the vendor specific CCCR registers (0xF0 - 0xFF) are not permitted. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: set the functions' block sizeDavid Vrabel2007-09-231-1/+4
| | | | | | | | | | | | | | | Before a driver is probed, set the function's block size to the default so the driver is sure the block size is something sensible and it needn't explicitly set it. The default block size is the largest that's supported by both the card and the host, with a maximum of 512 to ensure aribitrarily sized transfer use the optimal (least) number of commands. See http://lkml.org/lkml/2007/8/7/150 for reasons for the block size choice. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add SDIO_FBR_BASE(f) macroDavid Vrabel2007-09-231-0/+2
| | | | | Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add interface for host side SDIO interrupt reportingNicolas Pitre2007-09-231-0/+8
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: support IO_RW_EXTENDEDPierre Ossman2007-09-232-0/+32
| | | | | | | Support the multi-byte transfer operation, including handlers for common operations like writel()/readl(). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: core support for SDIO function interruptNicolas Pitre2007-09-232-0/+11
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: allow for mmc_claim_host to be abortedNicolas Pitre2007-09-231-1/+12
| | | | | | | | | | 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: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: defines for some standard interface typesNicolas Pitre2007-09-231-0/+23
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add device id table and matchingPierre Ossman2007-09-231-1/+29
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: split up common and function CIS parsingPierre Ossman2007-09-232-0/+12
| | | | | | | | Add a more clean separation between global, common CIS information and the function specific one as we need the common information in places where no specific function is specified. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: link unknown CIS tuples to the sdio_func structureNicolas Pitre2007-09-231-0/+12
| | | | | | | | | This way those tuples that the core cares about are consumed by the core code, and tuples that only function drivers might make sense of are available to drivers. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: basic parsing of FBRPierre Ossman2007-09-231-0/+5
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: read and decode interesting parts of the CCCRPierre Ossman2007-09-231-0/+11
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: enable/disable functions for SDIOPierre Ossman2007-09-232-0/+95
| | | | | | | | Like many other buses, the devices (functions) on the SDIO bus must be enabled before they can be used. Add functions that allow drivers to do so. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add basic SDIO I/O operationsPierre Ossman2007-09-231-0/+12
| | | | | | | Add command wrappers that simplify register access from SDIO function drivers. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add SDIO driver handlingPierre Ossman2007-09-231-0/+18
| | | | | | Add basic driver handling to the SDIO device model. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: basic SDIO device modelPierre Ossman2007-09-232-0/+42
| | | | | | Add the sdio bus type and basic device handling. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: implement SDIO IO_RW_DIRECT operationPierre Ossman2007-09-232-0/+35
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: detect SDIO cardsPierre Ossman2007-09-233-0/+22
| | | | | | Really basic init sequence for SDIO cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove confusing flagPierre Ossman2007-09-231-1/+0
| | | | | | | | The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove BYTEBLOCK capabilityPierre Ossman2007-09-231-3/+2
| | | | | | | Remove the BYTEBLOCK capability and let the broken hosts fail the requests with -EINVAL instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: mmc_set_data_timeout() parameter write is redundantPierre Ossman2007-09-231-1/+1
| | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: read ext_csd version numberPierre Ossman2007-09-231-0/+1
| | | | | | | Make sure we do not try to parse a structure we do not understand. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove custom error codesPierre Ossman2007-09-231-6/+13
| | | | | | | Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: update kerneldocPierre Ossman2007-07-261-1/+1
| | | | | | Make sure the kerneldoc comments are up to date and relevant. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove old card statesPierre Ossman2007-05-011-9/+3
| | | | | | Remove card states that no longer make any sense. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* MMC: Fix handling of low-voltage cardsPhilip Langdale2007-05-011-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix handling of low voltage MMC cards. The latest MMC and SD specs both agree that support for low-voltage operations is indicated by bit 7 in the OCR. The MMC spec states that the low voltage range is 1.65-1.95V while the SD spec leaves the actual voltage range undefined - meaning that there is still no such thing as a low voltage SD card. However, an old Sandisk spec implied that bits 7.0 represented voltages below 2.0V in 1V or 0.5V increments, and the code was accordingly written with that expectation. This confusion meant that host drivers attempting to support the typical low voltage (1.8V) would set the wrong bits in the host OCR mask (usually bits 5 and/or 6) resulting in the the low voltage mode never being used. This change corrects the low voltage range and adds sanity checks on the reserved bits (0-6) and for SD cards that claim to support low-voltage operations. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* MMC: Consolidate voltage definitionsPhilip Langdale2007-05-011-24/+1
| | | | | | | | | | | | | | | | | Consolidate the list of available voltages. Up until now, a separate set of defines has been used for host->vdd than that used for the OCR voltage mask values. Having two sets of defines allows them to get out of sync and the current sets are already inconsistent with one claiming to describe ranges and the other specific voltages. Only the SDHCI driver uses the host->vdd defines and it is easily fixed to use the OCR defines. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add bus handlerPierre Ossman2007-05-011-1/+6
| | | | | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Separate out protocol opsPierre Ossman2007-05-013-53/+86
| | | | | | | | Move protocol operations and definitions into their own files in an effort to separate protocol handling and bus arbitration more clearly. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Move core functions to subdirPierre Ossman2007-05-013-5/+5
| | | | | | | Create a "core" subdirectory to house the central bus handling functions. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: deprecate mmc bus topologyPierre Ossman2007-05-013-19/+2
| | | | | | | | | | | | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Flush pending detects on host removalPierre Ossman2007-05-011-0/+3
| | | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Move OCR bit definesPierre Ossman2007-05-012-24/+28
| | | | | | | All host drivers were #include:ing mmc/protocol.h just to get access to the OCR bit defines. Move these to host.h instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add type field to cardsPierre Ossman2007-05-011-6/+9
| | | | | | | Split out the type of card into its own field as it hardly qualifies as a state. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: MMC sector based cardsPierre Ossman2007-05-012-0/+2
| | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: require explicit support for high-speedPierre Ossman2007-03-061-0/+8
| | | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Allow host drivers to specify max block countPierre Ossman2007-02-041-1/+2
| | | | | | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Allow host drivers to specify a max block sizePierre Ossman2007-02-041-0/+1
| | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Add support for SDHC cardsPhilip Langdale2007-02-043-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Philipl Langdale <philipl@overt.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: let host be parent of cardsPierre Ossman2007-02-041-0/+1
| | | | | | | | | Change the parent of cards to be a specific host (a class device), not the physical controller. This is particularly useful when the hardware has multiple slots, meaning multiple hosts. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: replace host->card_busyPierre Ossman2007-02-041-2/+3
| | | | | | | | 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: Pierre Ossman <drzeus@drzeus.cx>
* mmc: Correct definition of R6Philip Langdale2007-01-151-1/+1
| | | | | | | | | | | During development of SDHC support, it was discovered that the definition for R6 was incorrect. This patch fixes that and patches the drivers that do switch on the response type. Signed-off-by: Philip Langdale <philipl@overt.org> Cc: Alex Dubov <oakad@yahoo.com> Cc: Pavel Pisa <ppisa@pikron.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* Merge branch 'master' of ↵David Howells2006-12-053-7/+88
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
| * Merge branch 'for-linus' of ↵Linus Torvalds2006-12-022-3/+84
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/drzeus/mmc: mmc: correct request error handling mmc: Flush block queue when removing card mmc: sdhci high speed support mmc: Support for high speed SD cards mmc: Fix mmc_delay() function mmc: Add support for mmc v4 wide-bus modes [PATCH] mmc: Add support for mmc v4 high speed mode trivial change for mmc/Kconfig: MMC_PXA does not mean only PXA255 Make general code cleanups Add MMC_CAP_{MULTIWRITE,BYTEBLOCK} flags Platform device error handling cleanup Move register definitions away from the header file Change OMAP_MMC_{READ,WRITE} macros to use the host pointer Replace base with virt_base and phys_base mmc: constify mmc_host_ops vectors mmc: remove kernel_thread()