summaryrefslogtreecommitdiff
path: root/include/mmc.h
Commit message (Collapse)AuthorAgeLines
* mmc: enable partition switch function for emmcLei Wen2011-05-18-0/+8
| | | | | | | | | | | | | | | | | | | For emmc, it may have up to 7 partitions: two boot partitions, one user partition, one RPMB partition and four general purpose partitions. (Refer to JESD84-A44.pdf/page 154) As bootloader may need to read out or reflashing images on those different partitions, it is better to enable the partition switch with console command support. Also for partition would be restore to user partition(part 0) when CMD0 is used, so change mmc_init routine to perform normal initialization only once for each slot, unless use the rescan command to force init again. Signed-off-by: Lei Wen <leiwen@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com>
* cmd_mmc: eliminate device num in the mmc commandLei Wen2011-05-18-0/+1
| | | | | | | mmc command applied device, like ide and usb... Signed-off-by: Lei Wen <leiwen@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com>
* mmc_spi: generate response for send status commandThomas Chou2011-05-18-0/+1
| | | | | | | | | | A "send status" command is added with the commit "mmc: checking status after commands with R1b response". But the status register returned from send status command of SPI protocol is different from that of MMC/SD protocol. We do a simple test and generate a response in stead of full bit-by-bit translation. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* mmc: coding style fix and tabify of mmc.hThomas Chou2011-04-29-22/+22
| | | | Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* MMC: make b_max unconditionalJohn Rigby2011-04-29-2/+0
| | | | | | | | | | | | | | Make existing field b_max field in struct mmc unconditional and use it instead of CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_bread and mmc_bwrite. Initialize b_max to CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_register if it has not been initialized by the hw driver. Initialize b_max to 0 in all callers to mmc_register. Signed-off-by: John Rigby <john.rigby@linaro.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
* mmc: SEND_OP_COND considers card capabilities (voltage)Raffaele Recalcati2011-04-13-0/+2
| | | | | | | | | | | The first SEND_OP_COND (CMD1) command added is used to ask card capabilities. After it an AND operation is done between card capabilities and host capabilities (at the moment only for the voltage field). Finally the correct value is sent to the MMC, waiting that the card exits from busy state. Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it> Signed-off-by: Andy Fleming <afleming@freescale.com>
* mmc: checking status after commands with R1b responseRaffaele Recalcati2011-04-13-0/+4
| | | | | | | | | | It is recommended to check card status after these kind of commands. This is done using CMD13 (SEND_STATUS) JEDEC command until the card is ready. In case of error the card status field is displayed. Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it> Signed-off-by: Andy Fleming <afleming@freescale.com>
* mmc: add generic mmc spi driverThomas Chou2011-04-13-0/+5
| | | | | | | | | | | | | This patch supports mmc/sd card with spi interface. It is based on the generic mmc framework. It works with SDHC and supports multi blocks read/write. The crc checksum on data packet is enabled with the def, There is a subcomamnd "mmc_spi" to setup spi bus and cs at run time. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Andy Fleming <afleming@freescale.com>
* Davinci MMCSD SupportSandeep Paulraj2011-02-02-0/+3
| | | | | | | | | | Added support for MMC/SD cards for Davinci. This feature is enabled by CONFIG_DAVINCI_MMC and is dependant on CONFIG_MMC and CONFIG_GENERIC_MMC options. This is tested on DM355 and DM365 EVMs with both the available mmc controllers. Signed-off-by: Alagu Sankar <alagusankar@embwise.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* fsl_esdhc: Use mmc_set_clock to set initial speedJerry Huang2010-12-18-1/+2
| | | | | | | | | | | | | | After booting the u-boot, and first using some SD card (such as Sandisk 2G SD card), because the field 'clock' of struct mmc is zero, this will cause the read transfer is always active and SDHC DATA line is always active, therefore, driver can't handle the next command. Therefore, we use mmc_set_clock to setup both the data structure and HW to the initial clock speed of 400000Hz. Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Tested-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* AT91: MCI: add SD/MMC driver using mmc frameworkReinhard Meyer2010-09-03-1/+14
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* mmc: add function prototype for mmc_set_dev in mmc.hSteve Sakoman2010-07-05-0/+1
| | | | | | | | | | this eliminates compiler warnings when cmd_mmc.c is built with CONFIG_SYS_MMC_SET_DEV the mmc_set_dev implementation in omap3_mmc.c is also tweaked to match the new prototype in parameter naming and type Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* MMC: add weak function to detect MMC/SD cardStefano Babic2010-03-07-0/+1
| | | | | | | | | | | Most controllers can check if there is a card in the slot. However, they require pins that could be not available because required by other functions and the detection of a card must be performed in another way. This patch adds a weak function that a board can implement to add its internal custom way to check the presence of a MMC/SD card. Signed-off-by: Stefano Babic <sbabic@denx.de>
* include/mmc.h: Fix typo in IS_SD() macroAlbin Tonnerre2009-08-23-1/+1
| | | | Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
* mmc: fix response decoding on little endianRabin Vincent2009-06-02-3/+3
| | | | | | | | | | | | | | | | The mmc code defines the response as an array of chars. However, it access the response bytes both as (i) an array of four uints (with casts) and (ii) as individual chars. The former case is used more often, including by the driver when it assigns the response. The char-wise accesses are broken on little endian systems because they assume that the bytes in the uints are in big endian byte order. This patch fixes this by changing the response to be an array of four uints and replacing the char-wise accesses with equivalent uint-wise accesses. Signed-off-by: Rabin Vincent <rabin@rab.in>
* Add MMC FrameworkAndy Fleming2009-02-16-9/+181
| | | | | | | | | | | | | | Here's a new framework (based roughly off the linux one) for managing MMC controllers. It handles all of the standard SD/MMC transactions, leaving the host drivers to implement only what is necessary to deal with their specific hardware. This also hooks the infrastructure into the PowerPC board code (similar to how the ethernet infrastructure now hooks in) Some of this code was contributed by Dave Liu <daveliu@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* Eliminated arch-specific mmc header requirementAndy Fleming2009-02-16-1/+52
| | | | | | | | | | The current MMC infrastructure relies on the existence of an arch-specific header file. This isn't necessary, and a couple drivers were forced to implement dummy files to meet this requirement. Instead, we move the stuff in those header files into a more appropriate place, and eliminate the stubs and the #include of asm/arch/mmc.h Signed-off-by: Andy Fleming <afleming@freescale.com>
* Convert mmc_init to mmc_legacy_initAndy Fleming2009-02-16-1/+1
| | | | | | This is to get it out of the way of incoming MMC framework Signed-off-by: Andy Fleming <afleming@freescale.com>
* Eliminate support for using MMC as memoryAndy Fleming2009-02-16-1/+0
| | | | | | MMC cards are not memory, so we stop treating them that way. Signed-off-by: Andy Fleming <afleming@freescale.com>
* MMC: Consolidate MMC/SD command definitionsHaavard Skinnemoen2008-06-28-0/+24
| | | | | | | | | | | | | | | This moves the MMC and SD Card command definitions from include/asm/arch/mmc.h into include/mmc.h. These definitions are given by the MMC and SD Card standards, not by any particular architecture. There's a lot more room for consolidation in the MMC drivers which I'm hoping to get done eventually, but this patch is a start. Compile-tested for all avr32 boards as well as lpc2292sodimm and lubbock. This should cover all three mmc drivers in the tree. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* * Fix CONFIG_NET_MULTI support in include/net.hwdenk2003-06-15-0/+33
* Patches by Kyle Harris, 13 Mar 2003: - Add FAT partition support - Add command support for FAT - Add command support for MMC ---- - Add Intel PXA support for video - Add Intel PXA support for MMC ---- - Enable MMC and FAT for lubbock board - Other misc changes for lubbock board