mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* SDIO: IO-Ready Bit
@ 2008-03-18 11:00 Tomas Winkler
  2008-03-18 11:33 ` Pierre Ossman
  0 siblings, 1 reply; 8+ messages in thread
From: Tomas Winkler @ 2008-03-18 11:00 UTC (permalink / raw)
  To: drzeus; +Cc: lkml, benzizbit

I'm working on SDIO multi function device.  One of the subdevices  a
system device (SYS) who's  purpose among the others is to initialize
the whole combo, mainly it's loads the firmware of the devices and
kick the sub devices. Each of the sub devices has it's own driver.
This dictates the order of the driver initialization and SYS device
has to compete it's work before other subdeivces drivers can access
the hardware. From hardware perspective device is ready when IO-Ready
bit in SDIO is set.
The first problem is that currently there is hard code timeout  in
sdio_enable_func instead of using TPLFE_ENABLE_TIMEOUT_VAL
/*
	 * FIXME: This should timeout based on information in the CIS,
	 * but we don't have card to parse that yet.
	 */
	timeout = jiffies + HZ

This can be probably easily fixed. The significant issue is that this
is done in busy wait loop and that probe functions are called in
serially.

Since we cannot ensure that enumeration of SYS devices will be first
the other sub devices will fail in their probe functions while calling
sido_enable_func

One option is to move the sdio_enable_func to be called from a work
queue kicked from probe. This still requires non-busy wait timeout on
IO-Ready bit and we cannot fail probe func
if something goes wrong.
Second option would be somehow split the sdio probe function across
the enabled timeout.

Thanks
Tomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-29  8:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18 11:00 SDIO: IO-Ready Bit Tomas Winkler
2008-03-18 11:33 ` Pierre Ossman
2008-03-18 17:43   ` Tomas Winkler
2008-03-18 18:20     ` Pierre Ossman
2008-03-22 22:10       ` Tomas Winkler
2008-03-24 13:53         ` Pierre Ossman
2008-03-24 14:41           ` Tomas Winkler
2008-03-29  8:04             ` Pierre Ossman

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®