aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/core
AgeCommit message (Collapse)Author
2007-09-23sdio: enable wide bus modePierre Ossman
Enable 4-bit data bus mode, according to host and card capabilities. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: change clock speedPierre Ossman
Change clock speed to the highest supported by the card. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23make struct sdio_dev_attrs[] staticAdrian Bunk
On Wed, Jul 25, 2007 at 04:03:04AM -0700, Andrew Morton wrote: >... > Changes since 2.6.22-rc6-mm1: >... > git-mmc.patch >... > git trees >... sdio_dev_attrs[] can become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: add interface for host side SDIO interrupt reportingNicolas Pitre
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: support IO_RW_EXTENDEDPierre Ossman
Support the multi-byte transfer operation, including handlers for common operations like writel()/readl(). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: core support for SDIO function interruptNicolas Pitre
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: allow for mmc_claim_host to be abortedNicolas 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: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: add basic sysfs attributesPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: add modalias supportPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: whip bus uevent handler into shapePierre Ossman
Make the mmc bus uevent callback look like all other subsystems. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: add device id table and matchingPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: initialize mmc subsystem with subsys_initcall()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: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: split up common and function CIS parsingPierre Ossman
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>
2007-09-23sdio: link unknown CIS tuples to the sdio_func structureNicolas Pitre
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>
2007-09-23sdio: initial CIS parsing codeNicolas Pitre
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: basic parsing of FBRPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23sdio: read and decode interesting parts of the CCCRPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: enable/disable functions for SDIOPierre Ossman
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>
2007-09-23mmc: add basic SDIO I/O operationsPierre Ossman
Add command wrappers that simplify register access from SDIO function drivers. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: add SDIO driver handlingPierre Ossman
Add basic driver handling to the SDIO device model. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: basic SDIO device modelPierre Ossman
Add the sdio bus type and basic device handling. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: implement SDIO IO_RW_DIRECT operationPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: detect SDIO cardsPierre Ossman
Really basic init sequence for SDIO cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: add missing printk levelsPierre Ossman
Some printk:s were missing an explicit level. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: mmc_set_data_timeout() parameter write is redundantPierre 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: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: read ext_csd version numberPierre Ossman
Make sure we do not try to parse a structure we do not understand. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: improve error code feedbackPierre Ossman
Now that we use "normal" error codes, improve the reporting and response to error codes in the core. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove custom error codesPierre Ossman
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-23drivers/mmc/core/host.c: kmalloc + memset conversion to kzallocMariusz Kozlowski
drivers/mmc/core/host.c | 3509 -> 3457 (-52 bytes) drivers/mmc/core/host.o | 92400 -> 92136 (-264 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-08-23drivers/mmc/core/bus.c: kmalloc + memset conversion to kzallocMariusz Kozlowski
drivers/mmc/core/bus.c | 5663 -> 5619 (-44 bytes) drivers/mmc/core/bus.o | 70899 -> 70731 (-168 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26drivers/mmc/core/: make 3 functions staticAdrian 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: Adrian Bunk <bunk@stusta.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: add missing printk levelsPierre Ossman
Some printk:s were missing an explicit level. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: proper debugging output in corePierre 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: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: be more verbose about card insertions/removalPierre Ossman
Let the user know that the kernel actually detected the card by printing some basic information in dmesg. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: Don't hold lock when releasing an added cardPierre Ossman
When the card has been added to the device model, it might be bound to a card driver. Therefore, we have to release the host lock when trying to remove it as we otherwise might deadlock with the driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: add a might_sleep() to mmc_claim_host()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: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: update kerneldocPierre Ossman
Make sure the kerneldoc comments are up to date and relevant. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: update header file pathsPierre Ossman
Make sure all headers in the files reflect their true position in the tree. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09mmc: fix silly copy-and-paste errorPierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09mmc: move layer init and workqueue to core filePierre Ossman
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09mmc: refactor host class handlingPierre Ossman
Move basic host class device handling to its own file for clarity. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-09mmc: refactor bus operationsPierre 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: Pierre Ossman <drzeus@drzeus.cx>
2007-06-13mmc: get back read-only switch functionPierre Ossman
Somehow the code to read the read-only switch of SD cards got lost in the reorganisation. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-06-07mmc: don't call switch on old cardsPierre Ossman
Make sure we don't call the switch function on cards too old to support it. They should just ignore it, but some have been reported to lock up instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-06-07mmc: fix broken if clausePierre Ossman
Fix a broken if clause which was causing SD cards to go into 4-bit mode even if the host did not support it. (Reported by David Brownell and Marc Pignat) Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-09mmc build fixAndrew Morton
Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08mmc: use lock instead of claim in debug checkPierre 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: Pierre Ossman <drzeus@drzeus.cx>
2007-05-08mmc: Use menuconfig objectsJan Engelhardt
Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01mmc: remove old card statesPierre Ossman
Remove card states that no longer make any sense. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01mmc: support unsafe resume of cardsPierre 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: Pierre Ossman <drzeus@drzeus.cx>