mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] serial: ns16550: Fix reading clock-frequency property
Date: Mon, 22 Jun 2015 11:53:27 +0200	[thread overview]
Message-ID: <20150622095327.GG6325@pengutronix.de> (raw)
In-Reply-To: <20150622123307.9b3137c2a1ff0608d0c7d655@gmail.com>

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@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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-06-22  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22  8:48 Sascha Hauer
2015-06-22  9:33 ` Antony Pavlov
2015-06-22  9:53   ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150622095327.GG6325@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox