From: Elvis Dowson <elvis.dowson@mac.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Difference between twl4030_hsmmc_info and omap_mmc_platform_data
Date: Fri, 15 Oct 2010 01:48:53 +0400 [thread overview]
Message-ID: <DB759C09-975B-4088-B334-79F9010573F8@mac.com> (raw)
Hi,
I'm trying to bring up a TI WL1271 wlan module connected to MMC2 controller of a TI OMAP 3530 processor.
I am unclear about the difference between the use of twl4030_hsmmc_info and omap_mmc_platform_data, to set the attributes and constraints for the MMC1 (connected to microSD card) and MMC2 (connected to WLAN module).
The beagleboard uses twl4030_mmc_init, which has a wrapper for omap_mmc_platform_data defined in mmc-twl4030.h.
The board-sholes-hsmmc.c doesn't use twl4030, but directly uses the omap_mmc_platform_data structure.
Example:
board-omap3beagle.c uses twl4030_mmc_init, which internally uses the following structure to define mmc properties.
static struct twl4030_hsmmc_info mmc[] = {
{
.mmc = 1,
.wires = 8,
.gpio_wp = -ENOSYS,
.gpio_cd = -ENOSYS,
.name = "MMC1 controller slot"
},
{
.mmc = 2,
.wires = 4,
.gpio_cd = -EINVAL,
.gpio_wp = -EINVAL,
// .transceiver = true,
.name = "MMC2 controller slot",
.ocr_mask = 0x00000080,
},
{} /* Terminator */
};
For board-sholes-hsmmc.c, it uses a omap_mmc_platform_data
static struct omap_mmc_platform_data mmc1_data = {
.nr_slots = 1,
.init = hsmmc_late_init,
.cleanup = hsmmc_cleanup,
#ifdef CONFIG_PM
.suspend = hsmmc_suspend,
.resume = hsmmc_resume,
#endif
.dma_mask = 0xffffffff,
.slots[0] = {
.wires = 8,
.set_power = hsmmc_set_power,
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34 |
MMC_VDD_165_195,
.name = "first slot",
/* we get car_detect_irq later */
.card_detect_irq = 0,
.card_detect = hsmmc_card_detect,
},
};
#if defined(CONFIG_OMAP_HS_MMC2)
#ifdef CONFIG_MMC_EMBEDDED_SDIO
static struct sdio_embedded_func wifi_func_array[] = {
{
.f_class = SDIO_CLASS_NONE,
.f_maxblksize = 0,
},
{
.f_class = SDIO_CLASS_WLAN,
.f_maxblksize = 512,
},
};
static struct embedded_sdio_data sholes_wifi_emb_data = {
.cis = {
.vendor = 0x104c,
.device = 0x9066,
.blksize = 512,
.max_dtr = 24000000,
},
.cccr = {
.multi_block = 1,
.low_speed = 0,
.wide_bus = 1,
.high_power = 0,
.high_speed = 0,
},
.funcs = wifi_func_array,
.num_funcs = 2,
};
#endif
static struct omap_mmc_platform_data mmc2_data = {
.nr_slots = 1,
.init = hsmmc2_late_init,
.cleanup = hsmmc2_cleanup,
#ifdef CONFIG_PM
.suspend = hsmmc2_suspend,
.resume = hsmmc2_resume,
#endif
.dma_mask = 0xffffffff,
#ifndef CONFIG_MMC_EMBEDDED_SDIO
.name = "TIWLAN_SDIO",
#endif
.slots[0] = {
.wires = 4,
.set_power = hsmmc2_set_power,
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34 |
MMC_VDD_165_195,
.name = "first slot",
.internal_clock = 1,
.card_detect_irq = 0,
.card_detect = hsmmc2_card_detect,
#ifdef CONFIG_MMC_EMBEDDED_SDIO
.embedded_sdio = &sholes_wifi_emb_data,
.register_status_notify = &sholes_wifi_status_register,
#endif
},
};
#endif
Best regards,
Elvis Dowson
next reply other threads:[~2010-10-14 21:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-14 21:48 Elvis Dowson [this message]
2010-10-14 22:56 ` Nishanth Menon
2010-10-15 10:08 ` Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB759C09-975B-4088-B334-79F9010573F8@mac.com \
--to=elvis.dowson@mac.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®