summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-10-01 12:22:08 -0600
committerSimon Glass <sjg@chromium.org>2018-10-09 04:40:27 -0600
commite6c5c94a79d9e1dd20f869a3169bf2be00d53d14 (patch)
tree658f9ce8514a3217360cc91bff053359e3583964 /arch
parentcdb6aa0afb52da34306c4339f2f4d6cbd3b0ad02 (diff)
downloadu-boot-e6c5c94a79d9e1dd20f869a3169bf2be00d53d14.tar.gz
u-boot-e6c5c94a79d9e1dd20f869a3169bf2be00d53d14.tar.bz2
u-boot-e6c5c94a79d9e1dd20f869a3169bf2be00d53d14.zip
dm: core: Update ofnode to read binman-style flash entry
At present ofnode_read_fmap_entry() reads a flash map entry in a format which is not supported by binman. To allow use to use binman-format descriptions, update this function. Also add a simple test. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/dts/sandbox.dts20
-rw-r--r--arch/sandbox/dts/sandbox64.dts20
-rw-r--r--arch/sandbox/dts/test.dts29
3 files changed, 49 insertions, 20 deletions
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 48db7818d7..fb866e8807 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -18,7 +18,7 @@
stdout-path = "/serial";
};
- cros_ec: cros-ec@0 {
+ cros_ec: cros-ec {
reg = <0 0>;
compatible = "google,cros-ec-sandbox";
@@ -26,23 +26,23 @@
* This describes the flash memory within the EC. Note
* that the STM32L flash erases to 0, not 0xff.
*/
- #address-cells = <1>;
- #size-cells = <1>;
- flash@8000000 {
- reg = <0x08000000 0x20000>;
+ flash {
+ image-pos = <0x08000000>;
+ size = <0x20000>;
erase-value = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
/* Information for sandbox */
ro {
- reg = <0 0xf000>;
+ image-pos = <0>;
+ size = <0xf000>;
};
wp-ro {
- reg = <0xf000 0x1000>;
+ image-pos = <0xf000>;
+ size = <0x1000>;
};
rw {
- reg = <0x10000 0x10000>;
+ image-pos = <0x10000>;
+ size = <0x10000>;
};
};
};
diff --git a/arch/sandbox/dts/sandbox64.dts b/arch/sandbox/dts/sandbox64.dts
index 0e32fdad9d..2c6d351381 100644
--- a/arch/sandbox/dts/sandbox64.dts
+++ b/arch/sandbox/dts/sandbox64.dts
@@ -17,7 +17,7 @@
stdout-path = "/serial";
};
- cros_ec: cros-ec@0 {
+ cros_ec: cros-ec {
reg = <0 0 0 0>;
compatible = "google,cros-ec-sandbox";
@@ -25,23 +25,23 @@
* This describes the flash memory within the EC. Note
* that the STM32L flash erases to 0, not 0xff.
*/
- #address-cells = <1>;
- #size-cells = <1>;
- flash@8000000 {
- reg = <0x08000000 0x20000>;
+ flash {
+ image-pos = <0x08000000>;
+ size = <0x20000>;
erase-value = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
/* Information for sandbox */
ro {
- reg = <0 0xf000>;
+ image-pos = <0>;
+ size = <0xf000>;
};
wp-ro {
- reg = <0xf000 0x1000>;
+ image-pos = <0xf000>;
+ size = <0x1000>;
};
rw {
- reg = <0x10000 0x10000>;
+ image-pos = <0x10000>;
+ size = <0x10000>;
};
};
};
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index ad94901fa1..05bccd7694 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -40,6 +40,35 @@
osd0 = "/osd";
};
+ cros_ec: cros-ec {
+ reg = <0 0>;
+ compatible = "google,cros-ec-sandbox";
+
+ /*
+ * This describes the flash memory within the EC. Note
+ * that the STM32L flash erases to 0, not 0xff.
+ */
+ flash {
+ image-pos = <0x08000000>;
+ size = <0x20000>;
+ erase-value = <0>;
+
+ /* Information for sandbox */
+ ro {
+ image-pos = <0>;
+ size = <0xf000>;
+ };
+ wp-ro {
+ image-pos = <0xf000>;
+ size = <0x1000>;
+ };
+ rw {
+ image-pos = <0x10000>;
+ size = <0x10000>;
+ };
+ };
+ };
+
a-test {
reg = <0 1>;
compatible = "denx,u-boot-fdt-test";