Re: [PATCH 04/12] ARM: sa1100/pxa: fix MTD_XIP build

From: Robert Jarzmik
Date: Sun Jul 23 2017 - 11:53:38 EST


Arnd Bergmann <arnd@xxxxxxxx> writes:

Hi Arnd,

> -#define xip_irqpending() (ICIP & ICMR)
> +/* restored July 2017, this did not build since 2011! */
> +
> +#define ICIP io_p2v(0x40d00000)
> +#define ICMR io_p2v(0x40d00004)
Okay, I suppose the IO mapping is guaranteed to work, ie. io_p2v() is behaving
correctly when xip_irqpending() is used, right ? I'm not challenging this, I'm
just ensuring this _could_ work (if anybody had the silly idea to make it work
again, and I admit I don't have that much courage).

> +#define xip_irqpending() readl(ICIP) & readl(ICMR)
This is not strictly equivalent to (ICIP & ICMR), I would have put for priority
reasons :
+#define xip_irqpending() (readl(ICIP) & readl(ICMR))

..zip..

Cheers.

--
Robert