Skip to contentSkip to conversation

ARM: meson: Fix UART compatible

PATCH New Carlo Caione 2 participants 3 messages Oct 12, 2014 – Oct 13, 2014

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

PATCH 1/1 ARM: meson: Fix UART compatible

Fix the compatible for the UART to make it consistent with the other compatibles for Meson6 and Meson8 and to avoid problems when the meson8b will be introduced with a different UART driver.

---
 arch/arm/boot/dts/meson.dtsi    | 8 ++++----
 drivers/tty/serial/meson_uart.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/meson.dtsi +4 -4
index e6539ea..a0d34ee 100644
@@ -76,7 +76,7 @@
 		};
 
 		uart_AO: serial at c81004c0 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81004c0 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -84,7 +84,7 @@
 		};
 
 		uart_A: serial at c81084c0 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81084c0 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -92,7 +92,7 @@
 		};
 
 		uart_B: serial at c81084dc {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81084dc 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -100,7 +100,7 @@
 		};
 
 		uart_C: serial at c8108700 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc8108700 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
drivers/tty/serial/meson_uart.c +2 -2
index 15c7497..4c3de09 100644
@@ -590,7 +590,7 @@ static int meson_uart_remove(struct platform_device *pdev)
 
 
 static const struct of_device_id meson_uart_dt_match[] = {
-	{ .compatible = "amlogic,meson-uart" },
+	{ .compatible = "amlogic,meson6-uart" },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
@@ -600,7 +600,7 @@ static  struct platform_driver meson_uart_platform_driver = {
 	.remove		= meson_uart_remove,
 	.driver		= {
 		.owner		= THIS_MODULE,
-		.name		= "meson_uart",
+		.name		= "meson6_uart",
 		.of_match_table	= meson_uart_dt_match,
 	},
 };
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: meson: Fix UART compatible

Quoted 3 lines · Carlo Caione

Fix the compatible for the UART to make it consistent with the other compatibles for Meson6 and Meson8 and to avoid problems when the meson8b will be introduced with a different UART driver.

I don't follow why this would cause problems -- you simply wouldn't use the "amlogic,meson-uart" string for a Meson8b UART because it's not compatible with the programming model of the other UARTs.

Quoted 51 lines
---
 arch/arm/boot/dts/meson.dtsi    | 8 ++++----
 drivers/tty/serial/meson_uart.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/meson.dtsi +4 -4
index e6539ea..a0d34ee 100644
@@ -76,7 +76,7 @@
 		};
 
 		uart_AO: serial at c81004c0 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81004c0 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -84,7 +84,7 @@
 		};
 
 		uart_A: serial at c81084c0 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81084c0 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -92,7 +92,7 @@
 		};
 
 		uart_B: serial at c81084dc {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc81084dc 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
@@ -100,7 +100,7 @@
 		};
 
 		uart_C: serial at c8108700 {
-			compatible = "amlogic,meson-uart";
+			compatible = "amlogic,meson6-uart";
 			reg = <0xc8108700 0x14>;
 			interrupts = <0 90 1>;
 			clocks = <&clk81>;
drivers/tty/serial/meson_uart.c +0 -0
index 15c7497..4c3de09 100644

drivers/tty/serial/meson_uart.c static int meson_uart_remove(struct platform_device *pdev) · line 593

Quoted 5 lines
drivers/tty/serial/meson_uart.c +1 -1
@@ -590,7 +590,7 @@ static int meson_uart_remove(struct platform_device *pdev)
 
 
 static const struct of_device_id meson_uart_dt_match[] = {
-	{ .compatible = "amlogic,meson-uart" },
+	{ .compatible = "amlogic,meson6-uart" },

If this is already in a mainline release, we shouldn't be changing the string unless we're absolutely certain no-one is adversely affected by the removal. We can deprecate the old string while maintaining compatibility, however.

There doesn't seem to be a binding document. Please could you add one?

Thanks,
Mark.

Quoted 16 lines
drivers/tty/serial/meson_uart.c +1 -1
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
@@ -600,7 +600,7 @@ static  struct platform_driver meson_uart_platform_driver = {
 	.remove		= meson_uart_remove,
 	.driver		= {
 		.owner		= THIS_MODULE,
-		.name		= "meson_uart",
+		.name		= "meson6_uart",
 		.of_match_table	= meson_uart_dt_match,
 	},
 };
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 ARM: meson: Fix UART compatible

Quoted 8 lines · Mark Rutland
Quoted 3 lines · Carlo Caione

Fix the compatible for the UART to make it consistent with the other compatibles for Meson6 and Meson8 and to avoid problems when the meson8b will be introduced with a different UART driver.

I don't follow why this would cause problems -- you simply wouldn't use the "amlogic,meson-uart" string for a Meson8b UART because it's not compatible with the programming model of the other UARTs.

I know it isn't really a _real_ problem. I just want to avoid any confusion in the future and I'm pretty sure that changing it at this stage of development doesn't cause any trouble (I wouldn't have asked otherwise).

Quoted 53 lines
Quoted 53 lines
---
 arch/arm/boot/dts/meson.dtsi    | 8 ++++----
 drivers/tty/serial/meson_uart.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/meson.dtsi +4 -4
index e6539ea..a0d34ee 100644
@@ -76,7 +76,7 @@
              };
 
              uart_AO: serial at c81004c0 {
-                     compatible = "amlogic,meson-uart";
+                     compatible = "amlogic,meson6-uart";
                      reg = <0xc81004c0 0x14>;
                      interrupts = <0 90 1>;
                      clocks = <&clk81>;
@@ -84,7 +84,7 @@
              };
 
              uart_A: serial at c81084c0 {
-                     compatible = "amlogic,meson-uart";
+                     compatible = "amlogic,meson6-uart";
                      reg = <0xc81084c0 0x14>;
                      interrupts = <0 90 1>;
                      clocks = <&clk81>;
@@ -92,7 +92,7 @@
              };
 
              uart_B: serial at c81084dc {
-                     compatible = "amlogic,meson-uart";
+                     compatible = "amlogic,meson6-uart";
                      reg = <0xc81084dc 0x14>;
                      interrupts = <0 90 1>;
                      clocks = <&clk81>;
@@ -100,7 +100,7 @@
              };
 
              uart_C: serial at c8108700 {
-                     compatible = "amlogic,meson-uart";
+                     compatible = "amlogic,meson6-uart";
                      reg = <0xc8108700 0x14>;
                      interrupts = <0 90 1>;
                      clocks = <&clk81>;
drivers/tty/serial/meson_uart.c +0 -0
index 15c7497..4c3de09 100644
@@ -590,7 +590,7 @@ static int meson_uart_remove(struct platform_device *pdev)
 
 
Quoted 8 lines

drivers/tty/serial/meson_uart.c static int meson_uart_remove(struct platform_device *pdev) · line 593

Quoted 3 lines
drivers/tty/serial/meson_uart.c +1 -1
 static const struct of_device_id meson_uart_dt_match[] = {
-     { .compatible = "amlogic,meson-uart" },
+     { .compatible = "amlogic,meson6-uart" },

If this is already in a mainline release, we shouldn't be changing the string unless we're absolutely certain no-one is adversely affected by the removal. We can deprecate the old string while maintaining compatibility, however.

I doubt anybody else is using mainline kernel on Meson SoCs but me and Beniamino. IMO better change it now that the development is at an early stage.

Quoted 1 line

There doesn't seem to be a binding document. Please could you add one?

Right. Actually the documentation[1] was submitted together with the driver but it seems that it was lost during mainlining

[1] https://patchwork.ozlabs.org/patch/388369/

Signature · 1 line
Carlo Caione