All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Peter Robinson <pbrobinson@gmail.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>,
	Tom Rini <trini@konsulko.com>,  Stefano Babic <sbabic@denx.de>,
	Simon Glass <sjg@chromium.org>, Breno Lima <breno.lima@nxp.com>,
	 Francesco Montefoschi <francesco.montefoschi@udoo.org>,
	U-Boot-Denx <u-boot@lists.denx.de>,
	 linux-fancy <linuxfancy@googlegroups.com>
Subject: Re: help on udoo_neo power up on mainline uboot
Date: Wed, 29 Dec 2021 18:51:27 -0300	[thread overview]
Message-ID: <CAOMZO5B0aWojuEEaKgA_jkZFPeyem24tv1vDrapW+K9iFriXhQ@mail.gmail.com> (raw)
In-Reply-To: <CALeDE9Na_WDdq1KpbxPaMWcJjp5+LLrhnuCG2upbsrStRPVxQw@mail.gmail.com>

Hi Peter,

On Wed, Dec 29, 2021 at 6:14 PM Peter Robinson <pbrobinson@gmail.com> wrote:

> I'll give that a go shortly, that was still on my todo list do debug,
> it was detecting it earlier in the boot for memory detection but
> failing with a -6 when doing board detection and working later but
> hadn't got to the bottom of it yet.

I think I understand the issue: since get_board_value() is called from
SPL and U-Boot
proper, we need to call gpio_free(), otherwise, the gpio_request()
will be called on GPIOs
that were already requested.

Does the patch below fix the problem?

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 62f81fff6817..075c4f208f23 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -333,6 +333,8 @@ static int get_board_value(void)
         * Extended           1        1
         */

+       gpio_free(IMX_GPIO_NR(4, 13));
+       gpio_free(IMX_GPIO_NR(4, 0));
        return (r184 << 1) + r185;
 }

Thanks

  reply	other threads:[~2021-12-29 21:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 16:52 help on udoo_neo power up on mainline uboot Tommaso Merciai
2021-12-28 19:17 ` Fabio Estevam
2021-12-28 21:49   ` Tommaso Merciai
2021-12-29 20:33   ` Tommaso Merciai
2021-12-29 20:51     ` Fabio Estevam
2021-12-29 21:06       ` Fabio Estevam
2021-12-29 21:14         ` Peter Robinson
2021-12-29 21:51           ` Fabio Estevam [this message]
2021-12-29 23:16             ` Peter Robinson
2021-12-29 23:21               ` Fabio Estevam
2021-12-29 22:08       ` Tommaso Merciai
2021-12-29 22:38         ` Fabio Estevam
2021-12-29 23:07           ` Fabio Estevam
2021-12-29 23:27             ` Tommaso Merciai
2021-12-30 14:08             ` Peter Robinson
2021-12-30 14:12               ` Fabio Estevam
2021-12-30 14:20                 ` Peter Robinson
2022-01-01 23:22                   ` Tommaso Merciai
2022-01-02  1:24                     ` Fabio Estevam
2022-01-02 17:14                       ` Tommaso Merciai
2022-01-02 17:36                         ` Fabio Estevam
2022-01-02 18:29                           ` Tommaso Merciai

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=CAOMZO5B0aWojuEEaKgA_jkZFPeyem24tv1vDrapW+K9iFriXhQ@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=breno.lima@nxp.com \
    --cc=francesco.montefoschi@udoo.org \
    --cc=linuxfancy@googlegroups.com \
    --cc=pbrobinson@gmail.com \
    --cc=sbabic@denx.de \
    --cc=sjg@chromium.org \
    --cc=tomm.merciai@gmail.com \
    --cc=trini@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.