summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/gen_atmel_mci.c
Commit message (Collapse)AuthorAgeFilesLines
* MMC: atmel_mci: enable high speed mode supportBo Shen2014-08-011-1/+6
| | | | | | | | If the MCI IP version >= 0x300, it supports hight speed mode option, this patch enable it. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* MMC: atmel_mci: refactor setting the mode registerBo Shen2014-08-011-14/+42
| | | | | | | | The mode register is different between MCI IP version. So, according to MCI IP version to set the mode register. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* mmc: atmel_mci: fix print incorrect buffer content for debugWu, Josh2014-05-271-2/+3
| | | | | | Signed-off-by: Josh Wu <josh.wu@atmel.com> [fix checkpatch line length warning] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* mmc: Split mmc struct, rework mmc initialization (v2)Pantelis Antoniou2014-03-241-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+7
| | | | | | | | | | | | | | | | | 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>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* mmc: atmel_mci: add mmc card supportBo Shen2013-05-121-1/+4
| | | | | | | add mmc card support with atmel mci driver Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* mmc: atmel_mci: using IP version for different settingBo Shen2013-05-121-4/+38
| | | | | | | | | Using IP version for different setting - Higher version supports 8bit mode - Higher version bus width setting is different Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.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>
* mmc: at91: use max timeout value. It will avoid some situation that timeout ↵Wu, Josh2012-10-171-2/+2
| | | | | | | happened. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* mmc: at91: add multi block read/write support.Wu, Josh2012-10-171-0/+11
| | | | | | | Since the at91sam9263, the mmc hardware support multi blocks read/write. So this driver enable it. Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@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>
* Revert "AT91:mmc:fix multiple read/write error"Andy Fleming2011-07-281-4/+0
| | | | | | | | | This reverts commit c310fc840472a36e4b9d2505830e9dc8d458d63c. The Atmel custodian had apparently rejected this patch's approach in another thread, so this patch reverts it for now. Signed-off-by: Andy Fleming <afleming@freescale.com>
* AT91:mmc:fix multiple read/write errorelen.song2011-07-151-0/+4
| | | | | | | According to datasheet,set block count before multiple read/write. Signed-off-by: elen.song <elen.song@atmel.com> Acked-by: Andy Fleming <afleming@freescale.com>
* ATMEL: fix related common atmel driver filesReinhard Meyer2011-05-181-1/+1
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* 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>
* AT91: gen_atmel_mci.c: fix bug when Slot B is usedReinhard Meyer2010-12-071-0/+1
| | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* AT91: MCI: add SD/MMC driver using mmc frameworkReinhard Meyer2010-09-031-0/+353
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
OpenPOWER on IntegriCloud