From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann To: Brian Norris Cc: David Woodhouse , linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Robert Jarzmik , Haojian Zhuang , Daniel Mack Subject: Re: [PATCH] mtd: only use __xipram annotation when XIP_KERNEL is set Date: Sat, 05 Mar 2016 01:24:36 +0100 Message-ID: <3582240.H8v1IXn8EB@wuerfel> In-Reply-To: <20160305001057.GC55664@google.com> References: <1453736525-1959191-2-git-send-email-arnd@arndb.de> <20160305000225.GB55664@google.com> <20160305001057.GC55664@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 04 March 2016 16:10:57 Brian Norris wrote: > 5d284e353eb1 ARM: pxa: avoid accessing interrupt registers directly= >=20 > CC drivers/mtd/chips/cfi_cmdset_0002.o > drivers/mtd/chips/cfi_cmdset_0002.c: In function =E2=80=98xip_udelay=E2= =80=99: > drivers/mtd/chips/cfi_cmdset_0002.c:962:35: warning: initialization m= akes integer from pointer without a cast [enabled by default] > drivers/mtd/chips/cfi_cmdset_0002.c:967:8: error: =E2=80=98ICIP=E2=80= =99 undeclared (first use in this function) > drivers/mtd/chips/cfi_cmdset_0002.c:967:8: note: each undeclared iden= tifier is reported only once for each function it appears in > drivers/mtd/chips/cfi_cmdset_0002.c:967:15: error: =E2=80=98ICMR=E2=80= =99 undeclared (first use in this function) > drivers/mtd/chips/cfi_cmdset_0002.c:981:123: error: invalid operands = to binary / (have =E2=80=98void *=E2=80=99 and =E2=80=98int=E2=80=99) > drivers/mtd/chips/cfi_cmdset_0002.c:982:14: warning: assignment makes= integer from pointer without a cast [enabled by default] > drivers/mtd/chips/cfi_cmdset_0002.c:984:124: error: invalid operands = to binary / (have =E2=80=98void *=E2=80=99 and =E2=80=98int=E2=80=99) > drivers/mtd/chips/cfi_cmdset_0002.c:1034:10: warning: assignment make= s integer from pointer without a cast [enabled by default] > drivers/mtd/chips/cfi_cmdset_0002.c:1045:118: error: invalid operands= to binary / (have =E2=80=98void *=E2=80=99 and =E2=80=98int=E2=80=99) >=20 > Looks like arch/arm/mach-pxa/include/mach/mtd-xip.h can't find ICIP o= r ICMR... >=20 Right, I also have a workaround for that one, but found later that it won't work. I think this is the patch that broke it five years ago: commit 5d284e353eb11ab2e8b1c5671ba06489b0bd1e0c Author: Eric Miao Date: Wed Apr 27 22:48:04 2011 +0800 ARM: pxa: avoid accessing interrupt registers directly =20 Signed-off-by: Eric Miao diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/arch/arm/mach= -pxa/include/mach/regs-intc.h deleted file mode 100644 index 662288eb6f95..000000000000 --- a/arch/arm/mach-pxa/include/mach/regs-intc.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __ASM_MACH_REGS_INTC_H -#define __ASM_MACH_REGS_INTC_H - -#include - -/* - * Interrupt Controller - */ - -#define ICIP __REG(0x40D00000) /* Interrupt Controller IRQ = Pending Register */ -#define ICMR __REG(0x40D00004) /* Interrupt Controller Mask= Register */ -#define ICLR __REG(0x40D00008) /* Interrupt Controller Leve= l Register */ -#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ = Pending Register */ -#define ICPR __REG(0x40D00010) /* Interrupt Controller Pend= ing Register */ -#define ICCR __REG(0x40D00014) /* Interrupt Controller Cont= rol Register */ -#define ICHP __REG(0x40D00018) /* Interrupt Controller High= est Priority Register */ and it's possible that nobody ever noticed... I guess we can bring back the macros for the case that MTD_XIP and XIP_= KERNEL are both enabled. =09Arnd