From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition
Date: Fri, 31 May 2019 11:47:28 +0200 [thread overview]
Message-ID: <20190531094730.8265-1-l.stach@pengutronix.de> (raw)
While barebox itself should be on the eMMC boot partitions eventually
it's nice to have this set up, so one can dd a prebuilt SD card image
to the eMMC and have something working. A working Barebox env is also
very convinient to have around during development.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/zii-imx8mq-dev/board.c | 6 +++++
arch/arm/dts/imx8mq-zii-ultra.dtsi | 37 ++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c
index 94e71f58ceb7..4dbe23f58ce2 100644
--- a/arch/arm/boards/zii-imx8mq-dev/board.c
+++ b/arch/arm/boards/zii-imx8mq-dev/board.c
@@ -4,6 +4,7 @@
* Author: Andrey Smirnov <andrew.smirnov@gmail.com>
*/
+#include <bootsource.h>
#include <common.h>
#include <init.h>
#include <asm/memory.h>
@@ -19,6 +20,11 @@ static int zii_imx8mq_dev_init(void)
imx8mq_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc0", 0);
+ if (bootsource_get_instance() == 0)
+ of_device_enable_path("/chosen/environment-emmc");
+ else
+ of_device_enable_path("/chosen/environment-sd");
+
return 0;
}
device_initcall(zii_imx8mq_dev_init);
diff --git a/arch/arm/dts/imx8mq-zii-ultra.dtsi b/arch/arm/dts/imx8mq-zii-ultra.dtsi
index ccf80d3de838..53679b0d3c40 100644
--- a/arch/arm/dts/imx8mq-zii-ultra.dtsi
+++ b/arch/arm/dts/imx8mq-zii-ultra.dtsi
@@ -10,6 +10,17 @@
/ {
chosen {
stdout-path = &uart1;
+
+ environment-emmc {
+ compatible = "barebox,environment";
+ device-path = &usdhc1, "partname:barebox-environment";
+ status = "disabled";
+ };
+ environment-sd {
+ compatible = "barebox,environment";
+ device-path = &usdhc2, "partname:barebox-environment";
+ status = "disabled";
+ };
};
mdio0: bitbang-mdio {
@@ -348,6 +359,19 @@
no-sd;
no-sdio;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
};
&usdhc2 {
@@ -358,6 +382,19 @@
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
vmmc-supply = <®_usdhc2_vmmc>;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "barebox";
+ reg = <0x0 0xe0000>;
+ };
+
+ partition@e0000 {
+ label = "barebox-environment";
+ reg = <0xe0000 0x20000>;
+ };
};
&iomuxc {
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-05-31 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 9:47 Lucas Stach [this message]
2019-05-31 9:47 ` [PATCH 2/3] ARM: zii-imx8mq-dev: add defaultenv with simple boot configuration Lucas Stach
2019-05-31 9:47 ` [PATCH 3/3] ARM: rdu3: disable i210 network interface Lucas Stach
2019-05-31 15:08 ` Vivien Didelot
2019-06-04 7:55 ` [PATCH 1/3] ARM: zii-imx8mq-dev: add barebox and environment partition 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=20190531094730.8265-1-l.stach@pengutronix.de \
--to=l.stach@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