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 19:24:37 +0100 [thread overview]
Message-ID: <201102081924.37654.arnd@arndb.de> (raw)
In-Reply-To: <99854086-e4ef-4940-a454-5f3a43caaf3a@VA3EHSMHS003.ehs.local>
On Tuesday 08 February 2011 18:53:50 John Linn wrote:
> Maybe I'm being dense here, just wanting to be clear.
>
> But that still doesn't provide physical addresses for each device like
> you would need to put in the resources
> for platform devices.
No, you're right. If you want to have them in proper resource
structures, you need the physical addresses as unsigned long
numbers, not the virtual address pointers.
> Do you just cast them back to an integer then?
No, you certainly never do that, it would be a clear
violation of the type system. You should assume that
physical and virtual addresses are different, and never
build any driver code under the assumption that the
virtual addresses are fixed (except perhaps the PCI
PIO window).
My personal recommendation would be to either put the
physical address into the resource structure and have
the driver ioremap the registers, or to map the entire
registers at boot time, and have the driver use the
hardcoded values while ignoring the resources.
The ioremap approach is more flexible, in particular when
you build a kernel that can have the devices at varying
locations, but it doesn't work for all the low-level devices
that you might need to talk to before the MMU code is
fully initialized, such as timers and interrupt controllers.
Arnd
next prev parent reply other threads:[~2011-02-08 18:24 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
2011-02-08 17:11 ` John Linn
2011-02-08 17:53 ` John Linn
2011-02-08 18:24 ` Arnd Bergmann [this message]
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=201102081924.37654.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.