aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-07-09 10:15:12 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-07-09 10:15:12 -0400
commit7fb2bbf4d9e7e62057184f1e061566459eef6c79 (patch)
treee67c4c6780246bca649fac652f83116785ee855e
parent012b7d339ce8c42d41e35b35c4acc3dd29501d52 (diff)
MMC: MMCI: allow GPIOs to be passed
Add and initialize the gpio_wp and gpio_cd members. We need to ensure that all users are covered, because GPIO 0 may be valid. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Linus Walleij <linus.walleij@stericsson.com>
-rw-r--r--arch/arm/include/asm/mach/mmc.h2
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c2
-rw-r--r--arch/arm/mach-realview/core.c4
-rw-r--r--arch/arm/mach-u300/mmc.c2
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c2
6 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h
index 4da332b03144..b490ecc79def 100644
--- a/arch/arm/include/asm/mach/mmc.h
+++ b/arch/arm/include/asm/mach/mmc.h
@@ -10,6 +10,8 @@ struct mmc_platform_data {
10 unsigned int ocr_mask; /* available voltages */ 10 unsigned int ocr_mask; /* available voltages */
11 u32 (*translate_vdd)(struct device *, unsigned int); 11 u32 (*translate_vdd)(struct device *, unsigned int);
12 unsigned int (*status)(struct device *); 12 unsigned int (*status)(struct device *);
13 int gpio_wp;
14 int gpio_cd;
13}; 15};
14 16
15#endif 17#endif
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 4ac04055c2ea..69956cdae3c2 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -403,6 +403,8 @@ static unsigned int mmc_status(struct device *dev)
403static struct mmc_platform_data mmc_data = { 403static struct mmc_platform_data mmc_data = {
404 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 404 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
405 .status = mmc_status, 405 .status = mmc_status,
406 .gpio_wp = -1,
407 .gpio_cd = -1,
406}; 408};
407 409
408static struct amba_device mmc_device = { 410static struct amba_device mmc_device = {
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 9ea9c05093cd..17a07e6acfac 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -238,11 +238,15 @@ static unsigned int realview_mmc_status(struct device *dev)
238struct mmc_platform_data realview_mmc0_plat_data = { 238struct mmc_platform_data realview_mmc0_plat_data = {
239 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 239 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
240 .status = realview_mmc_status, 240 .status = realview_mmc_status,
241 .gpio_wp = -1,
242 .gpio_cd = -1,
241}; 243};
242 244
243struct mmc_platform_data realview_mmc1_plat_data = { 245struct mmc_platform_data realview_mmc1_plat_data = {
244 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 246 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
245 .status = realview_mmc_status, 247 .status = realview_mmc_status,
248 .gpio_wp = -1,
249 .gpio_cd = -1,
246}; 250};
247 251
248/* 252/*
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 3138d3955c9e..585cc013639d 100644
--- a/arch/arm/mach-u300/mmc.c
+++ b/arch/arm/mach-u300/mmc.c
@@ -156,6 +156,8 @@ int __devinit mmc_init(struct amba_device *adev)
156 mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29; 156 mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29;
157 mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd; 157 mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd;
158 mmci_card->mmc0_plat_data.status = mmc_status; 158 mmci_card->mmc0_plat_data.status = mmc_status;
159 mmci_card->mmc0_plat_data.gpio_wp = -1;
160 mmci_card->mmc0_plat_data.gpio_cd = -1;
159 161
160 mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; 162 mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data;
161 163
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 92273c95edf5..afc0f87f3fa4 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -373,6 +373,8 @@ unsigned int mmc_status(struct device *dev)
373static struct mmc_platform_data mmc0_plat_data = { 373static struct mmc_platform_data mmc0_plat_data = {
374 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 374 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
375 .status = mmc_status, 375 .status = mmc_status,
376 .gpio_wp = -1,
377 .gpio_cd = -1,
376}; 378};
377 379
378/* 380/*
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 7419451fdf00..9af8d8154df5 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -44,6 +44,8 @@
44static struct mmc_platform_data mmc1_plat_data = { 44static struct mmc_platform_data mmc1_plat_data = {
45 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 45 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
46 .status = mmc_status, 46 .status = mmc_status,
47 .gpio_wp = -1,
48 .gpio_cd = -1,
47}; 49};
48 50
49static struct pl061_platform_data gpio2_plat_data = { 51static struct pl061_platform_data gpio2_plat_data = {