From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 05/12] ARM: versatile: Use flash from device tree
Date: Tue, 2 May 2023 11:14:12 +0200 [thread overview]
Message-ID: <20230502091419.2551228-6-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230502091419.2551228-1-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
.../boards/versatile/env/init/mtdparts-nor | 6 -----
arch/arm/boards/versatile/versatilepb.c | 4 ---
arch/arm/dts/versatile-pb.dts | 26 +++++++++++++++++++
3 files changed, 26 insertions(+), 10 deletions(-)
delete mode 100644 arch/arm/boards/versatile/env/init/mtdparts-nor
diff --git a/arch/arm/boards/versatile/env/init/mtdparts-nor b/arch/arm/boards/versatile/env/init/mtdparts-nor
deleted file mode 100644
index 20c2b994cc..0000000000
--- a/arch/arm/boards/versatile/env/init/mtdparts-nor
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-mtdparts="512k(nor0.barebox)ro,512k(nor0.bareboxenv),4864k(nor0.kernel),256k(nor0.dtb),3M(nor0.update),-(nor0.root)"
-kernelname="physmap-flash.0"
-
-mtdparts-add -d nor0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c
index c5ce46e525..0ea397d3cb 100644
--- a/arch/arm/boards/versatile/versatilepb.c
+++ b/arch/arm/boards/versatile/versatilepb.c
@@ -45,10 +45,6 @@ static struct smc91c111_pdata net_pdata = {
static int vpb_devices_init(void)
{
- add_cfi_flash_device(DEVICE_ID_DYNAMIC, VERSATILE_FLASH_BASE, VERSATILE_FLASH_SIZE, 0);
- devfs_add_partition("nor0", 0x00000, SZ_512K, DEVFS_PARTITION_FIXED, "self");
- devfs_add_partition("nor0", SZ_512K, SZ_512K, DEVFS_PARTITION_FIXED, "env0");
-
add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, VERSATILE_ETH_BASE,
64 * 1024, IORESOURCE_MEM, &net_pdata);
diff --git a/arch/arm/dts/versatile-pb.dts b/arch/arm/dts/versatile-pb.dts
index d374f54291..31af9d5e73 100644
--- a/arch/arm/dts/versatile-pb.dts
+++ b/arch/arm/dts/versatile-pb.dts
@@ -3,8 +3,34 @@
/ {
model = "ARM Versatile PB";
compatible = "arm,versatile-pb";
+
+ chosen {
+ environment-nor {
+ compatible = "barebox,environment";
+ device-path = &env_nor;
+ };
+ };
};
&{/memory} {
reg = <0x0 0x04000000>;
};
+
+&{/flash@34000000} {
+ partitions {
+ compatible = "fixed-partitions";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0x400000>;
+ };
+
+ env_nor: partition@400000 {
+ label = "bareboxenv";
+ reg = <0x400000 0x400000>;
+ };
+ };
+};
--
2.39.2
next prev parent reply other threads:[~2023-05-02 9:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 9:14 [PATCH 00/12] ARM Versatile updates Sascha Hauer
2023-05-02 9:14 ` [PATCH 01/12] ARM: versatile: Enable CONFIG_RELOCATABLE Sascha Hauer
2023-05-02 9:14 ` [PATCH 02/12] ARM: versatile: Use common clk framework Sascha Hauer
2023-05-02 9:14 ` [PATCH 03/12] ARM: versatile: drop platform code to register UART Sascha Hauer
2023-05-02 9:14 ` [PATCH 04/12] ARM: versatile: drop platform code to register GPIOs Sascha Hauer
2023-05-02 9:14 ` Sascha Hauer [this message]
2023-05-02 9:14 ` [PATCH 06/12] ARM: versatile: Use smc91c111 from device tree Sascha Hauer
2023-05-02 9:17 ` Ahmad Fatoum
2023-05-02 11:41 ` Sascha Hauer
2023-05-02 9:14 ` [PATCH 07/12] ARM: versatile: make sure to run initcalls on versatile only Sascha Hauer
2023-05-02 9:14 ` [PATCH 08/12] ARM: versatile: simplify ARM1176 support Sascha Hauer
2023-05-02 9:14 ` [PATCH 09/12] ARM: versatile: move over to multi image support Sascha Hauer
2023-05-02 9:14 ` [PATCH 10/12] ARM: versatile: move over to multi arch support Sascha Hauer
2023-05-02 9:14 ` [PATCH 11/12] ARM: versatile: Use existing clocksource driver Sascha Hauer
2023-05-02 9:14 ` [PATCH 12/12] ARM: Merge imx_defconfig and versatilepb_defconfig into multi_v5_v6_defconfig 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=20230502091419.2551228-6-s.hauer@pengutronix.de \
--to=s.hauer@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