Thread (61 messages) 61 messages, 12 authors, 2010-08-06

Re: [PATCH v2 03/20] mmc: support embedded data field in mmc_host

flat view

From: Ohad Ben-Cohen <hidden>
Date: 2010-07-29 06:00:24
Also in: linux-arm-kernel, linux-mmc, linux-omap

Hi Vitaly,

On Wed, Jul 28, 2010 at 10:47 PM, Vitaly Wool [off-list ref] wrote:
On Wed, Jul 21, 2010 at 7:33 PM, Ohad Ben-Cohen [off-list ref] wrote:
quoted
Add support to set/get mmc_host private embedded
data.

This is needed to allow software to dynamically
create (and remove) SDIO functions which represents
embedded SDIO devices.
<snip>
quoted
@@ -209,6 +209,8 @@ struct mmc_host {
       struct led_trigger      *led;           /* activity led */
 #endif

+       void                    *embedded_data;
+
To my understanding, this data doesn't belong to mmc_host. It's not a
host data at all. E. g. imagine a GPIO IRQ for some SDIO chip -- it's
totally unrelated to host.

I think a cleaner way would be to introduce something similar to what
we have for SPI, e. g. struct sdio_board_info. This board info will
contain platform-specific stuff and vendor id/chip id for each onboard
SDIO device. Then the SDIO core will pick up the appropriate data
basing on vendor id/chip id.
Can you please elaborate some more about your proposal (specifically
where does this sdio_board_info get set and how do function drivers
access it) ?

If I understand you correctly, you suggest to have a global,
board-specific table of sdio_board_info structures, which would be
accessible to the SDIO core (through the host driver ?). When a new
SDIO device is found the core would search this table for the
appropriate sdio_board_info struct and make it accessible to the SDIO
function driver ?

Thanks,
Ohad.
~Vitaly
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help