From: Richard Genoud <richard.genoud@gmail.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Peter Rosin <peda@axentia.se>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: sam9x5: MTD numbering changed
Date: Thu, 02 Nov 2017 12:17:16 +0100 [thread overview]
Message-ID: <1509621436.16695.3.camel@gmail.com> (raw)
Hi,
I've got an at91sam9g35-cm based board, with 4 partition on the spi-
dataflas and 5 partitions on the NAND flash.
Before commit 1004a2977bdc ("ARM: dts: at91: Switch to the new NAND bindings"),
the NAND partitions were mtd0-4 and spi-dataflash partitions mtd5-8.
Since commit 1004a2977bdc ("ARM: dts: at91: Switch to the new NAND bindings"),
the spi-dataflash partitions are discovered before the NAND partitions.
So NAND partition became mtd4-8 and spi-dataflash partition mtd0-3.
This broke some script that relied on the mtd numbering.
Updating those scripts to rely on the mtd device name instead of
number is not really a problem. The real problem is when an older
script using mtd numbering is run on the new system : I expect dead
kittens everywhere !
So, I'd like to know if there's a way to force the older numbering ?
(I tried poking around the DTS without succès).
any idea ?
regards,
Richard.
PS:
DTS looks like that:
/dts-v1/;
#include "at91sam9g35.dtsi"
#include "at91sam9x5cm.dtsi"
/ {
ahb {
apb {
spi0: spi@f0000000 {
pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_cs>;
status = "okay";
cs-gpios = <&pioA 14 GPIO_ACTIVE_HIGH>, <0>, <0>, <0>;
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "atmel,at25df321a";
spi-max-frequency = <50000000>;
m25p,fast-read;
reg = <0>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
bootpri@0000000 {
label = "bootpri";
reg = <0x00000000 0x00008000>;
};
bootsec@0008000 {
label = "bootsec";
reg = <0x00008000 0x00100000>;
};
bootenv@00108000 {
label = "bootenv";
reg = <0x00108000 0x00110000>;
};
free@00110000 {
label = "free";
reg = <0x00110000 0x002f0000>;
};
};
};
};
};
ebi: ebi@10000000 {
nand_controller: nand-controller {
nand@3 {
status = "okay";
nand-ecc-strength = <4>;
};
};
};
};
};
WARNING: multiple messages have this Message-ID (diff)
From: Richard Genoud <richard.genoud-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Peter Rosin <peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
Cc: linux-mtd
<linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: sam9x5: MTD numbering changed
Date: Thu, 02 Nov 2017 12:17:16 +0100 [thread overview]
Message-ID: <1509621436.16695.3.camel@gmail.com> (raw)
Hi,
I've got an at91sam9g35-cm based board, with 4 partition on the spi-
dataflas and 5 partitions on the NAND flash.
Before commit 1004a2977bdc ("ARM: dts: at91: Switch to the new NAND bindings"),
the NAND partitions were mtd0-4 and spi-dataflash partitions mtd5-8.
Since commit 1004a2977bdc ("ARM: dts: at91: Switch to the new NAND bindings"),
the spi-dataflash partitions are discovered before the NAND partitions.
So NAND partition became mtd4-8 and spi-dataflash partition mtd0-3.
This broke some script that relied on the mtd numbering.
Updating those scripts to rely on the mtd device name instead of
number is not really a problem. The real problem is when an older
script using mtd numbering is run on the new system : I expect dead
kittens everywhere !
So, I'd like to know if there's a way to force the older numbering ?
(I tried poking around the DTS without succès).
any idea ?
regards,
Richard.
PS:
DTS looks like that:
/dts-v1/;
#include "at91sam9g35.dtsi"
#include "at91sam9x5cm.dtsi"
/ {
ahb {
apb {
spi0: spi@f0000000 {
pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_cs>;
status = "okay";
cs-gpios = <&pioA 14 GPIO_ACTIVE_HIGH>, <0>, <0>, <0>;
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "atmel,at25df321a";
spi-max-frequency = <50000000>;
m25p,fast-read;
reg = <0>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
bootpri@0000000 {
label = "bootpri";
reg = <0x00000000 0x00008000>;
};
bootsec@0008000 {
label = "bootsec";
reg = <0x00008000 0x00100000>;
};
bootenv@00108000 {
label = "bootenv";
reg = <0x00108000 0x00110000>;
};
free@00110000 {
label = "free";
reg = <0x00110000 0x002f0000>;
};
};
};
};
};
ebi: ebi@10000000 {
nand_controller: nand-controller {
nand@3 {
status = "okay";
nand-ecc-strength = <4>;
};
};
};
};
};
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-11-02 11:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 11:17 Richard Genoud [this message]
2017-11-02 11:17 ` sam9x5: MTD numbering changed Richard Genoud
2017-11-02 12:39 ` Boris Brezillon
2017-11-02 14:13 ` Richard Genoud
2017-11-02 14:13 ` Richard Genoud
2017-11-02 14:36 ` Boris Brezillon
2017-11-02 14:36 ` Boris Brezillon
2017-11-02 15:09 ` Boris Brezillon
2017-11-02 15:09 ` Boris Brezillon
2017-11-02 15:28 ` Richard Genoud
2017-11-02 15:28 ` Richard Genoud
2017-11-02 15:45 ` Boris Brezillon
2017-11-02 15:45 ` Boris Brezillon
2017-11-02 17:36 ` Richard Genoud
2017-11-02 17:36 ` Richard Genoud
2017-11-02 17:58 ` Boris Brezillon
2017-11-02 17:58 ` Boris Brezillon
2017-11-02 23:12 ` Cyrille Pitchen
2017-11-02 23:12 ` Cyrille Pitchen
2017-11-03 8:06 ` Boris Brezillon
2017-11-03 8:06 ` Boris Brezillon
2017-11-03 9:15 ` Richard Genoud
2017-11-03 9:15 ` Richard Genoud
2017-11-03 7:45 ` Richard Genoud
2017-11-03 7:45 ` Richard Genoud
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=1509621436.16695.3.camel@gmail.com \
--to=richard.genoud@gmail.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=peda@axentia.se \
/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.