Hi Beagle friends,
I have a question on how to link regulators to mmc devices on
beagleboard. I see that there's a patch adding wl1271 support to
beagleboard so that the bbtoys wl1271 will work. Looking at this
patch, I see:
33 + static struct omap2_hsmmc_info mmcbbt[] = {
34 + {
35 + .mmc = 1,
36 + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
37 + .gpio_wp = 29,
38 + },
39 + {
40 + .name = "wl1271",
41 + .mmc = 2,
42 + .caps = MMC_CAP_4_BIT_DATA |
MMC_CAP_POWER_OFF_CARD,
43 + .gpio_wp = -EINVAL,
44 + .gpio_cd = -EINVAL,
45 + .nonremovable = true,
46 + },
47 + {} /* Terminator */
48 + };
I'm not sure why that additional wl1271 entry didn't just get appended
into the regular mmc structure which is just above:
static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
.gpio_wp = 29,
},
{} /* Terminator */
};
I then got really confused by this:
+#if defined(CONFIG_WL1271) || defined(CONFIG_WL1271_MODULE)
90 + if(!strcmp(expansionboard_name, "bbtoys-wifi")) {
91 + omap2_hsmmc_init(mmcbbt);
92 + /* link regulators to MMC adapters */
93 + beagle_vmmc1_supply.dev = mmcbbt[0].dev;
94 + beagle_vsim_supply.dev = mmcbbt[0].dev;
95 + } else {
96 + omap2_hsmmc_init(mmc);
97 + /* link regulators to MMC adapters */
98 + beagle_vmmc1_supply.dev = mmc[0].dev;
99 + beagle_vsim_supply.dev = mmc[0].dev;
100 + }
101 +#else
102 omap2_hsmmc_init(mmc);
103 -
104 /* link regulators to MMC adapters */
105 beagle_vmmc1_supply.dev = mmc[0].dev;
106 beagle_vsim_supply.dev = mmc[0].dev;
107 +#endif
Is all that conditioning needed? At the end, I don't think any
regulator ends up linked to mmc[1]/wifi anyway.
I ask because I'm trying to get wl1271 to work on MMC3 using a board
that's similar to beagleboard-xm and finding that to be a non-trivial
task. If anyone is interested, I have posted my full board file and
bootlog on the rowboat mailing list:
http://groups.google.com/group/rowboat/browse_thread/thread/02b1cdb272b4c4b1
I would welcome any feedback/advice on this.
Thanks,
jayakumar