From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Holt Subject: Re: [RFC 4/4] [powerpc] Add flexcan device support for p1010rdb. Date: Tue, 9 Aug 2011 06:40:43 -0500 Message-ID: <20110809114043.GN4926@sgi.com> References: <1312869313-22434-1-git-send-email-holt@sgi.com> <1312869313-22434-5-git-send-email-holt@sgi.com> <20110809063319.GK4926@sgi.com> <4E40DDA5.1050004@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, U Bhaskar-B22300 , socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, Marc Kleine-Budde , PPC list To: Wolfgang Grandegger Return-path: Content-Disposition: inline In-Reply-To: <4E40DDA5.1050004-5Yr1BZd7O62+XT7JhA+gdA@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 Tue, Aug 09, 2011 at 09:11:33AM +0200, Wolfgang Grandegger wrote: > > + return &p1010_rdb_system_clock; > > Just returning fsl_get_sys_freq() here would already be fine. I'm also > missing the factor of two here: > > return fsl_get_sys_freq() / 2; ???? I am working on the other comments right now as well, but this one brought up a good question. The old algorithm in the original freescale patches I started with actually did, essentially: ...clock.freq = DIV_ROUND_CLOSEST(fsl_get_sys_freq() / 2, 1000) * 1000 The end result was before: ...clock.freq=0x0bebc200 After: ...clock.freq=0x0bebc1fe Is that rounding relavent? Thanks, Robin