All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt
@ 2016-07-08  8:11 ` Jorge Ramirez-Ortiz
  0 siblings, 0 replies; 28+ messages in thread
From: Jorge Ramirez-Ortiz @ 2016-07-08  8:11 UTC (permalink / raw)
  To: jorge.ramirez-ortiz, linux, xuwei5, mturquette
  Cc: guodong.xu, sboyd, xinliang.liu, john.stultz, linux-arm-kernel,
	linux-kernel

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

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
 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

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

end of thread, other threads:[~2016-08-24 15:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08  8:11 [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt Jorge Ramirez-Ortiz
2016-07-08  8:11 ` Jorge Ramirez-Ortiz
2016-07-08  8:11 ` [PATCH 2/2] arm64: dts: set UART1 clock frequency to 150MHz Jorge Ramirez-Ortiz
2016-07-08  8:11   ` Jorge Ramirez-Ortiz
2016-07-08 17:23   ` Michael Turquette
2016-07-08 17:23     ` Michael Turquette
2016-07-11  9:53   ` Wei Xu
2016-07-11  9:53     ` Wei Xu
2016-08-19  6:57     ` Jorge Ramirez
2016-08-19  6:57       ` Jorge Ramirez
2016-08-19  8:29       ` Wei Xu
2016-08-19  8:29         ` Wei Xu
2016-08-19  9:30         ` Jorge Ramirez-Ortiz
2016-08-19  9:30           ` Jorge Ramirez-Ortiz
2016-08-24 15:24   ` Wei Xu
2016-08-24 15:24     ` Wei Xu
2016-07-08 17:14 ` [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt Michael Turquette
2016-07-08 17:14   ` Michael Turquette
2016-07-08 21:39   ` Jorge Ramirez
2016-07-08 21:39     ` Jorge Ramirez
2016-07-09  0:23     ` Michael Turquette
2016-07-09  0:23       ` Michael Turquette
2016-07-09  0:43       ` Stephen Boyd
2016-07-09  0:43         ` Stephen Boyd
2016-07-09  6:42         ` Jorge Ramirez
2016-07-09  6:42           ` Jorge Ramirez
     [not found]           ` <CAPPM39Zy2ii4-9ABTr+WtN5zdBjTFomQjzJfdSfrvYC9vhqd1w@mail.gmail.com>
2016-07-11 21:03             ` Stephen Boyd
2016-07-11 21:03               ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.