summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/bfin_sdh.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: set correct block size value in bfin sdh driverSonic Zhang2014-10-031-3/+4
| | | | | | | | Wait data transfer till the data end bit other than the data block end bit is set. Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: mmc: Correct mmc_host_is_spi and bfin_sdh.cTom Rini2014-03-281-1/+1
| | | | | | | | In the recent mmc cleanup, the mmc_host_is_spi macro was broken and bfin_sdh.c had mmc->bus_width turned into mmc_bus_width(mmc), both of which were incorrect. Signed-off-by: Tom Rini <trini@ti.com>
* mmc: Split mmc struct, rework mmc initialization (v2)Pantelis Antoniou2014-03-241-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that struct mmc was implemented was a bit of a mess; configuration and internal state all jumbled up in a single structure. On top of that the way initialization is done with mmc_register leads to a lot of duplicated code in drivers. Typically the initialization got something like this in every driver. struct mmc *mmc = malloc(sizeof(struct mmc)); memset(mmc, 0, sizeof(struct mmc); /* fill in fields of mmc struct */ /* store private data pointer */ mmc_register(mmc); By using the new mmc_create call one just passes an mmc config struct and an optional private data pointer like this: struct mmc = mmc_create(&cfg, priv); All in tree drivers have been updated to the new form, and expect mmc_register to go away before long. Changes since v1: * Use calloc instead of manually calling memset. * Mark mmc_register as deprecated. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* mmc: Convert mmc struct's name array to a pointerPantelis Antoniou2014-03-241-1/+1
| | | | | | | Using an array is pointless; even more pointless (and scary) is using sprintf to fill it without a format string. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* mmc: Remove ops from struct mmc and put in mmc_opsPantelis Antoniou2014-03-241-5/+6
| | | | | | | | | | | | | | | | | Remove the in-structure ops and put them in mmc_ops with a constant pointer to it. This makes the mmc structure smaller as well as conserving code space (in theory). All in-tree drivers are converted as well; this is done in a single patch in order to not break git bisect. Changes since V1: Fix compilation b0rked issue on omap platforms where OMAP_GPIO was not set. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* blackfin: Add <asm/clock.h> to numerous driversTom Rini2014-02-201-0/+1
| | | | | | | | | With d6a320d we moved some clock externs out of blackfin_local.h and into clock.h but now need to include <asm/clock.h> in more drivers to avoid warnings. Cc: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Tom Rini <trini@ti.com>
* Merge u-boot/master into u-boot-ti/masterTom Rini2013-03-111-16/+52
|\ | | | | | | | | | | | | | | | | | | | | | | | | In master we had already taken a patch to fix the davinci GPIO code for CONFIG_SOC_DM646X and in u-boot-ti we have additional patches to support DA830 (which is CONFIG_SOC_DA8XX && !CONFIG_SOC_DA850). Resolve these conflicts manually and comment the #else/#endif lines for clarity. Conflicts: arch/arm/include/asm/arch-davinci/gpio.h drivers/gpio/da8xx_gpio.c Signed-off-by: Tom Rini <trini@ti.com>
| * blackfin: bf60x: add rsi/sdh supportSonic Zhang2013-03-041-16/+52
| | | | | | | | | | | | | | | | Add rsi/sdh support for bf60x. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
* | mmc: add support for write protectionNikita Kiryanov2013-03-081-0/+1
|/ | | | | | | Add generic mmc write protection functionality. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
* Blackfin: bfin_sdh: drop dos part hardcodeMike Frysinger2012-04-221-1/+0
| | | | | | | | | No other driver sets up the part type to DOS in their init, and it doesn't seem to be needed as `mmcinfo` and `mmc part` stll work, so drop it. Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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>
* 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>
* Blackfin: bfin_sdh: add support for multiblock operationsSonic Zhang2011-04-081-4/+5
| | | | | | | Don't forget to count full data size for the multiblock operation request. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bfin_sdh: set all timer bits before transferCliff Cai2011-04-081-1/+1
| | | | | | | | The timer register is 32bits, not 16bit, so 0xFFFF won't fill it. Write out -1 to make sure to fill the whole thing. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: BF50x: new processor portMike Frysinger2011-04-081-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bfin_sdh: clean up send_cmdMike Frysinger2010-10-021-10/+15
| | | | | | | Simplify the command setup and status checking steps, and add a proper timeout to the status polling code to avoid possible infinite hangs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bfin_sdh: convert to portmux frameworkMike Frysinger2010-07-131-9/+9
| | | | | | | Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert bfin_sdh to generic mmcCliff Cai2010-01-171-399/+120
| | | | | Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert bfin_sdh to legacy mmcMike Frysinger2009-04-021-12/+2
| | | | | | | 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>
* Blackfin: add driver for on-chip MMC/SD controllerCliff Cai2009-02-021-0/+546
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>
OpenPOWER on IntegriCloud