Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1439809

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

From Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt
Date 2016-07-08 23:50 +0200
Message-ID <rSLON-23d-3@gated-at.bofh.it> (permalink)
References <rSzaW-29Y-11@gated-at.bofh.it> <rSHBw-7JO-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/08/2016 07:14 PM, Michael Turquette wrote:
> Quoting Jorge Ramirez-Ortiz (2016-07-08 01:11:06)
>> 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);
> Change looks good to me, but with one question: should this change be
> put into more generic code instead of in this specific driver? For
> instance, we call of_clk_set_defaults from the following files:
>
> drivers/base/platform.c
> drivers/i2c/i2c-core.c
> drivers/spi/spi.c
>
> And Stephen posted a patch to do this for devices on the AMBA bus:
>
> https://patchwork.kernel.org/patch/6501691/
>
> Does Stephen's patch mean that you do not need patch #1?

I did a quick test (replaced my changes with the patch above) and the 
console broke and the BT stack couldn't communicate to the device over 
the uart...I guess something else needs doing on top of Stephen's change.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> - 2016-07-08 10:20 +0200
  Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via  dt Michael Turquette <mturquette@baylibre.com> - 2016-07-08 19:20 +0200
    Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency  setting via dt Jorge Ramirez <jorge.ramirez-ortiz@linaro.org> - 2016-07-08 23:50 +0200
      Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via  dt Michael Turquette <mturquette@baylibre.com> - 2016-07-09 02:30 +0200
        Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency  setting via dt Stephen Boyd <sboyd@codeaurora.org> - 2016-07-09 02:50 +0200
          Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency  setting via dt Jorge Ramirez <jorge.ramirez-ortiz@linaro.org> - 2016-07-09 08:50 +0200
            Re: [PATCH 1/2] tty: amba-pl011: add support for clock frequency  setting via dt Stephen Boyd <sboyd@codeaurora.org> - 2016-07-11 23:10 +0200

csiph-web