Re: [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc codeto add support for i.MX5

From: Russell King - ARM Linux
Date: Fri Dec 04 2009 - 05:43:25 EST


On Fri, Dec 04, 2009 at 04:47:03AM +0200, Amit Kucheria wrote:
> +#elif defined CONFIG_MXC_TZIC
> + @ Load offset & priority of the highest priority
> + @ interrupt pending.
> + @ 0xD80 is HIPND0 register
> + ldr \irqnr, =0
> + ldr \irqstat, =0x0D80

Both these constants can be loaded by a 'mov' instruction.

> +1000:
> + ldr \tmp, [\irqstat, \base]
> + cmp \tmp, #0
> + bne 1001f
> + addeq \irqnr, \irqnr, #32
> + addeq \irqstat, \irqstat, #4
> + cmp \irqnr, #128
> + blo 1000b
> + b 2001f
> +1001: ldr \irqstat, =1

mov \irqstat, #1

> +1002: tst \tmp, \irqstat
> + bne 2002f
> + movs \tmp, \tmp, lsr #1
> + addne \irqnr, \irqnr, #1
> + bne 1002b
> +2001:
> + ldr \irqnr, =0

mov \irqnr, #0

would be better.

> diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
> index 844567e..97fb590 100644
> --- a/arch/arm/plat-mxc/time.c
> +++ b/arch/arm/plat-mxc/time.c
> @@ -25,6 +25,7 @@
> #include <linux/irq.h>
> #include <linux/clockchips.h>
> #include <linux/clk.h>
> +#include <linux/delay.h>

What is the reason for adding this include?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/