From: James Hogan Subject: Re: [PATCH] serial: 8250_dw: set clock rate Date: Thu, 9 May 2013 13:58:09 +0100 Message-ID: <518B9D61.4090406@imgtec.com> References: <1368095356-21081-1-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1368095356-21081-1-git-send-email-james.hogan@imgtec.com> Sender: linux-serial-owner@vger.kernel.org To: Greg Kroah-Hartman Cc: James Hogan , linux-serial@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Likely , Rob Herring , Rob Landley , Jiri Slaby , Heikki Krogerus , Alan Cox , Jamie Iles , Bill Pemberton List-Id: devicetree@vger.kernel.org On 09/05/13 11:29, James Hogan wrote: > If the uart clock provided to the 8250_dw driver is adjustable it may > not be set to the desired rate. Therefore if both a uart clock and a > clock frequency is specified (e.g. via device tree), try and update the > clock to match the frequency. > > Unfortunately if the resulting frequency is rounded down (which is the > default behaviour of the generic clk-divider), the 8250 core won't allow > the highest baud rate to be used, so if an explicit frequency is > specified we always report that to the 8250 core. Hi, Sorry, please ignore this patch. I've realised that a larger (e.g. non-divided) source clock can just be provided directly to the uart and it appears to have enough of an internal divider for the driver to do the right thing without changing the input clock rate, although of course that clock rate still needs setting somewhere. I'm not sure why we didn't do this all along as it gives a closer frequency anyway. Thanks James