linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: Correct offset in OMAP4_WKUP_IOPAD macro
Date: Fri, 9 May 2014 09:07:26 -0700	[thread overview]
Message-ID: <20140509160725.GG17814@atomide.com> (raw)
In-Reply-To: <CAGhQ9Vw+cR-cKQ-w3psZPOWOqwugntXq-9g5=4cZV-ijQZecTQ@mail.gmail.com>

* Joachim Eastwood <manabian@gmail.com> [140509 05:58]:
> On 6 May 2014 02:12, Tony Lindgren <tony@atomide.com> wrote:
> >
> > OK sorry just noticed you're using it already while was about to
> > apply your patches. Care to update that series again to not use the
> > macro, or by adding the offsets?
> 
> hm, I'd rather add offsets than remove the macro's now.
> 
> How about we introduce a mask parameter in to the OMAP_IOPAD_OFFSET macro?
> Something like this:
> #define OMAP_IOPAD_OFFSET(pa, offset, mask) (((pa) & mask) - ((offset) & mask))
> 
> #define OMAP4_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0040, 0xfff) (val)
> 
> #define OMAP4_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0xe040, 0xfff) (val)
> 
> Of course we need to fix the other users as well.

I was thinking that too initially, but then we would have macros that behave
in a different way:

1. Calculate the iopad offset from the iopad register area start based on
   the iopad physical address

2. Calculate the iopad offset from the iopad register area start based on
   the iopadd offset from the driver base address

> One other possibility is to use my original patch in this mail or just
> create a OMAP4_IOPAD with offset 0x040 which will on OMAP4 work for
> both core and wkup.

That also makes the macro behave in a different way depending on the
SoC which is not nice.
 
> What do you think?

I think it's best to add some new macros to avoid confusion.

Regards,

Tony

  reply	other threads:[~2014-05-09 16:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 16:14 [PATCH] ARM: dts: Correct offset in OMAP4_WKUP_IOPAD macro Joachim Eastwood
2014-04-19 16:25 ` Joachim Eastwood
2014-04-21 15:35   ` Tony Lindgren
2014-04-21 16:12     ` Joachim Eastwood
2014-04-21 16:16       ` Joachim Eastwood
2014-05-06  0:12         ` Tony Lindgren
2014-05-09 12:57           ` Joachim Eastwood
2014-05-09 16:07             ` Tony Lindgren [this message]
2014-05-11 17:27               ` Joachim Eastwood
2014-05-12 16:16                 ` Tony Lindgren
2014-05-12 16:26                   ` Joachim Eastwood
2014-05-12 16:36                     ` Tony Lindgren

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=20140509160725.GG17814@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manabian@gmail.com \
    /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).