+ if (gpio_is_valid(c->gpio_cd)) {
+ mmc->slots[0].card_detect_irq =
+ gpio_to_irq(c->gpio_cd);
+ mmc->suspend = twl_mmc_suspend;
+ mmc->resume = twl_mmc_resume;
+
+ /* NOTE: hsmmc[0] is hard-wired ... */
+ hsmmc[0].card_detect_gpio = c->gpio_cd;
+ mmc->init = twl_mmc1_late_init;
+ mmc->cleanup = twl_mmc1_cleanup;
+ mmc->slots[0].card_detect =
+ twl_mmc1_card_detect;
+ }
+ if (gpio_is_valid(c->gpio_wp)) {
+ gpio_request(c->gpio_wp, "mmc0_wp");
+ gpio_direction_input(c->gpio_wp);
+
+ /* NOTE: hsmmc[0] is hard-wired ... */
+ hsmmc[0].card_wp_gpio = c->gpio_wp;
+ mmc->slots[0].get_ro = twl_mmc1_get_ro;
+ }