public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx6: Add IOMUX_CONFIG_SION flag to all GPIO pins
Date: Tue, 01 Oct 2013 14:29:55 -0700	[thread overview]
Message-ID: <524B3ED3.6010204@boundarydevices.com> (raw)
In-Reply-To: <1938105334.2320821.1380657041367.JavaMail.zimbra@advansee.com>

Hi Beno?t,

On 10/01/2013 12:50 PM, Beno?t Th?baudeau wrote:
> On Tuesday, October 1, 2013 6:17:06 PM, Eric Nelson wrote:
>> On 10/01/2013 09:10 AM, Stefano Babic wrote:
>>> On 01/10/2013 17:56, Eric Nelson wrote:
>>>> On 10/01/2013 07:49 AM, Stefano Babic wrote:
>>>>> On 01/10/2013 16:26, Eric Nelson wrote:
>>>>
...
>>>> Did I miss something in this thread that does actually require
>>>> that ability? It seems a pretty obscure thing in the normal case
>>>> to drive an output without confidence that it will succeed.
>>>
>>> Yes, it seems quite strange, but it helps to debug the hardware. It is
>>> not the first time we see that, even driving the output, the signal does
>>> not go to the expected value, due for example to a conflict (another
>>> peripheral driving the signal) or to a wrong pull up resistor. As U-Boot
>>> is a great tool for hardware debugging, reading the signal back let
>>> check that the output is set to the desired value.
>>>
>>
>> I agree with all of that, though this only covers the case of a
>> pin set up as a GPIO output, and that same debugging approach
>> is often used for other functions (display data pins, clock inputs
>> and outputs, et cetera).
>>
>> You probably wouldn't just set SION on all pins, right? I suspect
>> that there'd be some ramification in terms of power consumption if
>> nothing else.
>
> Right. Well, instead of adding SION to the pin definition header files, then we
> could just add SION where needed on a per-pin basis, e.g.:
> ---
> imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 |
> 			IOMUX_CONFIG_SION << MUX_MODE_SHIFT);
> ---
>
> A helper macro could be defined in arch/arm/include/asm/imx-common/iomux-v3.h in
> order to simplify the writing, e.g.:
> ---
> #define MUX_MODE_SION	(IOMUX_CONFIG_SION << MUX_MODE_SHIFT)
> ---
> imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION);
> ---
>

I like this approach much better since it lets the reader know there's
something special about the pin.

Regards,


Eric

  parent reply	other threads:[~2013-10-01 21:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 22:15 [U-Boot] [PATCH] mx6: Add IOMUX_CONFIG_SION flag to all GPIO pins Otavio Salvador
2013-10-01  8:33 ` Stefano Babic
2013-10-01 12:01   ` Otavio Salvador
2013-10-01 12:43     ` Marek Vasut
2013-10-01 13:08       ` Otavio Salvador
2013-10-01 14:21         ` Eric Nelson
2013-10-01 13:13     ` Stefano Babic
2013-10-01 14:26       ` Eric Nelson
2013-10-01 14:49         ` Stefano Babic
2013-10-01 15:56           ` Eric Nelson
2013-10-01 16:10             ` Stefano Babic
2013-10-01 16:17               ` Eric Nelson
2013-10-01 19:50                 ` Benoît Thébaudeau
2013-10-01 20:01                   ` Otavio Salvador
2013-10-01 20:21                     ` Benoît Thébaudeau
2013-10-01 20:25                       ` Fabio Estevam
2013-10-01 21:29                   ` Eric Nelson [this message]
2013-10-02  6:06                   ` Stefano Babic
2013-10-01 16:23         ` Benoît Thébaudeau

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=524B3ED3.6010204@boundarydevices.com \
    --to=eric.nelson@boundarydevices.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