static int h6300_mmc_set_power(struct device *dev, int slot, int power_on,
int vdd)
{
+ //printk("h6300_mmc_set_power started\n");
+
/*
int err;
u8 dat = 0;
.slots[0] = {
.set_power = h6300_mmc_set_power,
/* .get_cover_state = h6300_mmc_get_cover_state, */
- .gpio_wp = H6300_GPIO_MMC_WRITE_PROTECT, // input, write protect
- .switch_pin = H6300_GPIO_MMC_CARD_DETECT, // input, card detect
+ .gpio_wp = H6300_GPIO_MMC_WRITE_PROTECT, // input, write protect
+/* .switch_pin = H6300_GPIO_MMC_CARD_DETECT, */ // input, card detect
+/*
.wires = 4,
.name = "mmcblk",
+*/
},
};
static void __init h6300_mmc_init(void)
{
+ int ret;
+
+ printk("h6300_mmc_init() started\n");
+ ret = gpio_request(H6300_GPIO_MMC_WRITE_PROTECT, "MMC WP");
+ if (ret < 0) {
+ printk("Failed to get MMC WP gpio\n");
+ gpio_free(H6300_GPIO_MMC_WRITE_PROTECT);
+ return;
+ }
+ gpio_direction_input(H6300_GPIO_MMC_WRITE_PROTECT);
+ printk("MMC WP gpio set input\n");
+
h6300_mmc_data[0] = &h6300_mmc1_data;
omap1_init_mmc(h6300_mmc_data, OMAP15XX_NR_MMC);
+ printk("h6300 mmc init done\n");
/*
int ret;
omap_board_config_size = ARRAY_SIZE(h6300_config);
omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0);
- //h6300_mmc_init();
+ h6300_mmc_init();
}
static void __init h6300_map_io(void)