All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 3/3] xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)
Date: Fri, 8 Jan 2021 10:58:33 -0500	[thread overview]
Message-ID: <20210108155833.GI2292@bill-the-cat> (raw)
In-Reply-To: <20201226000902.23020-4-lukma@denx.de>

On Sat, Dec 26, 2020 at 01:09:02AM +0100, Lukasz Majewski wrote:

> On the XEA board (imx28) one needs in the SPL support for GPIO, MMC and
> SPI. Two last ones are necessary for booting the device. The GPIO support
> allows deciding which medium will be used. For example the GPIO DTS node
> (gpio at 0 at imx28.dtsi) has pinctrl parent (pinctrl at 80018000) for which we
> don't need driver asigned for correct operation.
> In the spl/dts/dt-platdata.c the gpio at 0 has index 4 and its parent -
> pinctrl at 80018000 has index 5.
> 
> In the bind_drivers_pass() function (at drivers/core/lists.c) call to
> device_bind_by_name() for `fsl_imx23_pinctrl` returns -2, which is
> expected.
> 
> With current setup - when the SPL_OF_PLATDATA_PARENT=y
> The gpio at 0 node with index 4 is skipped as its parent with 5 is not yet
> bound. It cannot be as we don't need and provide the driver for it.
> As a result the gpio at 0 is never bound and we end up with bricked board in
> the SPL stage.
> 
> When CONFIG_SPL_OF_PLATDATA_PARENT is NOT set, all entries from
> spl/dts/dt-platdata.c are scanned in ascending index order, so gpio at 0 is
> properly initialized. For `fsl_imx_pinctrl` we simply check 10 times if
> the driver for is available (which is not) and exit.
> 
> As a result the GPIOs are initialized and can be used in early SPL stage.
> This commit fixes XEA regression introduced with e41651fffda7da55f6.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> 

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210108/4cbfd48f/attachment.sig>

      parent reply	other threads:[~2021-01-08 15:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26  0:08 [PATCH v1 0/3] arm: xea: Regression fixes for i.MX28 based XEA board Lukasz Majewski
2020-12-26  0:09 ` [PATCH v1 1/3] xea: spl: Disable pull UP for GPIO0_2{35} Lukasz Majewski
2021-01-08 15:58   ` Tom Rini
2020-12-26  0:09 ` [PATCH v1 2/3] xea: config: Use CONFIG_PREBOOT from Kconfig Lukasz Majewski
2021-01-08 15:58   ` Tom Rini
2021-01-08 15:58   ` Tom Rini
2020-12-26  0:09 ` [PATCH v1 3/3] xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28) Lukasz Majewski
2020-12-29  3:32   ` Simon Glass
2021-01-08 15:58   ` Tom Rini [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=20210108155833.GI2292@bill-the-cat \
    --to=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.