Files
operating-system/buildroot-external/board/rpi2/patches/barebox/0003-Add-HassOS-bootchoiser-state.patch
Pascal Vizeli e5ac0b674b Fix symbole
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-04 09:29:04 +00:00

168 lines
3.3 KiB
Diff

From 3fe92c12e01e35cc97fbd92d8ae098ac583cfa1f Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Mon, 4 Jun 2018 09:25:40 +0000
Subject: [PATCH 3/3] Add HassOS bootchoiser state
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
arch/arm/dts/bcm2835-rpi.dts | 69 ++++++++++++++++++++++++++++++++++
arch/arm/dts/bcm2836-rpi-2.dts | 68 +++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
diff --git a/arch/arm/dts/bcm2835-rpi.dts b/arch/arm/dts/bcm2835-rpi.dts
index 22d60e961..3357d06b7 100644
--- a/arch/arm/dts/bcm2835-rpi.dts
+++ b/arch/arm/dts/bcm2835-rpi.dts
@@ -13,3 +13,72 @@
&sdhost {
status = "disabled";
};
+
+/ {
+
+ aliases {
+ state = &state;
+ };
+
+ state: state {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ magic = <0xef98423f>;
+ compatible = "barebox,state";
+ backend = <&backend_state>;
+ backend-type = "raw";
+ backend-stridesize = <4048>;
+
+ bootstate {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ system0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ remaining_attempts@0 {
+ reg = <0x0 0x4>;
+ type = "uint32";
+ default = <3>;
+ };
+ priority@4 {
+ reg = <0x4 0x4>;
+ type = "uint32";
+ default = <20>;
+ };
+ };
+ system1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ remaining_attempts@8 {
+ reg = <0x8 0x4>;
+ type = "uint32";
+ default = <0>;
+ };
+ priority@c {
+ reg = <0xc 0x4>;
+ type = "uint32";
+ default = <10>;
+ };
+ };
+ last_chosen@10 {
+ reg = <0x10 0x4>;
+ type = "uint32";
+ };
+ };
+ };
+};
+
+&sdhci {
+ partitions {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fixed-partitions";
+
+ backend_state: partition@22100000 {
+ label = "state";
+ reg = <0x22100000 0x800000>;
+ };
+ };
+};
+
diff --git a/arch/arm/dts/bcm2836-rpi-2.dts b/arch/arm/dts/bcm2836-rpi-2.dts
index bdee1296e..e41def570 100644
--- a/arch/arm/dts/bcm2836-rpi-2.dts
+++ b/arch/arm/dts/bcm2836-rpi-2.dts
@@ -14,3 +14,71 @@
status = "disabled";
};
+/ {
+
+ aliases {
+ state = &state;
+ };
+
+ state: state {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ magic = <0xef98423f>;
+ compatible = "barebox,state";
+ backend = <&backend_state>;
+ backend-type = "raw";
+ backend-stridesize = <4048>;
+
+ bootstate {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ system0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ remaining_attempts@0 {
+ reg = <0x0 0x4>;
+ type = "uint32";
+ default = <3>;
+ };
+ priority@4 {
+ reg = <0x4 0x4>;
+ type = "uint32";
+ default = <20>;
+ };
+ };
+ system1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ remaining_attempts@8 {
+ reg = <0x8 0x4>;
+ type = "uint32";
+ default = <0>;
+ };
+ priority@c {
+ reg = <0xc 0x4>;
+ type = "uint32";
+ default = <10>;
+ };
+ };
+ last_chosen@10 {
+ reg = <0x10 0x4>;
+ type = "uint32";
+ };
+ };
+ };
+};
+
+&sdhci {
+ partitions {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "fixed-partitions";
+
+ backend_state: partition@22100000 {
+ label = "state";
+ reg = <0x22100000 0x800000>;
+ };
+ };
+};
+
--
2.17.0