summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/omap_hsmmc.c
Commit message (Collapse)AuthorAgeFilesLines
* omap_hsmmc: Wait for CMDI to be clearTom Rini2012-02-151-2/+3
| | | | | | | | | | | | | | | | | Before we can send a command we need both the DATI (command inhibit on mmc_dat line) bit and CMDI (command inhibit on mmc_cmd line) are clear. The previous behavior of only checking on DATI was insufficient on some cards and incorrect behavior in any case. This makes the code check for both bits being clear and makes the error print more clear as to what happened. DATI_CMDDIS is removed as it was unused elsewhere in the code and stood for 'DATI is set, cmds are disabled still'. Fix originally spotted by Peter Bigot. Tested-by: Peter A. Bigot <bigotp@acm.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Tom Rini <trini@ti.com> Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
* mmc: Implement card detection.Thierry Reding2012-01-081-0/+1
| | | | | | | | | | | Check for card detect each time an MMC/SD device is initialized. If card detection is not implemented, this code behaves as before and continues assuming a card is present. If no card is detected, has_init is reset for the MMC/SD device (to force initialization next time) and an error is returned. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Jason Liu <jason.hui@linaro.org>
* omap: Checkpatch fixesSricharan2011-11-151-12/+14
| | | | | | | | | Fixing them here so that when the files are reused in subsequent patches for omap5, avoids new checkpatch warnings. Signed-off-by: sricharan <r.sricharan@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* mmc: omap: Allow OMAP_HSMMC[23]_BASE to be unsetTom Rini2011-10-271-0/+4
| | | | | | | | | Not all omap families define OMAP_HSMMC[23]_BASE so condition those cases in omap_mmc_init(). Cc: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* mmc: omap: config VMMC, MMC1_PBIASBalaji T K2011-09-301-3/+28
| | | | | | | | | | Config VMMC voltage to 3V for MMC/SD card slot and PBIAS settings needed for OMAP4 Fixes MMC/SD detection on boot from eMMC. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* mmc: omap: enable high capacityBalaji T K2011-09-301-1/+2
| | | | | | | | | | Enable high capacity to host capability. Fixes eMMC detection on boot from MMC/SD card. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Aneesh V <aneesh@ti.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* MMC: omap_hsmmc.c: Add missing prototype headerDirk Behme2011-05-181-0/+1
| | | | | | | | | | | | | | | | Add missing header file to fix compilation warning omap_hsmmc.c: In function 'omap_mmc_init': omap_hsmmc.c:474: warning: implicit declaration of function 'get_cpu_family' omap_hsmmc.c:474: warning: implicit declaration of function 'get_cpu_rev' introduced by commit "MMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx silicon" (4ca9244d74f146a0605f5bee28a66e39aae88d3e) Signed-off-by: Dirk Behme <dirk.behme@googlemail.com> CC: Andy Fleming <afleming@freescale.com> CC: John Rigby <john.rigby@linaro.org>
* MMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx siliconJohn Rigby2011-04-291-0/+8
| | | | Signed-off-by: John Rigby <john.rigby@linaro.org>
* MMC: make b_max unconditionalJohn Rigby2011-04-291-0/+2
| | | | | | | | | | | | | | 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: omap: timeout counter fixNishanth Menon2010-11-191-25/+82
| | | | | | | | | | | | | | Having a loop with a counter is no timing guarentee for timing accuracy or compiler optimizations. For e.g. the same loop counter which runs when the MPU is running at 600MHz will timeout in around half the time when running at 1GHz. or the example where GCC 4.5 compiles with different optimization compared to GCC 4.4. use timer to keep track of time elapse and we use an emperical number - 1sec for a worst case timeout. This should never happen, and is adequate imaginary condition for us to fail with timeout. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Coding Style cleanupWolfgang Denk2010-10-271-1/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* ARMV7: OMAP: Add new mmc driver compatible with CONFIG_GENERIC_MMCSukumar Ghorai2010-10-171-0/+415
OMAP boards currently use a legacy mmc driver. This patch adds a new mmc driver which will work with the generic mmc driver in u-boot. This new driver will work with both OMAP3 and OMAP4 boards. This patch does not remove the old driver. It should remain in the tree until all boards that use it switch to the new driver. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Tested-by: Steve Sakoman <steve@sakoman.com>