Skip to contentSkip to conversation

Move MMCI header to amba include dir

PATCH New Linus Walleij 3 participants 4 messages Sep 9, 2009 – Sep 22, 2009

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Move MMCI header to amba include dir

This moves the mmci platform data definition struct away from arch/arm/include/asm/mach/mmc.h into the more proper place among the other primecells in include/linux/amba/mmci.h and at the same time renames it to "mmci.h", and also the struct in this file confusingly named mmc_platform_data has been renamed mmci_platform_data for clarity.

---
 arch/arm/include/asm/mach/mmc.h          |   18 ------------------
 arch/arm/mach-integrator/integrator_cp.c |    4 ++--
 arch/arm/mach-realview/core.c            |    6 +++---
 arch/arm/mach-realview/core.h            |    4 ++--
 arch/arm/mach-u300/mmc.c                 |    4 ++--
 arch/arm/mach-versatile/core.c           |    2 +-
 arch/arm/mach-versatile/versatile_pb.c   |    4 ++--
 drivers/mmc/host/mmci.c                  |    4 ++--
 drivers/mmc/host/mmci.h                  |    2 +-
 include/linux/amba/mmci.h                |   18 ++++++++++++++++++
 10 files changed, 33 insertions(+), 33 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach/mmc.h
 create mode 100644 include/linux/amba/mmci.h
arch/arm/include/asm/mach/mmc.h deleted +0 -18
deleted file mode 100644
index 27bec55..0000000
@@ -1,18 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
-
-#include <linux/mmc/host.h>
-
-struct mmc_platform_data {
-	unsigned int ocr_mask;			/* available voltages */
-	u32 (*translate_vdd)(struct device *, unsigned int);
-	unsigned int (*status)(struct device *);
-	int	gpio_wp;
-	int	gpio_cd;
-	unsigned long capabilities;
-};
-
-#endif
arch/arm/mach-integrator/integrator_cp.c +2 -2
index 2a318eb..3f35293 100644
@@ -19,6 +19,7 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/kmi.h>
 #include <linux/amba/clcd.h>
+#include <linux/amba/mmci.h>
 #include <linux/io.h>
 
 #include <asm/clkdev.h>
@@ -35,7 +36,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
-#include <asm/mach/mmc.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 
@@ -400,7 +400,7 @@ static unsigned int mmc_status(struct device *dev)
 	return status & 8;
 }
 
-static struct mmc_platform_data mmc_data = {
+static struct mmci_platform_data mmc_data = {
 	.ocr_mask	= MMC_VDD_32_33|MMC_VDD_33_34,
 	.status		= mmc_status,
 	.gpio_wp	= -1,
arch/arm/mach-realview/core.c +3 -3
index dc3519c..e98b3f3 100644
@@ -30,6 +30,7 @@
 #include <linux/io.h>
 #include <linux/smsc911x.h>
 #include <linux/ata_platform.h>
+#include <linux/amba/mmci.h>
 
 #include <asm/clkdev.h>
 #include <asm/system.h>
@@ -44,7 +45,6 @@
 #include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
-#include <asm/mach/mmc.h>
 
 #include <asm/hardware/gic.h>
 
@@ -237,14 +237,14 @@ static unsigned int realview_mmc_status(struct device *dev)
 	return readl(REALVIEW_SYSMCI) & mask;
 }
 
-struct mmc_platform_data realview_mmc0_plat_data = {
+struct mmci_platform_data realview_mmc0_plat_data = {
 	.ocr_mask	= MMC_VDD_32_33|MMC_VDD_33_34,
 	.status		= realview_mmc_status,
 	.gpio_wp	= 17,
 	.gpio_cd	= 16,
 };
 
-struct mmc_platform_data realview_mmc1_plat_data = {
+struct mmci_platform_data realview_mmc1_plat_data = {
 	.ocr_mask	= MMC_VDD_32_33|MMC_VDD_33_34,
 	.status		= realview_mmc_status,
 	.gpio_wp	= 19,
arch/arm/mach-realview/core.h +2 -2
index 59a337b..46cd6ac 100644
@@ -47,8 +47,8 @@ static struct amba_device name##_device = {			\
 extern struct platform_device realview_flash_device;
 extern struct platform_device realview_cf_device;
 extern struct platform_device realview_i2c_device;
-extern struct mmc_platform_data realview_mmc0_plat_data;
-extern struct mmc_platform_data realview_mmc1_plat_data;
+extern struct mmci_platform_data realview_mmc0_plat_data;
+extern struct mmci_platform_data realview_mmc1_plat_data;
 extern struct clcd_board clcd_plat_data;
 extern void __iomem *gic_cpu_base_addr;
 extern void __iomem *timer0_va_base;
arch/arm/mach-u300/mmc.c +2 -2
index 82af247..70f0ca5 100644
@@ -20,7 +20,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/gpio.h>
 
-#include <asm/mach/mmc.h>
+#include <linux/amba/mmci.h>
 #include "mmc.h"
 #include "padmux.h"
 
@@ -28,7 +28,7 @@ struct mmci_card_event {
 	struct input_dev *mmc_input;
 	int mmc_inserted;
 	struct work_struct workq;
-	struct mmc_platform_data mmc0_plat_data;
+	struct mmci_platform_data mmc0_plat_data;
 };
 
 static unsigned int mmc_status(struct device *dev)
arch/arm/mach-versatile/core.c +1 -1
index 975eae4..7b4b7d6 100644
@@ -27,6 +27,7 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
 #include <linux/amba/pl061.h>
+#include <linux/amba/mmci.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/cnt32_to_63.h>
@@ -47,7 +48,6 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
-#include <asm/mach/mmc.h>
 
 #include "core.h"
 #include "clock.h"
arch/arm/mach-versatile/versatile_pb.c +2 -2
index 9af8d81..239cd30 100644
@@ -24,6 +24,7 @@
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/pl061.h>
+#include <linux/amba/mmci.h>
 #include <linux/io.h>
 
 #include <mach/hardware.h>
@@ -31,7 +32,6 @@
 #include <asm/mach-types.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/mmc.h>
 
 #include "core.h"
 
@@ -41,7 +41,7 @@
 #define IRQ_MMCI1A	IRQ_SIC_MMCI1A
 #endif
 
-static struct mmc_platform_data mmc1_plat_data = {
+static struct mmci_platform_data mmc1_plat_data = {
 	.ocr_mask	= MMC_VDD_32_33|MMC_VDD_33_34,
 	.status		= mmc_status,
 	.gpio_wp	= -1,
drivers/mmc/host/mmci.c +2 -2
index cee91e9..c78e478 100644
@@ -22,12 +22,12 @@
 #include <linux/clk.h>
 #include <linux/scatterlist.h>
 #include <linux/gpio.h>
+#include <linux/amba/mmci.h>
 
 #include <asm/cacheflush.h>
 #include <asm/div64.h>
 #include <asm/io.h>
 #include <asm/sizes.h>
-#include <asm/mach/mmc.h>
 
 #include "mmci.h"
 
@@ -537,7 +537,7 @@ static void mmci_check_status(unsigned long data)
 
 static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
 {
-	struct mmc_platform_data *plat = dev->dev.platform_data;
+	struct mmci_platform_data *plat = dev->dev.platform_data;
 	struct mmci_host *host;
 	struct mmc_host *mmc;
 	int ret;
drivers/mmc/host/mmci.h +1 -1
index 839f264..a7f9a51 100644
@@ -161,7 +161,7 @@ struct mmci_host {
 	unsigned int		mclk;
 	unsigned int		cclk;
 	u32			pwr;
-	struct mmc_platform_data *plat;
+	struct mmci_platform_data *plat;
 
 	u8			hw_designer;
 	u8			hw_revision:4;
include/linux/amba/mmci.h new file +18 -0
new file mode 100644
index 0000000..6b42417
@@ -0,0 +1,18 @@
+/*
+ *  include/linux/amba/mmci.h
+ */
+#ifndef AMBA_MMCI_H
+#define AMBA_MMCI_H
+
+#include <linux/mmc/host.h>
+
+struct mmci_platform_data {
+	unsigned int ocr_mask;			/* available voltages */
+	u32 (*translate_vdd)(struct device *, unsigned int);
+	unsigned int (*status)(struct device *);
+	int	gpio_wp;
+	int	gpio_cd;
+	unsigned long capabilities;
+};
+
+#endif
Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 3/3 Move MMCI header to amba include dir

Quoted 6 lines · Linus Walleij

This moves the mmci platform data definition struct away from arch/arm/include/asm/mach/mmc.h into the more proper place among the other primecells in include/linux/amba/mmci.h and at the same time renames it to "mmci.h", and also the struct in this file confusingly named mmc_platform_data has been renamed mmci_platform_data for clarity.

Not sure what's happened, but this patch appears to conflict with another, resulting in:

arch/arm/mach-versatile/core.c:372: error: variable 'mmc0_plat_data' has initializer but incomplete type arch/arm/mach-versatile/core.c:373: error: unknown field 'ocr_mask' specified in initializer arch/arm/mach-versatile/core.c:373: warning: excess elements in struct initializer arch/arm/mach-versatile/core.c:373: warning: (near initialization for 'mmc0_plat_data') arch/arm/mach-versatile/core.c:374: error: unknown field 'status' specified in initializer arch/arm/mach-versatile/core.c:374: warning: excess elements in struct initializer arch/arm/mach-versatile/core.c:374: warning: (near initialization for 'mmc0_plat_data') arch/arm/mach-versatile/core.c:375: error: unknown field 'gpio_wp' specified in initializer arch/arm/mach-versatile/core.c:375: warning: excess elements in struct initializer arch/arm/mach-versatile/core.c:375: warning: (near initialization for 'mmc0_plat_data') arch/arm/mach-versatile/core.c:376: error: unknown field 'gpio_cd' specified in initializer arch/arm/mach-versatile/core.c:376: warning: excess elements in struct initializer arch/arm/mach-versatile/core.c:376: warning: (near initialization for 'mmc0_plat_data')

arch/arm/mach-realview/realview_eb.c:40:26: error: asm/mach/mmc.h: No such file or directory arch/arm/mach-realview/realview_pb1176.c:40:26: error: asm/mach/mmc.h: No such file or directory arch/arm/mach-realview/realview_pb11mp.c:41:26: error: asm/mach/mmc.h: No such file or directory

so I'm going to drop it for the time being.

#2 lore raw

PATCH 3/3 Move MMCI header to amba include dir

Quoted 10 lines · Russell King - ARM Linux
Quoted 6 lines · Linus Walleij

This moves the mmci platform data definition struct away from arch/arm/include/asm/mach/mmc.h into the more proper place among the other primecells in include/linux/amba/mmci.h and at the same time renames it to "mmci.h", and also the struct in this file confusingly named mmc_platform_data has been renamed mmci_platform_data for clarity.

Not sure what's happened, but this patch appears to conflict with another, resulting in:

It's also meant that 5702/1 has been dropped in addition to 5699/1. In future, please ensure that you run a build check on the machines which you've modified. Thanks.

#3 lore raw

PATCH 3/3 Move MMCI header to amba include dir

2009/9/21 Russell King - ARM Linux <[email protected]>:

Quoted 6 lines
Quoted 2 lines

Not sure what's happened, but this patch appears to conflict with another, resulting in:

It's also meant that 5702/1 has been dropped in addition to 5699/1. In future, please ensure that you run a build check on the machines which you've modified.  Thanks.

My fault for not regression-compiling enough. Learnt a lesson, hotted my integration scripts with defaultcompiles for Realview, Integrator and versatile and submitted new versions to the patch tracker, sorry for the inconvenience.

Yours.
Linus Walleij