mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1 v2] arm: add generic smp twd timer
Date: Thu, 4 Oct 2012 14:05:30 +0200	[thread overview]
Message-ID: <20121004120530.GJ26553@game.jcrosoft.org> (raw)
In-Reply-To: <20121004110653.GH1322@pengutronix.de>

On 13:06 Thu 04 Oct     , Sascha Hauer wrote:
> On Thu, Oct 04, 2012 at 12:55:35PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > on Cortex A9 and Cortex A5 we have a generic timer which we can use as
> > clocksource
> > 
> > Limit the timer frequency to < 25Mhz
> > 
> > +	return ~readl(twd_base + TWD_TIMER_COUNTER);
> > +}
> > +
> > +static struct clocksource smp_twd_clksrc = {
> > +	.read	= smp_twd_read,
> > +	.shift	= 20,
> > +	.mask	= CLOCKSOURCE_MASK(32),
> > +};
> > +
> > +#define SMP_TWD_MAX_FREQ (25 *1000 * 1000)
> > +
> > +static int smp_twd_probe(struct device_d *dev)
> > +{
> > +	u32 tick_rate;
> > +	u32 val;
> > +	int ret;
> > +	u32 presc = 0;
> > +
> > +	twd_clk = clk_get(dev, NULL);
> > +	if (IS_ERR(twd_clk)) {
> > +		ret = PTR_ERR(twd_clk);
> > +		dev_err(dev, "clock not found: %d\n", ret);
> 
> Still do you really really want to bloat the binary with such strings?
> This message will only ever be seen by developers. I would find it much
> more useful to turn this into dev_dbg and instead add a dev_err in the
> driver code when a device fails to probe. That would give a developer
> enough hints to know where to increase the debug level.
I try it and I forget to udpate the clock and really anoyed to do not see the
error message

for other drivers maybe but the clocksource is critical so clear error message
are madatory

and honestly here we save few bytes on a critical driver

and with the pbl it's even less

Best Regards,
J.

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

      reply	other threads:[~2012-10-04 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 10:55 Jean-Christophe PLAGNIOL-VILLARD
2012-10-04 11:06 ` Sascha Hauer
2012-10-04 12:05   ` Jean-Christophe PLAGNIOL-VILLARD [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=20121004120530.GJ26553@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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