public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: "qinjian[覃健]" <qinjian@cqplus1.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Marc Zyngier" <maz@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Russell King - ARM Linux" <linux@armlinux.org.uk>,
	"Mark Brown" <broonie@kernel.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	DTML <devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"Wells Lu 呂芳騰" <wells.lu@sunplus.com>
Subject: RE: [PATCH v5 09/10] ARM: sunplus: Add initial support for Sunplus SP7021 SoC
Date: Thu, 9 Dec 2021 08:49:55 +0000	[thread overview]
Message-ID: <6a8271f5c6b74ce7874b7583b8d7eee4@cqplus1.com> (raw)
In-Reply-To: <CAK8P3a1-4XnrkWc_0SPns9xj9Yp4xWhEahLOkeafXmAYWfbYJA@mail.gmail.com>

> On Tue, Dec 7, 2021 at 8:21 AM qinjian[覃健] <qinjian@cqplus1.com> wrote:
> > > > @@ -152,6 +152,7 @@ textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
> > > >  textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
> > > >  textofs-$(CONFIG_ARCH_MESON) := 0x00208000
> > > >  textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
> > > > +textofs-$(CONFIG_ARCH_SUNPLUS) := 0x00308000
> > >
> > > What is this needed for? If it boots without this line, better avoid
> > > adding it, because
> > > it will increase the kernel size for everyone else (unless they also enable
> > > AXXIA).
> > >
> >
> > SP7021 reserved the 1st 1MB memory for ARM926@P-Chip using,
> > The 2nd 1MB memory for IOP device and the 3rd 1MB memory for bootloader.
> > I'll add these comments at next commit.
> 
> I think you can just remove the memory from the system memory map in the
> device tree and pretend it only starts after the bootloader. It's been a while
> since I looked at this though, so I could be misremembering what the minimum
> boundaries are for doing this.
> 
>         Arnd

I have test following 3 methods:

1. current patch
DT:
	memory {
		reg = <0x00000000 0x20000000>; /* 512MB */
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		iop_reserve: iop_device {
			no-map;
			reg = <0x00100000 0x00100000>; 
		};
		a926_reserve: a926_memory {
			no-map;
			reg = <0x00000000 0x00100000>;
		};
	};
arch/arm/Makefile:
	textofs-$(CONFIG_ARCH_SUNPLUS) := 0x00308000

bootlog & meminfo :
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x00000000001fffff]
[    0.000000]   node   0: [mem 0x0000000000200000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]

~ # cat /proc/meminfo
MemTotal:         514008 kB
MemFree:          491960 kB
MemAvailable:     488608 kB



2. DT same as case 1, but no modify @ arch/arm/Makefile

bootlog & meminfo :
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'iop_device': base 0x00100000, size 1 MiB
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'a926_memory': base 0x00000000, size 1 MiB
...
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]

~ # cat /proc/meminfo
MemTotal:         516056 kB
MemFree:          493928 kB
MemAvailable:     490572 kB



3. DT:
	memory {
		reg = <0x00300000 0x1FD00000>; /* 512 - 3 MB */
	};
no modify @ arch/arm/Makefile

bootlog & meminfo :
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000400000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000400000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000400000-0x000000001fffffff]

~ # cat /proc/meminfo
MemTotal:         511964 kB
MemFree:          489636 kB
MemAvailable:     486292 kB



I think method 1 should be correct (compare method 2) & better (compare method 3).


  reply	other threads:[~2021-12-09  8:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  7:34 [PATCH v5 00/10] Add Sunplus SP7021 SoC Support Qin Jian
2021-12-03  7:34 ` [PATCH v5 01/10] dt-bindings: vendor-prefixes: Add Sunplus Qin Jian
2021-12-03  7:34 ` [PATCH v5 02/10] dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards Qin Jian
2021-12-03  7:34 ` [PATCH v5 03/10] dt-bindings: reset: Add bindings for SP7021 reset driver Qin Jian
2021-12-03  7:34 ` [PATCH v5 04/10] reset: Add Sunplus " Qin Jian
2021-12-07  8:35   ` Philipp Zabel
2021-12-03  7:34 ` [PATCH v5 05/10] dt-bindings: clock: Add bindings for SP7021 clock driver Qin Jian
2021-12-16  6:43   ` Stephen Boyd
2021-12-03  7:34 ` [PATCH v5 06/10] clk: Add Sunplus " Qin Jian
2021-12-16  6:42   ` Stephen Boyd
2021-12-03  7:34 ` [PATCH v5 07/10] dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller Qin Jian
2021-12-03  7:34 ` [PATCH v5 08/10] irqchip: Add Sunplus SP7021 interrupt controller driver Qin Jian
2021-12-07  9:02   ` Marc Zyngier
2021-12-08  7:15     ` qinjian[覃健]
2021-12-08  7:45       ` Marc Zyngier
2021-12-08  9:28         ` qinjian[覃健]
2021-12-08 16:02           ` Marc Zyngier
2021-12-03  7:34 ` [PATCH v5 09/10] ARM: sunplus: Add initial support for Sunplus SP7021 SoC Qin Jian
2021-12-03 12:59   ` Arnd Bergmann
2021-12-07  7:21     ` qinjian[覃健]
2021-12-07  9:11       ` Arnd Bergmann
2021-12-09  8:49         ` qinjian[覃健] [this message]
2021-12-09  9:58           ` Arnd Bergmann
2021-12-09 10:12             ` Ard Biesheuvel
2021-12-03  7:34 ` [PATCH v5 10/10] ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig Qin Jian
2021-12-03 12:49   ` Arnd Bergmann

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=6a8271f5c6b74ce7874b7583b8d7eee4@cqplus1.com \
    --to=qinjian@cqplus1.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maz@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wells.lu@sunplus.com \
    /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