mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tomas Winkler" <tomasw@gmail.com>
To: drzeus@drzeus.cx
Cc: lkml <linux-kernel@vger.kernel.org>, benzizbit@gmail.com
Subject: SDIO: IO-Ready Bit
Date: Tue, 18 Mar 2008 13:00:34 +0200	[thread overview]
Message-ID: <1ba2fa240803180400y1d7a2740t2c21b8b73a755016@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-03-18 11:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 11:00 Tomas Winkler [this message]
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

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=1ba2fa240803180400y1d7a2740t2c21b8b73a755016@mail.gmail.com \
    --to=tomasw@gmail.com \
    --cc=benzizbit@gmail.com \
    --cc=drzeus@drzeus.cx \
    --cc=linux-kernel@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®