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

« back to all changes in this revision

Viewing changes to board/freescale/mx53loco/mx53loco.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:
147
147
        {MMC_SDHC3_BASE_ADDR, 1},
148
148
};
149
149
 
150
 
int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 
150
int board_mmc_getcd(struct mmc *mmc)
151
151
{
152
152
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
153
        int ret;
153
154
 
154
155
        mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
 
156
        gpio_direction_input(75);
155
157
        mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
 
158
        gpio_direction_input(77);
156
159
 
157
160
        if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
158
 
                *cd = gpio_get_value(77); /*GPIO3_13*/
 
161
                ret = !gpio_get_value(77); /* GPIO3_13 */
159
162
        else
160
 
                *cd = gpio_get_value(75); /*GPIO3_11*/
 
163
                ret = !gpio_get_value(75); /* GPIO3_11 */
161
164
 
162
 
        return 0;
 
165
        return ret;
163
166
}
164
167
 
165
168
int board_mmc_init(bd_t *bis)