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>
14 #include <asm/arch/gpio.h>
15 #include <asm/arch/mmc.h>
17 #ifdef CONFIG_MMC_OMAP
19 static struct device *mmc_device;
21 static int apollon_mmc_set_power(struct device *dev, int slot, int power_on,
24 #ifdef CONFIG_MMC_DEBUG
25 dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1,
26 power_on ? "on" : "off", vdd);
29 dev_err(dev, "No such slot %d\n", slot + 1);
36 static int apollon_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
38 #ifdef CONFIG_MMC_DEBUG
39 dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1,
40 bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
43 dev_err(dev, "No such slot %d\n", slot + 1);
50 static int apollon_mmc_late_init(struct device *dev)
57 static void apollon_mmc_cleanup(struct device *dev)
61 static struct omap_mmc_platform_data apollon_mmc_data = {
64 .init = apollon_mmc_late_init,
65 .cleanup = apollon_mmc_cleanup,
67 .set_power = apollon_mmc_set_power,
68 .set_bus_mode = apollon_mmc_set_bus_mode,
70 .get_cover_state = NULL,
71 .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 |
72 MMC_VDD_32_33 | MMC_VDD_33_34,
77 void __init apollon_mmc_init(void)
79 omap_set_mmc_info(1, &apollon_mmc_data);
82 #else /* !CONFIG_MMC_OMAP */
84 void __init apollon_mmc_init(void)
88 #endif /* CONFIG_MMC_OMAP */