[PATCH v2 16/24] ARM: i.MX: zii-vf610-dev-rev-b/c: Add support for BBU on SPI-NOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 arch/arm/boards/zii-vf610-dev/board.c | 19 +++++++++++++++++++
 arch/arm/dts/vf610-zii-dev-rev-b.dts  | 11 +++++++++++
 2 files changed, 30 insertions(+)

diff --git a/arch/arm/boards/zii-vf610-dev/board.c b/arch/arm/boards/zii-vf610-dev/board.c
index d88b26164..818044ce6 100644
--- a/arch/arm/boards/zii-vf610-dev/board.c
+++ b/arch/arm/boards/zii-vf610-dev/board.c
@@ -149,6 +149,25 @@ static int zii_vf610_dev_set_hostname(void)
 }
 late_initcall(zii_vf610_dev_set_hostname);
 
+static int zii_vf610_dev_register_bbu(void)
+{
+	int ret;
+	if (!of_machine_is_compatible("zii,vf610dev-c") &&
+	    !of_machine_is_compatible("zii,vf610dev-b"))
+		return 0;
+
+	ret = vf610_bbu_internal_spi_i2c_register_handler("SPI",
+							  "/dev/m25p0.bootloader",
+							  0);
+	if (ret) {
+		pr_err("Failed to register SPI BBU handler");
+		return ret;
+	}
+
+	return 0;
+}
+late_initcall(zii_vf610_dev_register_bbu);
+
 static int zii_vf610_spu3_register_bbu(void)
 {
 	int ret;
diff --git a/arch/arm/dts/vf610-zii-dev-rev-b.dts b/arch/arm/dts/vf610-zii-dev-rev-b.dts
index 1eb01f44a..ac0807c49 100644
--- a/arch/arm/dts/vf610-zii-dev-rev-b.dts
+++ b/arch/arm/dts/vf610-zii-dev-rev-b.dts
@@ -45,3 +45,14 @@
 #include <arm/vf610-zii-dev-rev-b.dts>
 
 #include "vf610-zii-dev.dtsi"
+
+/ {
+	spi0 {
+		m25p128@0 {
+			partition@0 {
+				label = "bootloader";
+				reg = <0x0 0x100000>;
+			};
+		};
+	};
+};
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux