Thread (13 messages) flat view 13 messages, 4 authors, 2016-08-24
STALE3667d REVIEWED: 1 (0M)

1 review trailer.

[PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt

From: Jorge Ramirez-Ortiz <hidden>
Date: 2016-07-08 08:11:26
Also in: lkml
Subsystem: arm primecell uart pl010 and pl011 drivers, the rest, tty layer and serial drivers · Maintainers: Russell King, Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

Allow to specify the clock frequency for any given port via the
assigned-clock-rates device tree property.

Signed-off-by: Jorge Ramirez-Ortiz <redacted>
Tested-by: Jorge Ramirez-Ortiz <redacted>
---
 drivers/tty/serial/amba-pl011.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 1b7331e..51867ab 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -55,6 +55,7 @@
 #include <linux/types.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/clk/clk-conf.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/sizes.h>
 #include <linux/io.h>
@@ -2472,6 +2473,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 	if (IS_ERR(uap->clk))
 		return PTR_ERR(uap->clk);
 
+	ret = of_clk_set_defaults(dev->dev.of_node, false);
+	if (ret < 0)
+		return ret;
+
 	uap->reg_offset = vendor->reg_offset;
 	uap->vendor = vendor;
 	uap->fifosize = vendor->get_fifosize(dev);
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help