From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] arm: versatile: enable PCI I/O space
Date: Tue, 20 Jul 2010 10:59:40 +0100 [thread overview]
Message-ID: <20100720095940.GA32702@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201007201123.38709.arnd@arndb.de>
On Tue, Jul 20, 2010 at 11:23:38AM +0200, Arnd Bergmann wrote:
> -/* macro to get at IO space when running virtually */
> +/* macro to get at MMIO space when running virtually */
> #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
>
> -#define __io_address(n) __io(IO_ADDRESS(n))
> +#define __io_address(n) __typesafe_io(IO_ADDRESS(n))
Hmm, that's not a scenario that I forsaw __typesafe_io() being used -
I'd prefer it to be restricted to only aliasing __io() to if it's
appropriate. Either add an IOMEM() definition or open-code the cast
here.
> diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h
> index f067c14..a276171 100644
> --- a/arch/arm/mach-versatile/include/mach/io.h
> +++ b/arch/arm/mach-versatile/include/mach/io.h
> @@ -20,9 +20,12 @@
> #ifndef __ASM_ARM_ARCH_IO_H
> #define __ASM_ARM_ARCH_IO_H
>
> -#define IO_SPACE_LIMIT 0xffffffff
> +#include <mach/hardware.h>
> +#include <mach/platform.h>
>
> -#define __io(a) __typesafe_io(a)
> +#define IO_SPACE_LIMIT (VERSATILE_PCI_MEM_BASE0_SIZE - 1)
> +
> +#define __io(a) (a + VERSATILE_PCI_VIRT_MEM_BASE0)
Not quite. Have a look at arch/arm/mach-footbridge/include/mach/io.h to
see how __io is defined there.
next prev parent reply other threads:[~2010-07-20 9:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 9:23 [RFC] arm: versatile: enable PCI I/O space Arnd Bergmann
2010-07-20 9:55 ` Colin Tuckley
2010-07-20 9:59 ` Russell King - ARM Linux [this message]
2010-07-20 11:09 ` Arnd Bergmann
2010-07-20 21:22 ` [PATCH v2] " Arnd Bergmann
2010-07-21 16:36 ` [PATCH] arm: remove __io() abuses Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2010-07-20 13:07 [RFC] arm: versatile: enable PCI I/O space Eric Miao
2010-07-20 21:12 ` Arnd Bergmann
2010-07-20 21:19 ` Russell King - ARM Linux
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=20100720095940.GA32702@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).