~ubuntu-branches/ubuntu/saucy/u-boot/saucy

« back to all changes in this revision

Viewing changes to board/freescale/mx53evk/mx53evk.c

  • Committer: Package Import Robot
  • Author(s): Clint Adams
  • Date: 2012-05-01 18:07:19 UTC
  • mfrom: (16.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20120501180719-rjntk3287im4a0ns
Tags: 2012.04.01-1
* New upstream version.
  - Update mipsel-native-endianness.diff.
  - Update no-error-on-set-but-unused-variables.diff (partially merged).
  - Drop kirkwood_spi-irq_mask.diff (merged).
  - Drop kirkwood-disable-l2c.diff (merged).

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
        {MMC_SDHC3_BASE_ADDR, 1},
209
209
};
210
210
 
211
 
int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 
211
int board_mmc_getcd(struct mmc *mmc)
212
212
{
213
213
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
214
        int ret;
214
215
 
215
216
        mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
 
217
        gpio_direction_input(75);
216
218
        mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
 
219
        gpio_direction_input(77);
217
220
 
218
221
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
219
 
                *cd = gpio_get_value(77); /*GPIO3_13*/
 
222
                ret = !gpio_get_value(77); /* GPIO3_13 */
220
223
        else
221
 
                *cd = gpio_get_value(75); /*GPIO3_11*/
 
224
                ret = !gpio_get_value(75); /* GPIO3_11 */
222
225
 
223
 
        return 0;
 
226
        return ret;
224
227
}
225
228
 
226
229
int board_mmc_init(bd_t *bis)