devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PFC PATCH] xtensa: standardize devicetree compatible strings
@ 2013-11-19 19:29 Baruch Siach
       [not found] ` <c1b7541980d0e58fc09f3be04b960d3e6037a207.1384889248.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2013-11-19 19:29 UTC (permalink / raw)
  To: Chris Zankel, Max Filippov
  Cc: linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Baruch Siach

The recommended compatible string format, according to the ePAPR v1.1 standard,
is "manufacturer,model". Change the xtensa cpu and pic compatible strings to
"cdns,xtensa-cpu" and "cdns,xtensa-pic" respectively. Also, change the boards
compatible strings in a similar way. Accept older non-standard compatible
strings for now, to not break existing installations.

Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---

Should we just remove support for the old compatible strings?
---
 arch/xtensa/boot/dts/lx60.dts        | 2 +-
 arch/xtensa/boot/dts/ml605.dts       | 2 +-
 arch/xtensa/boot/dts/xtfpga.dtsi     | 6 +++---
 arch/xtensa/kernel/irq.c             | 5 ++++-
 arch/xtensa/platforms/xtfpga/setup.c | 3 +++
 5 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/xtensa/boot/dts/lx60.dts b/arch/xtensa/boot/dts/lx60.dts
index 2eab365..a0f8b8a 100644
--- a/arch/xtensa/boot/dts/lx60.dts
+++ b/arch/xtensa/boot/dts/lx60.dts
@@ -3,7 +3,7 @@
 /include/ "xtfpga-flash-4m.dtsi"
 
 / {
-	compatible = "xtensa,lx60";
+	compatible = "cdns,xtensa-lx60";
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x04000000>;
diff --git a/arch/xtensa/boot/dts/ml605.dts b/arch/xtensa/boot/dts/ml605.dts
index 6ed51d6..905c3a5 100644
--- a/arch/xtensa/boot/dts/ml605.dts
+++ b/arch/xtensa/boot/dts/ml605.dts
@@ -3,7 +3,7 @@
 /include/ "xtfpga-flash-16m.dtsi"
 
 / {
-	compatible = "xtensa,ml605";
+	compatible = "cdns,xtensa-ml605";
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x08000000>;
diff --git a/arch/xtensa/boot/dts/xtfpga.dtsi b/arch/xtensa/boot/dts/xtfpga.dtsi
index 7eda6ec..46b4f5e 100644
--- a/arch/xtensa/boot/dts/xtfpga.dtsi
+++ b/arch/xtensa/boot/dts/xtfpga.dtsi
@@ -1,5 +1,5 @@
 / {
-	compatible = "xtensa,xtfpga";
+	compatible = "cdns,xtensa-xtfpga";
 	#address-cells = <1>;
 	#size-cells = <1>;
 	interrupt-parent = <&pic>;
@@ -17,7 +17,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 		cpu@0 {
-			compatible = "xtensa,cpu";
+			compatible = "cdns,xtensa-cpu";
 			reg = <0>;
 			/* Filled in by platform_setup from FPGA register
 			 * clock-frequency = <100000000>;
@@ -26,7 +26,7 @@
 	};
 
 	pic: pic {
-		compatible = "xtensa,pic";
+		compatible = "cdns,xtensa-pic";
 		/* one cell: internal irq number,
 		 * two cells: second cell == 0: internal irq number
 		 *            second cell == 1: external irq number
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index 6f4f974..7b64a9d 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -202,7 +202,10 @@ void __init init_IRQ(void)
 
 #ifdef CONFIG_OF
 	/* The interrupt controller device node is mandatory */
-	intc = of_find_compatible_node(NULL, NULL, "xtensa,pic");
+	intc = of_find_compatible_node(NULL, NULL, "cdns,xtensa-pic");
+	/* Try the deprecated compatible string */
+	if (!intc)
+		intc = of_find_compatible_node(NULL, NULL, "xtensa,pic");
 	BUG_ON(!intc);
 
 	root_domain = irq_domain_add_linear(intc, NR_IRQS,
diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c
index 74bb74f..288af60 100644
--- a/arch/xtensa/platforms/xtfpga/setup.c
+++ b/arch/xtensa/platforms/xtfpga/setup.c
@@ -168,6 +168,9 @@ void __init platform_calibrate_ccount(void)
 	long clk_freq = 0;
 #ifdef CONFIG_OF
 	struct device_node *cpu =
+		of_find_compatible_node(NULL, NULL, "cdns,xtensa-cpu");
+	/* Try the deprecated compatible string */
+	if (!cpu)
 		of_find_compatible_node(NULL, NULL, "xtensa,cpu");
 	if (cpu) {
 		u32 freq;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-01  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 19:29 [PFC PATCH] xtensa: standardize devicetree compatible strings Baruch Siach
     [not found] ` <c1b7541980d0e58fc09f3be04b960d3e6037a207.1384889248.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2013-12-01  6:43   ` Max Filippov
     [not found]     ` <CAMo8BfLCQeDtPXBJ+VX8cj503sBYPM8L7p9h32r7yfgZv_99nA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-01  7:14       ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).