From: Roland Hieber <rhi@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [RFT][PATCH 2/3] ARM: i.MX: TQMa6x: migrate flash partitions to device tree
Date: Thu, 11 May 2023 10:58:02 +0200 [thread overview]
Message-ID: <20230511085803.335993-3-rhi@pengutronix.de> (raw)
In-Reply-To: <20230511085803.335993-1-rhi@pengutronix.de>
This way the partitions are easier to adapt, and the board code becomes
more generic.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
arch/arm/boards/tqma6x/board.c | 2 --
arch/arm/dts/imx6dl-mba6x.dts | 13 +++++++++++++
arch/arm/dts/imx6q-mba6x.dts | 13 +++++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/tqma6x/board.c b/arch/arm/boards/tqma6x/board.c
index 5f59a259e620..ae339887568a 100644
--- a/arch/arm/boards/tqma6x/board.c
+++ b/arch/arm/boards/tqma6x/board.c
@@ -84,8 +84,6 @@ static int tqma6x_env_init(void)
if (!of_machine_is_compatible("tq,mba6x"))
return 0;
- devfs_add_partition("m25p0", 0, SZ_512K, DEVFS_PARTITION_FIXED, "m25p0.barebox");
-
imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
BBU_HANDLER_FLAG_DEFAULT);
imx6_bbu_internal_mmcboot_register_handler("emmc", "mmc2", 0);
diff --git a/arch/arm/dts/imx6dl-mba6x.dts b/arch/arm/dts/imx6dl-mba6x.dts
index dddc3d384ccc..612acba3239b 100644
--- a/arch/arm/dts/imx6dl-mba6x.dts
+++ b/arch/arm/dts/imx6dl-mba6x.dts
@@ -27,6 +27,19 @@
};
};
+&flash {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0x80000>;
+ };
+ };
+};
+
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
diff --git a/arch/arm/dts/imx6q-mba6x.dts b/arch/arm/dts/imx6q-mba6x.dts
index 64635b958213..5154580fae73 100644
--- a/arch/arm/dts/imx6q-mba6x.dts
+++ b/arch/arm/dts/imx6q-mba6x.dts
@@ -27,6 +27,19 @@
};
};
+&flash {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0x80000>;
+ };
+ };
+};
+
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
--
2.39.2
next prev parent reply other threads:[~2023-05-11 8:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 8:58 [RFT][PATCH 0/3] TQMa6x cleanup Roland Hieber
2023-05-11 8:58 ` [RFT][PATCH 1/3] ARM: i.MX6: tqma6x: make use of ENTRY_FUNCTION_WITHSTACK Roland Hieber
2023-05-11 8:58 ` Roland Hieber [this message]
2023-05-11 8:58 ` [RFT][PATCH 3/3] ARM: i.MX6: TQMa6x: make tqma6x_env_init reusable Roland Hieber
2023-05-12 11:27 ` [RFT][PATCH 0/3] TQMa6x cleanup 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=20230511085803.335993-3-rhi@pengutronix.de \
--to=rhi@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