From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ixp4xx: Add "ask" handler for timer interrupts
Date: Mon, 3 Dec 2012 23:40:10 +0000 [thread overview]
Message-ID: <201212032340.11053.arnd@arndb.de> (raw)
In-Reply-To: <1354456544.242756864@f360.mail.ru>
On Sunday 02 December 2012, Alexander Shiyan wrote:
> > > > -#define IXP4XX_EXP_REG(x) ((volatile u32 __iomem *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
> > > > +#define IXP4XX_EXP_REG(x) (IXP4XX_EXP_CFG_BASE_VIRT+(x))
> > > Modify this to:
> > > #define IXP4XX_EXP_REG(x) IOMEM(IXP4XX_EXP_CFG_BASE_VIRT+(x))
> > > to avoid compiler warnings.
> > >
> >
> > Hmm, not sure what went wrong here. Actually the definition of
> > IXP4XX_EXP_CFG_BASE_VIRT itself should use the IOMEM() macro, like
> > all the other IXP4XX_*_BASE_VIRT do.
>
> But without this is produce warnings:
> CC arch/arm/common/dmabounce.o
> In file included from arch/arm/mach-ixp4xx/include/mach/hardware.h:30,
> from arch/arm/mach-ixp4xx/include/mach/io.h:18,
> from /home/git/linux-next/arch/arm/include/asm/io.h:180,
> from include/linux/scatterlist.h:10,
> from include/linux/dma-mapping.h:9,
> from arch/arm/common/dmabounce.c:30:
> arch/arm/mach-ixp4xx/include/mach/cpu.h: In function 'ixp4xx_read_feature_bits':
> arch/arm/mach-ixp4xx/include/mach/cpu.h:41: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast
> arch/arm/mach-ixp4xx/include/mach/cpu.h: In function 'ixp4xx_write_feature_bits':
> arch/arm/mach-ixp4xx/include/mach/cpu.h:55: warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
>
I understand what the problem is, my point was that a better solution is to do
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
index c5bae9c..daf5c4e 100644
--- a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
+++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
@@ -65,7 +65,7 @@
* Expansion BUS Configuration registers
*/
#define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000
-#define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000
+#define IXP4XX_EXP_CFG_BASE_VIRT IOMEM(0xFEF14000)
#define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000
#define IXP4XX_EXP_CS0_OFFSET 0x00
instead of your suggested fix, because that matches how all the other _VIRT macros in that
file are defined. I found now that it was correct until recently, but b7b23db72f accidentally
broke it while fixing the MMIO location.
Arnd
next prev parent reply other threads:[~2012-12-03 23:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-01 7:33 [PATCH] ARM: ixp4xx: Add "ask" handler for timer interrupts Alexander Shiyan
2012-12-01 13:05 ` Jason Cooper
2012-12-01 13:14 ` Re[2]: " Alexander Shiyan
2012-12-01 15:41 ` Jason Cooper
2012-12-01 21:25 ` Arnd Bergmann
2012-12-01 21:45 ` Jason Cooper
2012-12-02 0:11 ` Arnd Bergmann
2012-12-02 6:02 ` Re[2]: " Alexander Shiyan
2012-12-02 13:13 ` Arnd Bergmann
2012-12-02 13:55 ` Re[4]: " Alexander Shiyan
2012-12-03 23:40 ` Arnd Bergmann [this message]
2012-12-02 8:09 ` [PATCH 1/2] ARM: ixp4xx: Moving the timer flags control in ixp4xx_irq_ack() procedure Alexander Shiyan
2012-12-02 8:09 ` [PATCH 2/2] ARM: ixp4xx: Using gpiolib rather than a private GPIO API Alexander Shiyan
2012-12-02 13:25 ` Arnd Bergmann
2012-12-02 13:24 ` [PATCH 1/2] ARM: ixp4xx: Moving the timer flags control in ixp4xx_irq_ack() procedure Arnd Bergmann
2012-12-02 13:37 ` Mikael Pettersson
2012-12-02 13:50 ` Re[2]: " Alexander Shiyan
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=201212032340.11053.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.