From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Subject: Re: [PATCH v11 5/6] flexcan: Prefer device tree clock frequency if available. Date: Thu, 11 Aug 2011 18:35:50 +0200 Message-ID: <4E4404E6.5060302@grandegger.com> References: <1313078831-2511-1-git-send-email-holt@sgi.com> <1313078831-2511-6-git-send-email-holt@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, U Bhaskar-B22300 , Kumar Gala , Grant Likely , Marc Kleine-Budde , Scott Wood , PPC list To: Robin Holt Return-path: In-Reply-To: <1313078831-2511-6-git-send-email-holt-sJ/iWh9BUns@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org On 08/11/2011 06:07 PM, Robin Holt wrote: > If our CAN device's device tree node has a clock-frequency property, > then use that value for the can devices clock frequency. If not, fall > back to asking the platform/mach code for the clock frequency associated > with the flexcan device. > > Signed-off-by: Robin Holt > To: Kumar Gala > To: Wolfgang Grandegger , > To: Marc Kleine-Budde , > To: U Bhaskar-B22300 > To: Scott Wood > To: Grant Likely > Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, > Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, > Cc: PPC list > Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > --- > .../devicetree/bindings/net/can/fsl-flexcan.txt | 2 + > drivers/net/can/flexcan.c | 33 +++++++++++++++----- > 2 files changed, 27 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > index c78dcbb..a4382c7 100644 > --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt > @@ -11,6 +11,7 @@ Required properties: > > - reg : Offset and length of the register set for this device > - interrupts : Interrupt tuple for this device > +- clock-frequency : The oscillator frequency driving the flexcan device > > Example: > > @@ -19,4 +20,5 @@ Example: > reg = <0x1c000 0x1000>; > interrupts = <48 0x2>; > interrupt-parent = <&mpic>; > + clock-frequency = <0x0bebc1fc>; clock-frequency = <200000000>; // filled in by bootloader Is better readable. You should also add the comment. Wolfgang.