From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: IMX5: cpuidle driver
Date: Wed, 16 Feb 2011 10:13:26 +0100 [thread overview]
Message-ID: <20110216091326.GD26437@pengutronix.de> (raw)
In-Reply-To: <AANLkTinj_8wqZ36TKdcx3L6CLaYyLD36ymFRq+KnyZXF@mail.gmail.com>
On Wed, Feb 16, 2011 at 09:37:47AM +0100, Yong Shen wrote:
> Hi Sascha,
>
>
> > > + local_irq_disable();
> > > + do_gettimeofday(&before);
> > > +
> > > + plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) &
> > > + ~(MXC_CORTEXA8_PLAT_LPC_DSM);
> >
> > One thing that strikes me here is the fact that this code can probably
> > run on i.MX53 aswell, right? It's only that these registers have
> > different addresses on i.MX53. The MXC_ prefix is therefore not a good
> > idea. Switching this to MX51_ and having an additional MX53_ register
> > leads to code duplication. This shows that it's a bad idea to code
> > fixed addresses in the code. We should go for base + offset instead
> > so that this code will have a better start on i.MX53. This of course
> > needs changes in the current crm_regs.h and probably in the i.MX51/53
> > clock code.
> >
> Yes, for mx53, it is similar.
> But for the case you are talking about, is it easier that we keep MXC_
> prefix in this file and define MXC_ to MX51 or MX53 in crm_regs.h according
> to which board is running?
I don't understand. How can we 'define' (which is compile time) to
something depending on the board (which is runtime)?
> In addition, registers for this code are not in one section, which means
> many BASEx + offset there, if I understand right. Do you have a sample for
> 'base + offset' case? since mx53 just came in, I am not sure about such
> case.
Forget it. I just realized that more or less by accident the virtual
addresses for the i.MX51 and i.MX53 are the same.
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 |
next prev parent reply other threads:[~2011-02-16 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 9:36 [PATCH v2 0/2] ARM: IMX5: cpuidle driver yong.shen at linaro.org
2011-02-11 9:36 ` [PATCH v2 1/2] " yong.shen at linaro.org
2011-02-15 18:27 ` Sascha Hauer
2011-02-16 8:02 ` Yong Shen
2011-02-17 8:18 ` Yong Shen
2011-02-17 10:54 ` Sascha Hauer
2011-02-20 14:58 ` Yong Shen
2011-02-23 15:41 ` [PATCH v3 " Yong Shen
2011-02-16 8:11 ` [PATCH v2 " Sascha Hauer
2011-02-16 8:37 ` Yong Shen
2011-02-16 9:13 ` Sascha Hauer [this message]
2011-02-16 9:25 ` Yong Shen
2011-02-11 9:36 ` [PATCH v2 2/2] ARM: IMX5 bbg: add cpuidle parameters yong.shen at linaro.org
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=20110216091326.GD26437@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).