Selaa lähdekoodia

ARM: OMAP: Fix hsmmc init, v2

The naming accidentally broke while changing the name for the
driver to not to conflict with the other mmc driver.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Tony Lindgren 16 vuotta sitten
vanhempi
commit
0dffb5c57a

+ 1 - 1
arch/arm/mach-omap1/devices.c

@@ -181,7 +181,7 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 		}
 		}
 		size = OMAP1_MMC_SIZE;
 		size = OMAP1_MMC_SIZE;
 
 
-		omap_mmc_add(i, base, size, irq, mmc_data[i]);
+		omap_mmc_add("mmci-omap", i, base, size, irq, mmc_data[i]);
 	};
 	};
 }
 }
 
 

+ 7 - 4
arch/arm/mach-omap2/devices.c

@@ -421,6 +421,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
 			int nr_controllers)
 			int nr_controllers)
 {
 {
 	int i;
 	int i;
+	char *name;
 
 
 	for (i = 0; i < nr_controllers; i++) {
 	for (i = 0; i < nr_controllers; i++) {
 		unsigned long base, size;
 		unsigned long base, size;
@@ -450,12 +451,14 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
 			continue;
 			continue;
 		}
 		}
 
 
-		if (cpu_is_omap2420())
+		if (cpu_is_omap2420()) {
 			size = OMAP2420_MMC_SIZE;
 			size = OMAP2420_MMC_SIZE;
-		else
+			name = "mmci-omap";
+		} else {
 			size = HSMMC_SIZE;
 			size = HSMMC_SIZE;
-
-		omap_mmc_add(i, base, size, irq, mmc_data[i]);
+			name = "mmci-omap-hs";
+		}
+		omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
 	};
 	};
 }
 }
 
 

+ 4 - 3
arch/arm/plat-omap/devices.c

@@ -200,14 +200,15 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
 /*
 /*
  * Register MMC devices. Called from mach-omap1 and mach-omap2 device init.
  * Register MMC devices. Called from mach-omap1 and mach-omap2 device init.
  */
  */
-int __init omap_mmc_add(int id, unsigned long base, unsigned long size,
-		unsigned int irq, struct omap_mmc_platform_data *data)
+int __init omap_mmc_add(const char *name, int id, unsigned long base,
+				unsigned long size, unsigned int irq,
+				struct omap_mmc_platform_data *data)
 {
 {
 	struct platform_device *pdev;
 	struct platform_device *pdev;
 	struct resource res[OMAP_MMC_NR_RES];
 	struct resource res[OMAP_MMC_NR_RES];
 	int ret;
 	int ret;
 
 
-	pdev = platform_device_alloc("mmci-omap", id);
+	pdev = platform_device_alloc(name, id);
 	if (!pdev)
 	if (!pdev)
 		return -ENOMEM;
 		return -ENOMEM;
 
 

+ 6 - 4
arch/arm/plat-omap/include/mach/mmc.h

@@ -115,8 +115,9 @@ void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 				int nr_controllers);
 				int nr_controllers);
 void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
 void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
 				int nr_controllers);
 				int nr_controllers);
-int omap_mmc_add(int id, unsigned long base, unsigned long size,
-			unsigned int irq, struct omap_mmc_platform_data *data);
+int omap_mmc_add(const char *name, int id, unsigned long base,
+				unsigned long size, unsigned int irq,
+				struct omap_mmc_platform_data *data);
 #else
 #else
 static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 				int nr_controllers)
 				int nr_controllers)
@@ -126,8 +127,9 @@ static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
 				int nr_controllers)
 				int nr_controllers)
 {
 {
 }
 }
-static inline int omap_mmc_add(int id, unsigned long base, unsigned long size,
-		unsigned int irq, struct omap_mmc_platform_data *data)
+static inline int omap_mmc_add(const char *name, int id, unsigned long base,
+				unsigned long size, unsigned int irq,
+				struct omap_mmc_platform_data *data)
 {
 {
 	return 0;
 	return 0;
 }
 }