public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx5 iomux: Fix GPIO with SION
Date: Fri, 17 Aug 2012 22:21:26 +0200 (CEST)	[thread overview]
Message-ID: <811199470.2523901.1345234886554.JavaMail.root@advansee.com> (raw)
In-Reply-To: <502EA44D.6030709@denx.de>

Hi Stefano,

> On 17/08/2012 18:21, Beno?t Th?baudeau wrote:
> > Hi Stefano,
> > 
> 
> Hi Beno?t,
> 
> >>
> >> So why should we use both SION and GPIO ?
> > 
> > No. See "A.3.2 SW Loopback through SION Bit" and "Figure A-3. IOMUX
> > Cell Block
> > Diagram" in the i.MX51 RM.
> > 
> > Whether SION is set or not, the selected IOMUX function will drive
> > the pin.
> 
> And this is clear..
> 
> > 
> > If SION is cleared, the input from the pin will be either disabled
> > or go to the
> > selected IOMUX function depending on the activation of the input by
> > this
> > function.
> 
> and also thi point is clear.
> 
> > 
> > If SION is set, the input from the pin is always enabled and goes
> > to all IOMUX
> > alternate functions at once (if their input connection to this pin
> > is activated
> > through the daisy chain).
> 
> but I am asking myself why I should do this, that is the function
> drive
> the pin, using the input as source for another funtion.
> 
> > 
> > So SION does not invalidate the function bit-field.
> > 
> > Then, you could wonder what kind of real life use case could be
> > useful with both
> > SION and GPIO set.
> 
> This is exactly the point !
> 
> > This could be used for instance as a workaround to an erratum
> > if an IOMUX function does not drive its output properly, but it
> > needs to read
> > back the pin status to work fine. Thus, the GPIO function output
> > could be used
> > to drive the pin, with SION set so that the flawed IOMUX function
> > can still
> > probe the pin and function properly internally. Note that it's only
> > a
> > theoretical example; I don't remember such an erratum.
> 
> I am really impressed about your attention reading the manuals, but
> we
> have the rule in u-boot that we add code / feature when we have a use
> case (the same is in kernel). At the moment, it is pure theory, and
> nobody will use it. We will reconsider this patch when its
> introduction
> will be required to fix a SOC bug, if any.

Sure, but this is neither new code nor a new feature. It is only a fix that
makes sure that the code won't break any potential use case in the future. This
is weird to keep a known issue in the code until someone gets in trouble because
of it and hence wastes time.

But anyway, this file will probably disappear in the near future because of the
new pin definitions, so that won't make a big difference.

Best regards,
Beno?t

      reply	other threads:[~2012-08-17 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 13:48 [U-Boot] [PATCH] mx5 iomux: Fix GPIO with SION Benoît Thébaudeau
2012-08-17 11:39 ` Stefano Babic
2012-08-17 16:21   ` Benoît Thébaudeau
2012-08-17 20:06     ` Stefano Babic
2012-08-17 20:21       ` Benoît Thébaudeau [this message]

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=811199470.2523901.1345234886554.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.com \
    --cc=u-boot@lists.denx.de \
    /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