[PATCH] serial: ns16550: Fix reading clock-frequency property
Sascha Hauer
s.hauer at pengutronix.de
Mon Jun 22 02:53:27 PDT 2015
On Mon, Jun 22, 2015 at 12:33:07PM +0300, Antony Pavlov wrote:
> On Mon, 22 Jun 2015 10:48:40 +0200
> Sascha Hauer <s.hauer at pengutronix.de> wrote:
>
> > The clock-frequency property is never read because the driver
>
> hmmm, but how qemu-malta works?
Probably qemu-malta has clk support disabled, so:
static inline struct clk *clk_get(struct device_d *dev, const char *id)
{
return NULL;
}
Which is a valid clk and the driver is happy. clk_get_rate(priv->clk)
returns 0 and the drivers continues with:
if (priv->plat.clock == 0 && IS_ENABLED(CONFIG_OFDEVICE)) {
struct device_node *np = dev->device_node;
of_property_read_u32(np, "clock-frequency", &priv->plat.clock);
}
Which will read the correct clock-frequency from the device tree.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list