From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: Xilinx: Adding timer support to the platform
Date: Tue, 8 Feb 2011 16:25:56 +0100 [thread overview]
Message-ID: <201102081625.57049.arnd@arndb.de> (raw)
In-Reply-To: <f3101c62-0bd1-4ad5-8ace-d81a1fd58890@VA3EHSMHS005.ehs.local>
On Tuesday 08 February 2011, John Linn wrote:
> > > +#define PERIPH_BASE 0xF8000000
> >
> > should be:
> >
> > #define PERIPH_BASE IOMEM(0xF8000000)
> >
> > But then in a different patch you do:
> > + .virtual = TTC0_BASE,
> > + .pfn = __phys_to_pfn(TTC0_BASE),
> >
> > So it's also used as a physical address. Yuck.
>
> I have been mapping everything flat (virt = phys) and I should have been
> clearer on that.
>
> It seems like there are two sets of #defines expected, virtual and
> physical, even if they are the same.
Yes, it quickly gets messy otherwise. Normally, you only need to specify
very few physical addresses, e.g. the start of each register window.
When you have separate defines for your virtual bases, you can also
make them type safe right away, like:
#define PERIPH_BASE_PHYS 0xf800000
#define PERIPH_BASE IOMEM(PERIPH_BASE_PHYS)
#define TCC0_BASE (PERIPH_BASE + 0xA0000)
#define TCC1_BASE (PERIPH_BASE + 0xB0000)
This way, you don't need to convert the types in driver code.
Arnd
next prev parent reply other threads:[~2011-02-08 15:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1296922124-23379-1-git-send-email-john.linn@xilinx.com>
2011-02-05 16:08 ` [PATCH 1/4] ARM: Xilinx: Adding Xilinx platform infrastructure support John Linn
2011-02-05 16:16 ` Russell King - ARM Linux
2011-02-05 16:20 ` [PATCH 1/4] ARM: Xilinx: Adding Xilinx platform infrastructuresupport John Linn
2011-02-05 16:20 ` John Linn
[not found] ` <1296922124-23379-2-git-send-email-john.linn@xilinx.com>
2011-02-05 16:08 ` [PATCH 2/4] ARM: Xilinx: Adding Xilinx board support John Linn
2011-02-05 16:18 ` Russell King - ARM Linux
2011-02-05 16:21 ` John Linn
2011-02-05 17:25 ` John Linn
2011-02-07 15:44 ` John Linn
2011-02-07 20:54 ` Russell King - ARM Linux
2011-02-07 20:55 ` John Linn
[not found] ` <1296922124-23379-3-git-send-email-john.linn@xilinx.com>
2011-02-05 16:08 ` [PATCH 3/4] ARM: Xilinx: Adding timer support to the platform John Linn
2011-02-05 16:36 ` Russell King - ARM Linux
2011-02-05 17:12 ` John Linn
2011-02-08 14:35 ` Russell King - ARM Linux
2011-02-08 15:06 ` John Linn
2011-02-08 15:25 ` Arnd Bergmann [this message]
2011-02-08 17:11 ` John Linn
2011-02-08 17:53 ` John Linn
2011-02-08 18:24 ` Arnd Bergmann
2011-02-08 18:31 ` Grant Likely
[not found] ` <1296922124-23379-4-git-send-email-john.linn@xilinx.com>
2011-02-05 16:08 ` [PATCH 4/4] ARM: Xilinx: base header files and assembly macros John Linn
2011-02-05 16:43 ` Russell King - ARM Linux
2011-02-05 17:19 ` John Linn
2011-02-08 0:14 ` John Linn
2011-02-08 8:27 ` Russell King - ARM Linux
2011-02-08 14:08 ` John Linn
2011-02-08 14:30 ` Russell King - ARM Linux
[not found] <1296922637-24662-1-git-send-email-john.linn@xilinx.com>
[not found] ` <1296922637-24662-2-git-send-email-john.linn@xilinx.com>
[not found] ` <1296922637-24662-3-git-send-email-john.linn@xilinx.com>
2011-02-05 16:17 ` [PATCH 3/4] ARM: Xilinx: Adding timer support to the platform John Linn
2011-02-05 16:17 ` John Linn
2011-02-06 1:03 ` Jamie Iles
2011-02-06 1:03 ` Jamie Iles
2011-02-07 14:16 ` John Linn
2011-02-07 14:16 ` John Linn
2011-02-07 14:58 ` Jamie Iles
2011-02-07 14:58 ` Jamie Iles
2011-02-07 15:01 ` John Linn
2011-02-07 15:01 ` John Linn
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=201102081625.57049.arnd@arndb.de \
--to=arnd@arndb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.