Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137493
b: refs/heads/master
c: 01971f6
h: refs/heads/master
i:
  137491: 12c4bb3
v: v3
  • Loading branch information
David Brownell authored and Tony Lindgren committed Mar 24, 2009
1 parent e995da2 commit 0865271
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0329c3773e59aa7e50dc3760a27fb4e098773d0f
refs/heads/master: 01971f65ff88e3ebe2b6ae42b95d68e26b83718d
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-omap2/mmc-twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
#include <linux/regulator/machine.h>

#include <mach/hardware.h>
#include <mach/control.h>
Expand Down Expand Up @@ -437,6 +438,15 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
}

omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC);

/* pass the device nodes back to board setup code */
for (c = controllers; c->mmc; c++) {
struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];

if (!c->mmc || c->mmc > nr_hsmmc)
continue;
c->dev = mmc->dev;
}
}

#endif
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/mmc-twl4030.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct twl4030_hsmmc_info {
bool ext_clock; /* use external pin for input clock */
int gpio_cd; /* or -EINVAL */
int gpio_wp; /* or -EINVAL */
struct device *dev; /* returned: pointer to mmc adapter */
};

#if defined(CONFIG_TWL4030_CORE) && \
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/plat-omap/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ int __init omap_mmc_add(const char *name, int id, unsigned long base,
ret = platform_device_add(pdev);
if (ret)
goto fail;

/* return device handle to board setup code */
data->dev = &pdev->dev;
return 0;

fail:
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/include/mach/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#define OMAP_MMC_MAX_SLOTS 2

struct omap_mmc_platform_data {
/* back-link to device */
struct device *dev;

/* number of slots per controller */
unsigned nr_slots:2;
Expand Down

0 comments on commit 0865271

Please sign in to comment.