From: Marco Felsch <m.felsch@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: i.MX8MP: remove memory node
Date: Mon, 13 Mar 2023 17:08:28 +0100 [thread overview]
Message-ID: <20230313160828.clbmimzfhnsyuy5t@pengutronix.de> (raw)
In-Reply-To: <90842333-c3dc-898f-b88a-2853856c1290@pengutronix.de>
On 23-03-13, Ahmad Fatoum wrote:
> On 13.03.23 14:58, Ahmad Fatoum wrote:
> > On 13.03.23 14:49, Marco Felsch wrote:
> >> On 23-03-13, Ahmad Fatoum wrote:
> >>> On 12.03.23 17:29, Marco Felsch wrote:
> >>>> since commit f083fffe52 ("ARM: dts: i.MX8MP: add DDRC compatibles") we
> >>>> make use of the esdctl driver. This cause the below error since barebox
> >>>> try to add the memory twice.
> >>>>
> >>>> | imx-esdctl 3d400000.memory-controller@3d400000.of: probe failed: Device or resource busy
> >>>> | initcall imx_esdctl_driver_init+0x0/0x2c failed: No such device
> >>>
> >>> Starting with commit 0a78ac84e9fe ("memory: fuse overlapping memory banks"),
> >>> this should not be leading to errors. Can you increase debugging in
> >>> common/resource.c and see why you run into this error?
> >>
> >> I did this and saw that memory bank ram0 is added added twice:
> >> - first by generic of
> >> - 2nd by esdctl
> >
> > See the first loop in barebox_add_memory_bank(). If you add
> > two overlapping IORESOURCE_MEM banks, the function will not
>
> s/overlapping/region fully within the other region/
Thanks for the hint, I checked this and now see the issue:
- 1st) of_add_memory_bank() add two banks for the 6G option:
- ram0: 0x40000000 0xc0000000
- ram1: 0x100000000 0xc0000000
- 2nd) the esdctl dirver try to add only one bank for the 6G:
- ram0: 0x40000000 0x180000000
The overlap mechanism is triggered and we enter the
barebox_grow_memory_bank() but since we already requested ram1 we can't
grow ram0. So the tqm8 board isn't effected and a 'lacy' approach is to
remvoe the memory node as suggested by Lucas.
Regards,
Marco
>
> > return an error. I think there might be a problem if you run
> > into an error.
> >
> >>
> >> Regards,
> >> Marco
> >>
> >>
> >>>
> >>>
> >>>>
> >>>> Remove the memory node to fix this.
> >>>>
> >>>> This behaviour was seen on a i.mx8mp-evk but the
> >>>> imx8mp-tqma8mpql-mba8mpxl also has a memory node and includes the
> >>>> barebox.dtsi.
> >>>>
> >>>> Fixes: f083fffe52 ("ARM: dts: i.MX8MP: add DDRC compatibles")
> >>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >>>> ---
> >>>> arch/arm/dts/imx8mp-evk.dts | 2 ++
> >>>> arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts | 2 ++
> >>>> 2 files changed, 4 insertions(+)
> >>>>
> >>>> diff --git a/arch/arm/dts/imx8mp-evk.dts b/arch/arm/dts/imx8mp-evk.dts
> >>>> index 0acc3731d5..c7e1f35d2d 100644
> >>>> --- a/arch/arm/dts/imx8mp-evk.dts
> >>>> +++ b/arch/arm/dts/imx8mp-evk.dts
> >>>> @@ -30,6 +30,8 @@
> >>>> };
> >>>> };
> >>>>
> >>>> +/delete-node/ &{/memory@40000000};
> >>>> +
> >>>> ðphy1 {
> >>>> reset-assert-us = <15000>;
> >>>> reset-deassert-us = <100000>;
> >>>> diff --git a/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> >>>> index 6e81f58e27..bf23e40489 100644
> >>>> --- a/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> >>>> +++ b/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> >>>> @@ -24,6 +24,8 @@
> >>>> };
> >>>> };
> >>>>
> >>>> +/delete-node/ &{/memory@40000000};
> >>>> +
> >>>> &usdhc2 {
> >>>> #address-cells = <1>;
> >>>> #size-cells = <1>;
> >>>
> >>> --
> >>> Pengutronix e.K. | |
> >>> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> >>> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> >>> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> >>>
> >>>
> >>
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
next prev parent reply other threads:[~2023-03-13 16:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 16:29 Marco Felsch
2023-03-13 13:03 ` Lucas Stach
2023-03-13 13:46 ` Marco Felsch
2023-03-13 13:16 ` Ahmad Fatoum
2023-03-13 13:49 ` Marco Felsch
2023-03-13 13:58 ` Ahmad Fatoum
2023-03-13 14:02 ` Ahmad Fatoum
2023-03-13 16:08 ` Marco Felsch [this message]
2023-03-14 14:08 ` Sascha Hauer
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=20230313160828.clbmimzfhnsyuy5t@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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