diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-21 00:26:19 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-21 00:26:19 +0200 |
commit | d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8 (patch) | |
tree | c08012d3c427142364bca40e042659b3a819c60a /board/freescale/mx35pdk/mx35pdk.c | |
parent | 651eb7322407173d5f1ac5a149e381a4044858f4 (diff) | |
parent | 1d9b033269263a69f7402f508c17b242fc7fea43 (diff) | |
download | u-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.zip u-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.tar.gz u-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.tar.bz2 |
Merge remote-tracking branch 'u-boot-imx/master'
Diffstat (limited to 'board/freescale/mx35pdk/mx35pdk.c')
-rw-r--r-- | board/freescale/mx35pdk/mx35pdk.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index 787c923..7cb6b30 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.c @@ -32,6 +32,8 @@ #include <i2c.h> #include <pmic.h> #include <fsl_pmic.h> +#include <mmc.h> +#include <fsl_esdhc.h> #include <mc9sdz60.h> #include <mc13892.h> #include <linux/types.h> @@ -275,3 +277,26 @@ int board_eth_init(bd_t *bis) return rc; } + +#if defined(CONFIG_FSL_ESDHC) + +struct fsl_esdhc_cfg esdhc_cfg = {MMC_SDHC1_BASE_ADDR}; + +int board_mmc_init(bd_t *bis) +{ + /* configure pins for SDHC1 only */ + mxc_request_iomux(MX35_PIN_SD1_CMD, MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_SD1_CLK, MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_SD1_DATA0, MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_SD1_DATA1, MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_SD1_DATA2, MUX_CONFIG_FUNC); + mxc_request_iomux(MX35_PIN_SD1_DATA3, MUX_CONFIG_FUNC); + + return fsl_esdhc_initialize(bis, &esdhc_cfg); +} + +int board_mmc_getcd(struct mmc *mmc) +{ + return !(mc9sdz60_reg_read(MC9SDZ60_REG_DES_FLAG) & 0x4); +} +#endif |