Skip to contentSkip to conversation

x86: Remove include directory in arch/x86/dts

PATCH New Bin Meng 2 participants 17 messages Dec 24, 2014 – Dec 30, 2014 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/5 x86: Remove include directory in arch/x86/dts

The include directory in arch/x86/dts is not used, so remove it.

---

 arch/x86/dts/include/dt-bindings | 1 -
 1 file changed, 1 deletion(-)
 delete mode 120000 arch/x86/dts/include/dt-bindings
arch/x86/dts/include/dt-bindings deleted +0 -1
deleted file mode 120000
index 0cecb3d..0000000
@@ -1 +0,0 @@
-../../../../include/dt-bindings
\ No newline at end of file
Signature · 1 line
1.8.2.1
author
#1 lore raw

PATCH 2/5 x86: Remove alex.dts in arch/x86/dts

No board is using alex.dts, so remove it.

---

 arch/x86/dts/Makefile |  1 -
 arch/x86/dts/alex.dts | 24 ------------------------
 2 files changed, 25 deletions(-)
 delete mode 100644 arch/x86/dts/alex.dts
arch/x86/dts/Makefile +0 -1
index 3b5d6da..5525094 100644
@@ -1,6 +1,5 @@
 dtb-y += link.dtb \
 	chromebook_link.dtb \
-	alex.dtb \
 	crownbay.dtb
 
 targets += $(dtb-y)
arch/x86/dts/alex.dts deleted +0 -24
deleted file mode 100644
index 2f13544..0000000
@@ -1,24 +0,0 @@
-/dts-v1/;
-
-/include/ "coreboot.dtsi"
-
-/ {
-	#address-cells = <1>;
-	#size-cells = <1>;
-	model = "Google Alex";
-	compatible = "google,alex", "intel,atom-pineview";
-
-	config {
-	       silent_console = <0>;
-	};
-
-	gpio: gpio {};
-
-	serial {
-		reg = <0x3f8 8>;
-		clock-frequency = <115200>;
-	};
-
-	chosen { };
-	memory { device_type = "memory"; reg = <0 0>; };
-};
Signature · 1 line
1.8.2.1
author
#4 lore raw

PATCH 3/5 x86: Rename coreboot.dsti to serial.dtsi

In reply to Bin Meng

The name of coreboot.dtsi is misleading, as it actually describes the legacy serial port device node.

---

 arch/x86/dts/crownbay.dts                   | 2 +-
 arch/x86/dts/link.dts                       | 2 +-
 arch/x86/dts/{coreboot.dtsi => serial.dtsi} | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/x86/dts/{coreboot.dtsi => serial.dtsi} (100%)
arch/x86/dts/crownbay.dts +1 -1
index 3f43f3c..c3e112f 100644
@@ -6,7 +6,7 @@
 
 /dts-v1/;
 
-/include/ "coreboot.dtsi"
+/include/ "serial.dtsi"
 
 / {
 	#address-cells = <1>;
arch/x86/dts/link.dts +1 -1
index a739080..c6b7d82 100644
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ "coreboot.dtsi"
+/include/ "serial.dtsi"
 
 / {
 	#address-cells = <1>;
arch/x86/dts/serial.dtsi renamed from arch/x86/dts/coreboot.dtsi +0 -0
similarity index 100%
rename from arch/x86/dts/coreboot.dtsi
rename to arch/x86/dts/serial.dtsi
Signature · 1 line
1.8.2.1
author
#7 lore raw

PATCH 4/5 x86: Clean up the board dts files

In reply to Bin Meng

This commits cleans up the board dts files.

- Correct the serial port register size to 8
- Remove the misleading status = "disabled" statement in the serial.dtsi
- Move the inclusion of skeleton.dtsi from serial.dtsi to board dts files
- Let the board dts file define stdout-path in the chosen node
- Remove device nodes in board dts files thar are duplicated to skeleton.dtsi

---

 arch/x86/dts/crownbay.dts | 11 +++--------
 arch/x86/dts/link.dts     | 11 +++--------
 arch/x86/dts/serial.dtsi  |  9 +--------
 3 files changed, 7 insertions(+), 24 deletions(-)
arch/x86/dts/crownbay.dts +3 -8
index c3e112f..97f7a52 100644
@@ -6,11 +6,10 @@
 
 /dts-v1/;
 
+/include/ "skeleton.dtsi"
 /include/ "serial.dtsi"
 
 / {
-	#address-cells = <1>;
-	#size-cells = <1>;
 	model = "Intel Crown Bay";
 	compatible = "intel,crownbay", "intel,queensbay";
 
@@ -32,14 +31,10 @@
 		bank-name = "B";
 	};
 
-	serial {
-		reg = <0x3f8 8>;
-		clock-frequency = <115200>;
+	chosen {
+		stdout-path = "/serial";
 	};
 
-	chosen { };
-	memory { device_type = "memory"; reg = <0 0>; };
-
 	spi {
 		#address-cells = <1>;
 		#size-cells = <0>;
arch/x86/dts/link.dts +3 -8
index c6b7d82..107af60 100644
@@ -1,10 +1,9 @@
 /dts-v1/;
 
+/include/ "skeleton.dtsi"
 /include/ "serial.dtsi"
 
 / {
-	#address-cells = <1>;
-	#size-cells = <1>;
 	model = "Google Link";
 	compatible = "google,link", "intel,celeron-ivybridge";
 
@@ -33,14 +32,10 @@
 		bank-name = "C";
 	};
 
-	serial {
-		reg = <0x3f8 8>;
-		clock-frequency = <115200>;
+	chosen {
+		stdout-path = "/serial";
 	};
 
-	chosen { };
-	memory { device_type = "memory"; reg = <0 0>; };
-
 	spd {
 		compatible = "memory-spd";
 		#address-cells = <1>;
arch/x86/dts/serial.dtsi +1 -8
index 65a93ac..ebdda76 100644
@@ -1,17 +1,10 @@
-/include/ "skeleton.dtsi"
-
 / {
-	chosen {
-		stdout-path = "/serial";
-	};
-
 	serial {
 		compatible = "x86-uart";
-		reg = <0x3f8 0x10>;
+		reg = <0x3f8 8>;
 		reg-shift = <0>;
 		io-mapped = <1>;
 		multiplier = <1>;
 		baudrate = <115200>;
-		status = "disabled";
 	};
 };
Signature · 1 line
1.8.2.1
#8 lore raw

PATCH 4/5 x86: Clean up the board dts files

Quoted 11 lines · Bin Meng

This commits cleans up the board dts files.

- Correct the serial port register size to 8
- Remove the misleading status = "disabled" statement in the serial.dtsi
- Move the inclusion of skeleton.dtsi from serial.dtsi to board dts files
- Let the board dts file define stdout-path in the chosen node
- Remove device nodes in board dts files thar are duplicated to skeleton.dtsi

Quoted 2 lines

---

#9 lore raw

PATCH 4/5 x86: Clean up the board dts files

Quoted 12 lines · Simon Glass
Quoted 11 lines · Bin Meng

This commits cleans up the board dts files.

- Correct the serial port register size to 8
- Remove the misleading status = "disabled" statement in the serial.dtsi
- Move the inclusion of skeleton.dtsi from serial.dtsi to board dts files
- Let the board dts file define stdout-path in the chosen node
- Remove device nodes in board dts files thar are duplicated to skeleton.dtsi

Quoted 3 lines
Quoted 2 lines

---

Applied to u-boot-x86/next, thanks!

author
#10 lore raw

PATCH 5/5 x86: Only compile dts file for a specific board

In reply to Bin Meng

Right now all dts files under arch/x86/dts are compiled. This is not necessary so update the Makefile to only compile dts file for a specific board.

---

 arch/x86/dts/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/dts/Makefile +3 -3
index 5525094..1291e69 100644
@@ -1,6 +1,6 @@
-dtb-y += link.dtb \
-	chromebook_link.dtb \
-	crownbay.dtb
+dtb-$(CONFIG_TARGET_COREBOOT) += link.dtb
+dtb-$(CONFIG_TARGET_CHROMEBOOK_LINK) += chromebook_link.dtb
+dtb-$(CONFIG_TARGET_CROWNBAY) += crownbay.dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
1.8.2.1
#11 lore raw

PATCH 5/5 x86: Only compile dts file for a specific board

Hi Bin,

Quoted 3 lines · Bin Meng

Right now all dts files under arch/x86/dts are compiled. This is not necessary so update the Makefile to only compile dts file for a specific board.

I'd rather that we go the other way - making the boards more common. If I can get the Minnowmax spun up I am going to try to unify the support such that we can build an image that will boot on all the x86 boards. This would require:

- a set of operations and data provided by each board (how to do CAR, whether to use FSP, how to detect the board, etc.)
- allowing a board config to enable multiple arch types, like ivybridge and atom, for example
- allow multiple device trees, FSPs, microcodes, etc. to reside in the image

One benefit is easier programming, if we can have an image that is common to many boards - we don't need to worry so much about breaking a different board if most things are common. Also we retain the option to build just for a single target.

I feel that if we get the structure for this in place now, it will be relatively easy to build on, whereas trying to retrofit it later would be too hard.

Regards,
Simon

author
#12 lore raw

PATCH 5/5 x86: Only compile dts file for a specific board

Hi Simon,

Quoted 18 lines · Simon Glass

Hi Bin,

Quoted 3 lines · Bin Meng

Right now all dts files under arch/x86/dts are compiled. This is not necessary so update the Makefile to only compile dts file for a specific board.

I'd rather that we go the other way - making the boards more common. If I can get the Minnowmax spun up I am going to try to unify the support such that we can build an image that will boot on all the x86 boards. This would require:

- a set of operations and data provided by each board (how to do CAR, whether to use FSP, how to detect the board, etc.)
- allowing a board config to enable multiple arch types, like ivybridge and atom, for example
- allow multiple device trees, FSPs, microcodes, etc. to reside in the image

Quoted 9 lines

One benefit is easier programming, if we can have an image that is common to many boards - we don't need to worry so much about breaking a different board if most things are common. Also we retain the option to build just for a single target.

I feel that if we get the structure for this in place now, it will be relatively easy to build on, whereas trying to retrofit it later would be too hard.

The idea of making the boards support more common sounds good to me. We will see how far we can go.

Regards,
Bin

#13 lore raw

PATCH 1/5 x86: Remove include directory in arch/x86/dts

In reply to Bin Meng

Hi Bin,

Quoted 4 lines · Bin Meng

The include directory in arch/x86/dts is not used, so remove it.

---

Actually we do need this - the Chrome OS keyboard .dtsi will use a binding when I get around to updating it.

Quoted 14 lines
 arch/x86/dts/include/dt-bindings | 1 -
 1 file changed, 1 deletion(-)
 delete mode 120000 arch/x86/dts/include/dt-bindings
arch/x86/dts/include/dt-bindings deleted +0 -2
deleted file mode 120000
index 0cecb3d..0000000
@@ -1 +0,0 @@
-../../../../include/dt-bindings
\ No newline at end of file
--
Quoted 2 lines

1.8.2.1

Regards,
Simon

author
#14 lore raw

PATCH 1/5 x86: Remove include directory in arch/x86/dts

Hi Simon,

Quoted 11 lines · Simon Glass

Hi Bin,

Quoted 4 lines · Bin Meng

The include directory in arch/x86/dts is not used, so remove it.

---

Actually we do need this - the Chrome OS keyboard .dtsi will use a binding when I get around to updating it.

OK, so maybe we can just put anything we do need into the include instead of a symbolic link to the genric one?

Regards,
Bin

#15 lore raw

PATCH 1/5 x86: Remove include directory in arch/x86/dts

Hi Bin,

Quoted 11 lines · Bin Meng

Hi Simon,

Quoted 8 lines · Simon Glass

Hi Bin,

Quoted 4 lines · Bin Meng

The include directory in arch/x86/dts is not used, so remove it.

---

Quoted 6 lines
Quoted 3 lines

Actually we do need this - the Chrome OS keyboard .dtsi will use a binding when I get around to updating it.

OK, so maybe we can just put anything we do need into the include instead of a symbolic link to the genric one?

The idea as (I understand it) is that include/dt-bindings is the standard directory for all archs to put their bindings. This is how ARM works too.

Regards,
Simon

author
#16 lore raw

PATCH 1/5 x86: Remove include directory in arch/x86/dts

Hi Simon,

Quoted 18 lines · Simon Glass

Hi Bin,

Quoted 15 lines · Bin Meng

Hi Simon,

Quoted 11 lines · Simon Glass

Hi Bin,

Quoted 4 lines · Bin Meng

The include directory in arch/x86/dts is not used, so remove it.

---

Actually we do need this - the Chrome OS keyboard .dtsi will use a binding when I get around to updating it.

Quoted 7 lines
Quoted 2 lines

OK, so maybe we can just put anything we do need into the include instead of a symbolic link to the genric one?

The idea as (I understand it) is that include/dt-bindings is the standard directory for all archs to put their bindings. This is how ARM works too.

OK, thanks for the clarification.

Regards,
Bin