2 * MMC definitions for OMAP2
4 * Copyright (C) 2006 Nokia Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
14 #include <linux/types.h>
15 #include <linux/device.h>
16 #include <linux/mmc/host.h>
18 #include <asm/arch/board.h>
20 #define OMAP_MMC_MAX_SLOTS 2
22 struct omap_mmc_platform_data {
23 struct omap_mmc_conf conf;
25 /* number of slots on board */
28 /* set if your board has components or wiring that limits the
29 * maximum frequency on the MMC bus */
30 unsigned int max_freq;
32 /* switch the bus to a new slot */
33 int (* switch_slot)(struct device *dev, int slot);
34 /* initialize board-specific MMC functionality, can be NULL if
36 int (* init)(struct device *dev);
37 void (* cleanup)(struct device *dev);
38 void (* shutdown)(struct device *dev);
40 /* To handle board related suspend/resume functionality for MMC */
41 int (*suspend)(struct device *dev, int slot);
42 int (*resume)(struct device *dev, int slot);
44 struct omap_mmc_slot_data {
45 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
46 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
47 int (* get_ro)(struct device *dev, int slot);
49 /* return MMC cover switch state, can be NULL if not supported.
51 * possible return values:
55 int (* get_cover_state)(struct device *dev, int slot);
60 /* Card detection IRQs */
62 int (* card_detect)(int irq);
64 unsigned int ban_openended:1;
66 } slots[OMAP_MMC_MAX_SLOTS];
69 extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
71 /* called from board-specific card detection service routine */
72 extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);