Skip to contentSkip to conversation

Enable devicetree for Ritmix RZX-50 board

PATCH In review Dmitry Smagin 3 participants 6 messages Sep 18, 2013 – Sep 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Enable devicetree for Ritmix RZX-50 board

This series of patches enables devicetree using for mips-based
Ritmix RZX-50 board. Besides that it fixes missing dependency and linking error when enabling OF_BAREBOX_DRIVER which actually needs ENV_HANDLING to be activated.

[PATCH 1/3] Add missing dependency ENV_HANDLING for OF_BAREBOX_DRIVER [PATCH 2/3] MIPS: rxz50: add initial devicetree support [PATCH 3/3] MIPS: rzx50_defconfig: enable devicetree

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH 1/3 Add missing dependency ENV_HANDLING for OF_BAREBOX_DRIVER option

This patch fixes linker error:
barebox.c:(.text.environment_probe+0x48): undefined reference to default_environment_path

Which appears when compiling env-less boards with enabled devicetree.

---
 drivers/of/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/of/Kconfig +1 -0
index ab5eac8..6b893d7 100644
@@ -21,6 +21,7 @@ config OF_NET
 
 config OF_BAREBOX_DRIVERS
 	depends on OFDEVICE
+	depends on ENV_HANDLING
 	bool "Enable barebox specific devicetree configuration drivers"
 	help
 	  barebox supports being configured from devicetree. This enables
Signature · 7 lines
1.8.4.rc3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/3 MIPS: rxz50: add initial devicetree support

In reply to Dmitry Smagin

Memory initialization is moved from board.c to rzx50.dts file.

---
 arch/mips/boards/rzx50/Makefile |  1 -
 arch/mips/boards/rzx50/board.c  | 12 ------------
 arch/mips/boards/rzx50/serial.c |  1 -
 arch/mips/dts/rzx50.dts         | 12 ++++++++++++
 4 files changed, 12 insertions(+), 14 deletions(-)
 delete mode 100644 arch/mips/boards/rzx50/board.c
 create mode 100644 arch/mips/dts/rzx50.dts
arch/mips/boards/rzx50/Makefile +0 -1
index 9e14763..ff1a655 100644
@@ -1,2 +1 @@
-obj-y += board.o
 obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
arch/mips/boards/rzx50/board.c deleted +0 -12
deleted file mode 100644
index 9e655ab..0000000
@@ -1,12 +0,0 @@
-#include <common.h>
-#include <init.h>
-#include <sizes.h>
-#include <asm/memory.h>
-
-static int mem_init(void)
-{
-	mips_add_ram0(SZ_64M);
-
-	return 0;
-}
-mem_initcall(mem_init);
arch/mips/boards/rzx50/serial.c +0 -1
index 0038c1d..566356a 100644
@@ -22,7 +22,6 @@
 
 static int rzx50_console_init(void)
 {
-	barebox_set_model("Ritmix RZX-50");
 	barebox_set_hostname("rzx50");
 
 	/* Register the serial port */
arch/mips/dts/rzx50.dts new file +12 -0
new file mode 100644
index 0000000..69320dd
@@ -0,0 +1,12 @@
+/dts-v1/;
+
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "Ritmix RZX-50";
+	compatible = "ritmix,rzx50";
+
+	memory {
+		reg = <0x00000000 0x4000000>;
+	};
+};
Signature · 7 lines
1.8.4.rc3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/3 MIPS: rzx50_defconfig: enable devicetree

In reply to Dmitry Smagin
---
 arch/mips/configs/rzx50_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
arch/mips/configs/rzx50_defconfig +6 -0
index 7b75909..7691bae 100644
@@ -1,3 +1,5 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="rzx50"
 CONFIG_MACH_MIPS_XBURST=y
 CONFIG_JZ4750D_DEBUG_LL_UART1=y
 CONFIG_PBL_IMAGE=y
@@ -27,6 +29,10 @@ CONFIG_CMD_UIMAGE=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_OFDEVICE=y
 # CONFIG_SPI is not set
 CONFIG_SHA1=y
 CONFIG_SHA224=y
Signature · 7 lines
1.8.4.rc3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Acked-by on the v1 series
#4 lore raw
In reply to Dmitry Smagin

On Wed, 18 Sep 2013 09:20:30 +0400
Dmitry Smagin <[email protected]> wrote:

Quoted 13 lines

This series of patches enables devicetree using for mips-based
Ritmix RZX-50 board. Besides that it fixes missing dependency and linking error when enabling OF_BAREBOX_DRIVER which actually needs ENV_HANDLING to be activated.

[PATCH 1/3] Add missing dependency ENV_HANDLING for OF_BAREBOX_DRIVER [PATCH 2/3] MIPS: rxz50: add initial devicetree support [PATCH 3/3] MIPS: rzx50_defconfig: enable devicetree

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 8 lines
-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw
In reply to Dmitry Smagin
Quoted 8 lines · Dmitry Smagin

This series of patches enables devicetree using for mips-based
Ritmix RZX-50 board. Besides that it fixes missing dependency and linking error when enabling OF_BAREBOX_DRIVER which actually needs ENV_HANDLING to be activated.

[PATCH 1/3] Add missing dependency ENV_HANDLING for OF_BAREBOX_DRIVER [PATCH 2/3] MIPS: rxz50: add initial devicetree support [PATCH 3/3] MIPS: rzx50_defconfig: enable devicetree

Applied with Antonys Ack.

Thanks
Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox