summaryrefslogtreecommitdiff
path: root/drivers/mmc
AgeCommit message (Collapse)Author
2011-01-25Correct capacity calculation for high capacity mmcMikael Larsson
This adds the correct calculation for high capacity mmc. ST-Ericsson ID: N/A ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I4a6b152d02f22d4abba790177fcfb200ba853192 Signed-off-by: Mikael Larsson <mikael.xt.larsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13312 Reviewed-by: QATOOLS Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com> Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
2010-08-30U-boot: MMC update.Martin LUNDHOLM
MMC has been updated with several improvements. Primarily MMC performance has been improved by using assembler code for low level FIFO handling. Also some MMC functionality has been added, e.g. support for DDR and reliable write. Data and command delay times were incremented, otherwise hangups and timeouts were observed. Tested on HREF+ 1.1 V21 and HREF+ 1.1 V32 (Micron PoP). Following WP depends on this change (more reliable SD card write support): ST-Ericsson ID: WP264488 Change-Id: Ic92abffe1640aa9375b8d43a6b8522ca8296a368 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/4056 Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Tested-by: Michael BRANDT <michael.brandt@stericsson.com>
2010-08-11Replace MMC/SD driver to fit new framework.Ulf Hansson
IR265772: MMC driver does not detect SDHC cards. IR254201: Restructure MMC/SD driver for U8500 board according to the block device framework in mainline U-Boot. Changes to mmc framework: - Multi Block Read support in mmc framework. - Wrap Multi Block Write/Read to be able to adopt for large transaction. - Removed incorrect check in EXT CSD for high capacity MMC. - Corrected check for high capacity SD cards. - Set MMC buswidth to 8, prio of using 4. Known limitations/bugs in mmc framework: - High capacity MMC, will likely not get the correct density. - High speed is set, whether or not the host supports it or not. board/st/u8500/mmc_utils: IMPORTANT FOR DEVELOPERS: - Removed unessary U-Boot commands which is already supported in cmd_fat. - mmc_read_cmd_file: Read command.txt into bootcmd env from FAT FS in SD card. - write_partition_block: Writes the MBR if it is not already written. board/st/u8500/mmc_host[c.h]: - Implements the entire MMC/SD host driver for the PL180 block. - There is still room for optimization: Increase CLK-speed. Use high-speed for SD cards. Is GPIO setup correctly for both cards an eMMC. EarlyDrop support not fully tested. Dynamically turn on voltage/clocks to SD, not always. More... Note: - Increased read/write performance for eMMC, to around 5.4 MB/s for sequential read/write. Earlier measurements was 3.5 MB/s for read and 2.6 MB/s for write. ST-Ericsson ID: ER265772, CR267996, ER267993 Change-Id: I921102edbde761407ff5ad476d1bb99f5dc7a2ef Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2288 Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Tested-by: Michael BRANDT <michael.brandt@stericsson.com> Reviewed-by: Martin LUNDHOLM <martin.xa.lundholm@stericsson.com> Tested-by: Martin LUNDHOLM <martin.xa.lundholm@stericsson.com> Reviewed-by: Mikael LARSSON <mikael.xt.larsson@stericsson.com> Tested-by: Mikael LARSSON <mikael.xt.larsson@stericsson.com>
2009-11-27omap3_mmc: Encapsulate twl4030 under option CONFIG_TWL4030_POWERVaibhav Hiremath
Fixes the build/compilation error if we try to re-use the omap3_mmc code without TWL4030_POWER. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
2009-10-13OMAP3 MMC: Fix warning dereferencing type-punned pointerDirk Behme
Fix warning Dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Dirk Behme <dirk.behme@googlemail.com> CC: Steve Sakoman <sakoman@gmail.com> Acked-by: Tom Rix <Tom.Rix@windriver.com>
2009-08-10Minor coding style cleanup.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-09mxc-mmc: sdhc host driver for MX2 and MX3 proccessorIlya Yanok
This is a port of Linux driver for SDHC host controller hardware found on Freescale's MX2 and MX3 processors. Uses new generic MMC framework (CONFIG_GENERIC_MMC) and it looks like there are some problems with a framework (at least on LE cpus). Some of these problems are addressed in the following patches. Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-07-29OMAP3 Move twl4030 mmc functionTom Rix
Because twl4030 now has its own device files, move and rename twl4030_mmc_config. twl4030_mmc_config initializes the twl4030 power setting to the mmc device. Because it is in the twl4030 power domain, move it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c. The function was renamed to twl4030_power_mmc_init because all the functions in this file are to have the format twl4030_power_<device>_<action> In this case the suffix is mmc_init so device : mmc action : init Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Heiko Schocher <hs@denx.de>
2009-07-19mmc: set bus width to 1 and clock to minimum early during initializationIlya Yanok
We need to switch back to 1-bit before initialization or SD 2.0 cards will fail to send SCR if we've switched to 4-bit already. Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-07-16fsl_esdhc: Add device tree fixupsAnton Vorontsov
This patch implements fdt_fixup_esdhc() function that is used to fixup the device tree. The function adds status = "disabled" propery if esdhc pins muxed away, otherwise it fixups clock-frequency for esdhc nodes. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-02mmc: Fix decoding of SCR & function switch data on little-endian machinesYauhen Kharuzhy
SCR & switch data are read from card as big-endian words and should be converted to CPU byte order. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-06-02mmc: Remove return from mmc_init for non SD 2.0 compatible cards.Yauhen Kharuzhy
Cards which are not compatible with SD 2.0 standard, may return response for CMD8 command, but it will be invalid in terms of SD 2.0. We should accept this case as admissible, just like Linux does. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-06-02mmc: drop unnecessary castsRabin Vincent
Now that response is a uint, we can drop all the casts. Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02mmc: fix response decoding on little endianRabin Vincent
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>
2009-06-02mmc: use lldiv to fix arm eabi buildRabin Vincent
The generic MMC core uses direct long long divisions, which do not build with ARM EABI toolchains. Use lldiv() instead, which works everywhere. Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02mmc: check find_mmc_device return valueRabin Vincent
find_mmc_device returns NULL if an invalid device number is specified. Check for this to avoid dereferencing NULL pointers. Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-04-28Replace __attribute references with __attribute__Peter Tyser
__attribute__ follows gcc's documented syntax and is generally more common than __attribute. This change is only asthetic and should not affect functionality. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-02Blackfin: convert bfin_sdh to legacy mmcMike Frysinger
The Blackfin SDH controller is still using the legacy framework, so update the driver to use the renamed functions. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-22OMAP3: Clean up MMC codeDirk Behme
Clean up OMAP3 MMC code: * Convert register access to struct & readx/writex style * Replace hardcode values by macros * Remove macro defined twice Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-02-22Coding Style cleanup; update CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-02-20ARM:PXA Use new definitions in mmc.hTom Rix
Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-20Reduce the scope of PXA's mmc_read/mmc_write/mmc_bread functionsAndy Fleming
These names are being taken over by the new MMC framework. Hopefuly the PXA can be easily ported, and these functions will go away entirely. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-20pxa: move mmc drivers to drivers/mmcJean-Christophe PLAGNIOL-VILLARD
introduce new macro CONFIG_PXA_MMC to activate it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-02-19ARM:OMAP3 Change mmc_init to mmc_legacy_initTom Rix
omap3_mmc.c was changed to define mmc_legacy_init. Remove unused functions. Compile tested on all arm Runtime tested on Zoom1. Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-02-16Add support for the Freescale eSDHC found on 8379 and 8536 SoCsAndy Fleming
This uses the new MMC framework Some contributions by Dave Liu <daveliu@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16Add MMC FrameworkAndy Fleming
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>
2009-02-16Convert mmc_init to mmc_legacy_initAndy Fleming
This is to get it out of the way of incoming MMC framework Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-16Eliminate support for using MMC as memoryAndy Fleming
MMC cards are not memory, so we stop treating them that way. Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-02-02Blackfin: add driver for on-chip MMC/SD controllerCliff Cai
This is a port of the Linux Blackfin on-chip SDH driver to U-Boot. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-24OMAP3: Add MMC supportDirk Behme
Add MMC support. Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-06Fix merge problemsStefan Roese
Signed-off-by: Stefan Roese <sr@denx.de>
2008-07-10mmc: Move atmel_mci driver into drivers/mmcHaavard Skinnemoen
This makes it easier to use the driver on other platforms. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Jean-Chritophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-10Create drivers/mmc subdirectoryHaavard Skinnemoen
In order to consolidate more of the various MMC drivers around the tree, we must first have a common place to put them. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Jean-Chritophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>