aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 20:33:30 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commite7bfda2c243e66a75ff966ba04c28b1590b5d24c (patch)
tree069959b7e6a8cf31b0feb2857a63c7c4c0e3dcbf /target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch
parent8fe5ad5d3373cebed4fbc55a7b779721971ce427 (diff)
downloadupstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.gz
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.bz2
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.zip
brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch')
-rw-r--r--target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch b/target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch
new file mode 100644
index 0000000000..2f82830ae1
--- /dev/null
+++ b/target/linux/bcm63xx/patches-4.14/001-4.15-04-tty-bcm63xx_uart-allow-naming-clock-in-device-tree.patch
@@ -0,0 +1,55 @@
+From 317f8659bba01b307cbe4e9902d4e3d333fd7164 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Sun, 16 Jul 2017 12:39:17 +0200
+Subject: [PATCH V2 4/8] tty/bcm63xx_uart: allow naming clock in device tree
+
+Codify using a named clock for the refclk of the uart. This makes it
+easier if we might need to add a gating clock (like present on the
+BCM6345).
+
+Acked-by: Rob Herring <robh@kernel.org>
+Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+---
+ Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | 6 ++++++
+ drivers/tty/serial/bcm63xx_uart.c | 6 ++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+--- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
++++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
+@@ -11,6 +11,11 @@ Required properties:
+ - clocks: Clock driving the hardware; used to figure out the baud rate
+ divisor.
+
++
++Optional properties:
++
++- clock-names: Should be "refclk".
++
+ Example:
+
+ uart0: serial@14e00520 {
+@@ -19,6 +24,7 @@ Example:
+ interrupt-parent = <&periph_intc>;
+ interrupts = <2>;
+ clocks = <&periph_clk>;
++ clock-names = "refclk";
+ };
+
+ clocks {
+--- a/drivers/tty/serial/bcm63xx_uart.c
++++ b/drivers/tty/serial/bcm63xx_uart.c
+@@ -846,8 +846,10 @@ static int bcm_uart_probe(struct platfor
+ if (!res_irq)
+ return -ENODEV;
+
+- clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
+- clk_get(&pdev->dev, "refclk");
++ clk = clk_get(&pdev->dev, "refclk");
++ if (IS_ERR(clk) && pdev->dev.of_node)
++ clk = of_clk_get(pdev->dev.of_node, 0);
++
+ if (IS_ERR(clk))
+ return -ENODEV;
+