]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/include/mach/mmc.h
ARM: OMAP: Clean-up MMC device init
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / include / mach / mmc.h
index c4830153a4f3359d08d8e37b6bd318bd9b3bc6cb..af391e6a16ddb74e1e4ca97e45ff6a7adff7b562 100644 (file)
@@ -20,7 +20,6 @@
 #define OMAP_MMC_MAX_SLOTS     2
 
 struct omap_mmc_platform_data {
-       struct omap_mmc_conf    conf;
 
        /* number of slots on board */
        unsigned nr_slots:2;
@@ -42,6 +41,27 @@ struct omap_mmc_platform_data {
        int (*resume)(struct device *dev, int slot);
 
        struct omap_mmc_slot_data {
+
+               unsigned enabled:1;
+
+               /*
+                * nomux means "standard" muxing is wrong on this board, and
+                * that board-specific code handled it before common init logic.
+                */
+               unsigned nomux:1;
+
+               /* switch pin can be for card detect (default) or card cover */
+               unsigned cover:1;
+
+               /* 4 wire signaling is optional, and is only used for SD/SDIO */
+               unsigned wire4:1;
+
+               /* use the internal clock */
+               unsigned internal_clock:1;
+               s16 power_pin;
+               s16 switch_pin;
+               s16 wp_pin;
+
                int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
                int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
                int (* get_ro)(struct device *dev, int slot);
@@ -66,11 +86,28 @@ struct omap_mmc_platform_data {
        } slots[OMAP_MMC_MAX_SLOTS];
 };
 
-extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
-
 /* called from board-specific card detection service routine */
 extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
 
+#if    defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
+       defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
+void omap1_init_mmc(struct omap_mmc_platform_data *info);
+void omap2_init_mmc(struct omap_mmc_platform_data *info);
+void omap_init_mmc(struct omap_mmc_platform_data *info,
+               struct platform_device *pdev1, struct platform_device *pdev2);
+#else
+static inline void omap1_init_mmc(struct omap_mmc_platform_data *info)
+{
+}
+static inline void omap2_init_mmc(struct omap_mmc_platform_data *info)
+{
+}
+static inline void omap_init_mmc(struct omap_mmc_platform_data *info,
+               struct platform_device *pdev1, struct platform_device *pdev2)
+{
+}
+#endif
+
 #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
 void __init hsmmc_init(void);
 #endif