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

« back to all changes in this revision

Viewing changes to board/freescale/mx51evk/mx51evk.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:
321
321
}
322
322
 
323
323
#ifdef CONFIG_FSL_ESDHC
324
 
int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 
324
int board_mmc_getcd(struct mmc *mmc)
325
325
{
326
326
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
327
        int ret;
327
328
 
328
329
        mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1);
 
330
        gpio_direction_input(0);
329
331
        mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0);
 
332
        gpio_direction_input(6);
330
333
 
331
334
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
332
 
                *cd = gpio_get_value(0);
 
335
                ret = !gpio_get_value(0);
333
336
        else
334
 
                *cd = gpio_get_value(6);
 
337
                ret = !gpio_get_value(6);
335
338
 
336
 
        return 0;
 
339
        return ret;
337
340
}
338
341
 
339
342
int board_mmc_init(bd_t *bis)