2 * linux/arch/arm/mach-omap2/board-apollon-mmc.c
4 * Copyright (C) 2005-2007 Samsung Electronics
5 * Author: Kyungmin Park <kyungmin.park@samsung.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/platform_device.h>
15 #include <mach/gpio.h>
18 #ifdef CONFIG_MMC_OMAP
20 static struct device *mmc_device;
22 static int apollon_mmc_set_power(struct device *dev, int slot, int power_on,
25 #ifdef CONFIG_MMC_DEBUG
26 dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1,
27 power_on ? "on" : "off", vdd);
30 dev_err(dev, "No such slot %d\n", slot + 1);
37 static int apollon_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
39 #ifdef CONFIG_MMC_DEBUG
40 dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1,
41 bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
44 dev_err(dev, "No such slot %d\n", slot + 1);
51 static int apollon_mmc_late_init(struct device *dev)
58 static void apollon_mmc_cleanup(struct device *dev)
63 * Note: If you want to detect card feature, please assign GPIO 37
65 static struct omap_mmc_platform_data mmc1_data = {
67 .init = apollon_mmc_late_init,
68 .cleanup = apollon_mmc_cleanup,
69 .dma_mask = 0xffffffff,
74 * Use internal loop-back in MMC/SDIO Module Input Clock
79 .set_power = apollon_mmc_set_power,
80 .set_bus_mode = apollon_mmc_set_bus_mode,
81 .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 |
82 MMC_VDD_32_33 | MMC_VDD_33_34,
87 static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
89 void __init apollon_mmc_init(void)
91 mmc_data[0] = &mmc1_data;
92 omap2_init_mmc(mmc_data, OMAP24XX_NR_MMC);
95 #else /* !CONFIG_MMC_OMAP */
97 void __init apollon_mmc_init(void)
101 #endif /* CONFIG_MMC_OMAP */