lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 08 Nov 2013 21:16:53 +0200
From:	Luca Coelho <luca@...lho.fi>
To:	Felipe Balbi <balbi@...com>
Cc:	mturquette@...aro.org,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@...ts.infradead.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	james.hogan@...tec.com
Subject: Re: [PATCH] clk: add flags to distinguish xtal clocks

Hi Felipe,

On Fri, 2013-11-08 at 12:00 -0600, Felipe Balbi wrote:
> From: Luciano Coelho <luca@...lho.fi>
> 
> Add a flag that indicate whether the clock is a crystal or not.
> 
> Additionally, parse a new device tree binding in clk-fixed-rate to set
> this flag.
> 
> If clock-xtal isn't set, the clock framework will assume clock to be
> generated by an oscillator.  There's only one user for this binding
> right now which is Texas Instruments' WiLink devices which need to know
> details about the clock in order to initialize the underlying WiFi HW
> correctly.
> 
> Signed-off-by: Luciano Coelho <luca@...lho.fi>
> Signed-off-by: Felipe Balbi <balbi@...com>
> ---
> 
> Dropped CLK_IS_TYPE_DEFINED flag and just assume that if the flag
> isn't there, default behavior will be taken.

I don't think this is a good idea, because how would code that relies on
the CLK_IS_TYPE_XTAL flag know whether 0 means that the clock is *not*
crystal or if the flag is simply not defined?

There are many clocks which *are* crystal but don't define this flag
(obviously, because it didn't exist).  That's the reason why I added the
CLK_IS_TYPE_DEFINED flag...

If you want to get rid of this flag, you should traverse all clocks and
set the CLK_IS_TYPE_XTAL on all those that are crystals.

--
Cheers,
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ