* [PATCH 1/2] ARM: sa1100: add missing include of linux/io.h @ 2012-07-07 8:48 Arnd Bergmann 2012-07-07 8:55 ` [PATCH 2/2] irda/pxa: Arnd Bergmann 2012-07-07 9:06 ` [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann 0 siblings, 2 replies; 5+ messages in thread From: Arnd Bergmann @ 2012-07-07 8:48 UTC (permalink / raw) To: linux-arm-kernel After c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", pleb_defconfig produces this new warning: arch/arm/mach-sa1100/cpu-sa1100.c: In function 'sa1100_update_dram_timings': arch/arm/mach-sa1100/cpu-sa1100.c:153:3: error: implicit declaration of function 'IOMEM' Adding linux/io.h to the file using the __REG() macro avoids the warning. In the long run, we still need to convert the entire file to use readl/writel rather than directly derefencing the pointer, but this makes it compile again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 19b2053..e8f4d1e 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c @@ -87,6 +87,7 @@ #include <linux/types.h> #include <linux/init.h> #include <linux/cpufreq.h> +#include <linux/io.h> #include <asm/cputype.h> ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] irda/pxa: 2012-07-07 8:48 [PATCH 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann @ 2012-07-07 8:55 ` Arnd Bergmann 2012-07-07 9:41 ` David Miller 2012-07-07 9:06 ` [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann 1 sibling, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2012-07-07 8:55 UTC (permalink / raw) To: linux-arm-kernel After c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", magician_defconfig and a few others fail to build because the OSCR register is accessed by the drivers/net/irda/pxaficp_ir.c but has turned into a pointer that needs to be read using readl. There are other registers in the same driver that eventually should be converted, and it's unclear whether we would want a better interface to access the OSCR from a device driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- This patch should be applied to Russell's ARM tree which contains the patch that broke it, Cc to netdev for information and Acks. diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index ff16daf..8d54767 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c @@ -289,7 +289,7 @@ static irqreturn_t pxa_irda_sir_irq(int irq, void *dev_id) } lsr = STLSR; } - si->last_oscr = OSCR; + si->last_oscr = readl_relaxed(OSCR); break; case 0x04: /* Received Data Available */ @@ -300,7 +300,7 @@ static irqreturn_t pxa_irda_sir_irq(int irq, void *dev_id) dev->stats.rx_bytes++; async_unwrap_char(dev, &dev->stats, &si->rx_buff, STRBR); } while (STLSR & LSR_DR); - si->last_oscr = OSCR; + si->last_oscr = readl_relaxed(OSCR); break; case 0x02: /* Transmit FIFO Data Request */ @@ -316,7 +316,7 @@ static irqreturn_t pxa_irda_sir_irq(int irq, void *dev_id) /* We need to ensure that the transmitter has finished. */ while ((STLSR & LSR_TEMT) == 0) cpu_relax(); - si->last_oscr = OSCR; + si->last_oscr = readl_relaxed(OSCR); /* * Ok, we've finished transmitting. Now enable @@ -370,7 +370,7 @@ static void pxa_irda_fir_dma_tx_irq(int channel, void *data) while (ICSR1 & ICSR1_TBY) cpu_relax(); - si->last_oscr = OSCR; + si->last_oscr = readl_relaxed(OSCR); /* * HACK: It looks like the TBY bit is dropped too soon. @@ -470,7 +470,7 @@ static irqreturn_t pxa_irda_fir_irq(int irq, void *dev_id) /* stop RX DMA */ DCSR(si->rxdma) &= ~DCSR_RUN; - si->last_oscr = OSCR; + si->last_oscr = readl_relaxed(OSCR); icsr0 = ICSR0; if (icsr0 & (ICSR0_FRE | ICSR0_RAB)) { @@ -546,7 +546,7 @@ static int pxa_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) skb_copy_from_linear_data(skb, si->dma_tx_buff, skb->len); if (mtt) - while ((unsigned)(OSCR - si->last_oscr)/4 < mtt) + while ((unsigned)(readl_relaxed(OSCR) - si->last_oscr)/4 < mtt) cpu_relax(); /* stop RX DMA, disable FICP */ ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] irda/pxa: 2012-07-07 8:55 ` [PATCH 2/2] irda/pxa: Arnd Bergmann @ 2012-07-07 9:41 ` David Miller 0 siblings, 0 replies; 5+ messages in thread From: David Miller @ 2012-07-07 9:41 UTC (permalink / raw) To: linux-arm-kernel From: Arnd Bergmann <arnd@arndb.de> Date: Sat, 7 Jul 2012 08:55:15 +0000 > After c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", > magician_defconfig and a few others fail to build because the OSCR > register is accessed by the drivers/net/irda/pxaficp_ir.c but has turned > into a pointer that needs to be read using readl. > > There are other registers in the same driver that eventually should > be converted, and it's unclear whether we would want a better interface > to access the OSCR from a device driver. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > This patch should be applied to Russell's ARM tree which contains the > patch that broke it, Cc to netdev for information and Acks. Acked-by: David S. Miller <davem@davemloft.net> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h 2012-07-07 8:48 [PATCH 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann 2012-07-07 8:55 ` [PATCH 2/2] irda/pxa: Arnd Bergmann @ 2012-07-07 9:06 ` Arnd Bergmann 2012-07-07 11:31 ` Russell King - ARM Linux 1 sibling, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2012-07-07 9:06 UTC (permalink / raw) To: linux-arm-kernel After c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", multiple defconfig files produce this new warning: arch/arm/mach-sa1100/cpu-sa1100.c: In function 'sa1100_update_dram_timings': arch/arm/mach-sa1100/cpu-sa1100.c:153:3: error: implicit declaration of function 'IOMEM' Adding linux/io.h to the file using the __REG() macro avoids the warning. In the long run, we still need to convert all register accesses to use readl/writel rather than directly derefencing the pointer, but this makes it compile again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- v2: actually fix all call sites, rather than just the first one We might want to put the #include directly into mach/SA-1100.h instead, to be on the safe side. diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 19b2053..e8f4d1e 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c @@ -87,6 +87,7 @@ #include <linux/types.h> #include <linux/init.h> #include <linux/cpufreq.h> +#include <linux/io.h> #include <asm/cputype.h> diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index b412fc0..7f07f08 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c @@ -18,6 +18,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/sched.h> +#include <linux/io.h> #include <mach/hardware.h> #include <mach/jornada720.h> diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c index a51830c..50a5b14 100644 --- a/arch/arm/mach-sa1100/leds-lart.c +++ b/arch/arm/mach-sa1100/leds-lart.c @@ -10,6 +10,7 @@ * pace of the LED. */ #include <linux/init.h> +#include <linux/io.h> #include <mach/hardware.h> #include <asm/leds.h> diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index d9be6ea..7f03d1bd 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c @@ -19,6 +19,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/io.h> #include <mach/hardware.h> #include <mach/jornada720.h> diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c index decb347..56ab739 100644 --- a/drivers/pcmcia/sa1100_shannon.c +++ b/drivers/pcmcia/sa1100_shannon.c @@ -8,6 +8,7 @@ #include <linux/kernel.h> #include <linux/device.h> #include <linux/init.h> +#include <linux/io.h> #include <mach/hardware.h> #include <asm/mach-types.h> ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h 2012-07-07 9:06 ` [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann @ 2012-07-07 11:31 ` Russell King - ARM Linux 0 siblings, 0 replies; 5+ messages in thread From: Russell King - ARM Linux @ 2012-07-07 11:31 UTC (permalink / raw) To: linux-arm-kernel On Sat, Jul 07, 2012 at 09:06:25AM +0000, Arnd Bergmann wrote: > After c00184f9ab4 "ARM: sa11x0/pxa: convert OS timer registers to IOMEM", > multiple defconfig files produce this new warning: > > arch/arm/mach-sa1100/cpu-sa1100.c: In function 'sa1100_update_dram_timings': > arch/arm/mach-sa1100/cpu-sa1100.c:153:3: error: implicit declaration of function 'IOMEM' > > Adding linux/io.h to the file using the __REG() macro avoids the warning. > In the long run, we still need to convert all register accesses to use > readl/writel rather than directly derefencing the pointer, but this makes > it compile again. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > v2: actually fix all call sites, rather than just the first one > > We might want to put the #include directly into mach/SA-1100.h > instead, to be on the safe side. I'd prefer not to. If you want to get this into the patch system, I'll merge it into c00184f9ab4. Ditto for the second patch too. > diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c > index 19b2053..e8f4d1e 100644 > --- a/arch/arm/mach-sa1100/cpu-sa1100.c > +++ b/arch/arm/mach-sa1100/cpu-sa1100.c > @@ -87,6 +87,7 @@ > #include <linux/types.h> > #include <linux/init.h> > #include <linux/cpufreq.h> > +#include <linux/io.h> > > #include <asm/cputype.h> > > diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c > index b412fc0..7f07f08 100644 > --- a/arch/arm/mach-sa1100/jornada720_ssp.c > +++ b/arch/arm/mach-sa1100/jornada720_ssp.c > @@ -18,6 +18,7 @@ > #include <linux/module.h> > #include <linux/platform_device.h> > #include <linux/sched.h> > +#include <linux/io.h> > > #include <mach/hardware.h> > #include <mach/jornada720.h> > diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c > index a51830c..50a5b14 100644 > --- a/arch/arm/mach-sa1100/leds-lart.c > +++ b/arch/arm/mach-sa1100/leds-lart.c > @@ -10,6 +10,7 @@ > * pace of the LED. > */ > #include <linux/init.h> > +#include <linux/io.h> > > #include <mach/hardware.h> > #include <asm/leds.h> > diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c > index d9be6ea..7f03d1bd 100644 > --- a/drivers/input/touchscreen/jornada720_ts.c > +++ b/drivers/input/touchscreen/jornada720_ts.c > @@ -19,6 +19,7 @@ > #include <linux/interrupt.h> > #include <linux/module.h> > #include <linux/slab.h> > +#include <linux/io.h> > > #include <mach/hardware.h> > #include <mach/jornada720.h> > diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c > index decb347..56ab739 100644 > --- a/drivers/pcmcia/sa1100_shannon.c > +++ b/drivers/pcmcia/sa1100_shannon.c > @@ -8,6 +8,7 @@ > #include <linux/kernel.h> > #include <linux/device.h> > #include <linux/init.h> > +#include <linux/io.h> > > #include <mach/hardware.h> > #include <asm/mach-types.h> > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-07 11:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-07 8:48 [PATCH 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann 2012-07-07 8:55 ` [PATCH 2/2] irda/pxa: Arnd Bergmann 2012-07-07 9:41 ` David Miller 2012-07-07 9:06 ` [PATCH v2 1/2] ARM: sa1100: add missing include of linux/io.h Arnd Bergmann 2012-07-07 11:31 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox