Skip to content

Commit

Permalink
MMC: MMCI: allow GPIOs to be passed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Jul 9, 2009
1 parent 012b7d3 commit 7fb2bbf
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/include/asm/mach/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ 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;
};

#endif
2 changes: 2 additions & 0 deletions arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ static unsigned int mmc_status(struct device *dev)
static struct mmc_platform_data mmc_data = {
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status,
.gpio_wp = -1,
.gpio_cd = -1,
};

static struct amba_device mmc_device = {
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,15 @@ static unsigned int realview_mmc_status(struct device *dev)
struct mmc_platform_data realview_mmc0_plat_data = {
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = realview_mmc_status,
.gpio_wp = -1,
.gpio_cd = -1,
};

struct mmc_platform_data realview_mmc1_plat_data = {
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = realview_mmc_status,
.gpio_wp = -1,
.gpio_cd = -1,
};

/*
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-u300/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ int __devinit mmc_init(struct amba_device *adev)
mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29;
mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd;
mmci_card->mmc0_plat_data.status = mmc_status;
mmci_card->mmc0_plat_data.gpio_wp = -1;
mmci_card->mmc0_plat_data.gpio_cd = -1;

mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data;

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-versatile/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ unsigned int mmc_status(struct device *dev)
static struct mmc_platform_data mmc0_plat_data = {
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status,
.gpio_wp = -1,
.gpio_cd = -1,
};

/*
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-versatile/versatile_pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
static struct mmc_platform_data mmc1_plat_data = {
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status,
.gpio_wp = -1,
.gpio_cd = -1,
};

static struct pl061_platform_data gpio2_plat_data = {
Expand Down

0 comments on commit 7fb2bbf

Please sign in to comment.