mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 03/15] ARM: dts: align all applicable memory nodes with spec and convention
Date: Thu, 18 Jun 2020 15:59:50 +0200	[thread overview]
Message-ID: <20200618135950.GM11869@pengutronix.de> (raw)
In-Reply-To: <20200618091102.30150-4-a.fatoum@pengutronix.de>

On Thu, Jun 18, 2020 at 11:10:50AM +0200, Ahmad Fatoum wrote:
> The spec[1] says that top level memory nodes `shall have device_type =
> "memory"'. Since 8226f7f9 ("of: base: parse all available memory nodes"),
> we parse only nodes with device_type = "memory", so we should add the
> device_type property where ever it's missing. When the nodes were first
> added, this wasn't an issue because the skeleton.dtsi defined a memory
> skeleton with correct device_type, but this was removed upstream and
> imported into barebox along with 1dc748b3 ("dts: update to v5.1-rc1").
> 
> Upstream device trees with a memory node were adapted to have
> device_type = "memory" in-line. This wasn't the case for nodes defined
> only within barebox. Rectify this now and rename the nodes to feature a
> unit name as well to be aligned with the upstream trend.
> 
> [1]: https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/dts/am335x-afi-gf.dts         | 2 +-
>  arch/arm/dts/am35xx-pfc-750_820x.dts   | 2 +-
>  arch/arm/dts/imx51-genesi-efika-sb.dts | 3 ++-
>  arch/arm/dts/imx6dl-eltec-hipercam.dts | 3 ++-
>  arch/arm/dts/imx6dl-mba6x.dts          | 3 ++-
>  arch/arm/dts/imx6q-guf-santaro.dts     | 3 ++-
>  arch/arm/dts/imx6q-mba6x.dts           | 3 ++-
>  arch/arm/dts/imx6q-var-som.dtsi        | 3 ++-
>  arch/arm/dts/imx6qdl-udoo.dtsi         | 3 ++-
>  arch/arm/dts/imx7d-phyboard-zeta.dts   | 4 ++--
>  arch/arm/dts/imx7d-phycore-som.dtsi    | 5 +++--
>  arch/arm/dts/imx7d-sdb.dts             | 2 +-
>  arch/arm/dts/module-mb7707.dts         | 3 ++-
>  arch/arm/dts/rk3288-phycore-som.dts    | 3 ++-
>  arch/arm/dts/virt2real.dts             | 2 +-
>  15 files changed, 27 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm/dts/am335x-afi-gf.dts b/arch/arm/dts/am335x-afi-gf.dts
> index 961fe2e241bc..cba8cbc8d6b7 100644
> --- a/arch/arm/dts/am335x-afi-gf.dts
> +++ b/arch/arm/dts/am335x-afi-gf.dts
> @@ -29,7 +29,7 @@
>  		};
>  	};
>  
> -	memory {
> +	memory@80000000 {
>  		device_type = "memory";
>  		reg = <0x80000000 0x10000000>; /* 128 MB */
>  	};

The am335x devices register their memory banks with values read back
from the memory controller in arch/arm/mach-omap/am33xx_scrm.c

> diff --git a/arch/arm/dts/imx51-genesi-efika-sb.dts b/arch/arm/dts/imx51-genesi-efika-sb.dts
> index 23e6ea416534..fb62fe2c7295 100644
> --- a/arch/arm/dts/imx51-genesi-efika-sb.dts
> +++ b/arch/arm/dts/imx51-genesi-efika-sb.dts
> @@ -35,7 +35,8 @@
>  		};
>  	};
>  
> -	memory {
> +	memory@90000000 {
> +		device_type = "memory";
>  		reg = <0x90000000 0x20000000>;
>  	};

The i.MX devices register their memory banks with values read back from
the memory controller in arch/arm/mach-imx/esdctl.c

For these boards it's probably better to remove the memory nodes
entirely.

Sascha

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-06-18 13:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  9:10 [PATCH 00/15] ARM: dts: fix regressions from not using phandles Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 01/15] ARM: i.MX50: fix renamed node reference Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 02/15] ARM: dts: fix now duplicate memory nodes Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 03/15] ARM: dts: align all applicable memory nodes with spec and convention Ahmad Fatoum
2020-06-18 13:59   ` Sascha Hauer [this message]
2020-06-18  9:10 ` [PATCH 04/15] ARM: vexpress: dts: fix barebox partitioning breakage Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 05/15] ARM: at91: dts: extend, don't create anew, pinctrl node Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 06/15] ARM: dts: reference nodes to extend by phandles instead Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 07/15] ARM: i.MX7: warp: drop duplicate memory node Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 08/15] ARM: mvebu: remove reference to non-existant node Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 09/15] ARM: i.MX6UL: dts: remove defunct override of pico-hobbit memory node Ahmad Fatoum
2020-06-18  9:15   ` Michael Grzeschik
2020-06-18  9:10 ` [PATCH 10/15] ARM: layerscape: dts: combine fsl-ls1046a-rdb.dts aliases nodes Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 11/15] ARM: i.MX7: dts: replace commented-out code with status = "disabled" Ahmad Fatoum
2020-06-18  9:10 ` [PATCH 12/15] ARM: i.MX: mx53-qsrb: dts: remove now-superfluous override Ahmad Fatoum
2020-06-18  9:11 ` [PATCH 13/15] ARM: zynqmp: dts: drop now superfluous zynqmp.dtsi Ahmad Fatoum
2020-06-18  9:11 ` [PATCH 14/15] ARM: socfpga: dts: remove unused nodes and phandles Ahmad Fatoum
2020-06-18  9:11 ` [PATCH 15/15] Documentation: devicetree: codify extension of upstream DTS by phandles Ahmad Fatoum

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=20200618135950.GM11869@pengutronix.de \
    --to=s.hauer@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