Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
	Jason Cooper <jason@lakedaemon.net>,
	devicetree@vger.kernel.org,
	Gregory Clement <gregory.clement@bootlin.com>,
	Alexander Syring <alex@asyring.de>,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
Date: Mon, 11 Feb 2019 17:31:55 +0000
Message-ID: <20190211173155.azppt37uvsd6rn2w@shell.armlinux.org.uk> (raw)
In-Reply-To: <3040714f-471c-6773-57dd-455e7d1f195c@arm.com>

On Mon, Feb 11, 2019 at 05:27:37PM +0000, Marc Zyngier wrote:
> On 11/02/2019 17:14, Alexander Syring wrote:
> > According to U-Boot dts file enabling the SPI-NOR flash for use in
> > Linux
> > 
> > Signed-off-by: Alexander Syring <alex@asyring.de>
> > ---
> >  .../boot/dts/marvell/armada-8040-mcbin.dtsi   | 23 +++++++++++++++----
> >  1 file changed, 18 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > index 329f8ceeebea..83994ff46e2d 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > @@ -333,11 +333,24 @@
> >  	status = "okay";
> >  
> >  	spi-flash@0 {
> > -		compatible = "st,w25q32";
> > -		spi-max-frequency = <50000000>;
> > -		reg = <0>;
> > -	};
> > -};
> > +		compatible = "st,w25q32", "jedec,spi-nor";
> > +		reg = <0>;
> > +		spi-max-frequency = <50000000>;
> > +
> > +		partitions {
> > +			compatible = "fixed-partitions";
> > +
> > +			partition@0 {
> > +				label = "U-Boot";
> > +				reg = <0 0x200000>;
> > +			};
> > +			partition@400000 {
> > +				label = "U-Boot Env";
> > +				reg = <0x200000 0xce0000>;
> > +			};
> > +		};
> > +	};
> > +};
> >  
> >  &cp1_usb3_0 {
> >  	/* CPS Lane 2 - CON7 */
> > 
> 
> Really?
> 
> My mcbin SPI flash doesn't have this partitioning, and doesn't have
> u-boot at all. This should be provided by the bootloader itself, and not
> baked into the reference DT.

Exactly.

Simple solution for the above.  Instead of the above, create
/etc/fw_env.config with:

/dev/mtdblock0 0x200000 0x10000

Then its possible to read and write the u-boot environment using
fw_printenv and fw_setenv.  No partitions are required, and IMHO
are pointless for such a scenario.

That will allow those of us with a different SPI flash layout and
already have this in /etc/fw_env.config:

/dev/mtdblock0 0x3f0000 0x10000

to not experience any breakage.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 17:14 Alexander Syring
2019-02-11 17:19 ` Russell King - ARM Linux admin
2019-02-11 17:27 ` Marc Zyngier
2019-02-11 17:31   ` Russell King - ARM Linux admin [this message]

Reply instructions:

You may reply publically 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=20190211173155.azppt37uvsd6rn2w@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alex@asyring.de \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox