30 Mar 2005 06:19
[PATCH] ppc32: CPM2 PIC cleanup irq_to_siubit array (updated)
Kumar Gala <galak <at> freescale.com>
2005-03-30 04:19:17 GMT
2005-03-30 04:19:17 GMT
Andrew,
(Updated this patch to include a comment at Dan Malek's request.)
Cleaned up irq_to_siubit array so we no longer need to do 1 << (31-bit),
just 1 << bit.
Signed-off-by: Kumar Gala <kumar.gala <at> freescale.com>
---
diff -Nru a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c
--- a/arch/ppc/syslib/cpm2_pic.c 2005-03-29 22:15:24 -06:00
+++ b/arch/ppc/syslib/cpm2_pic.c 2005-03-29 22:15:24 -06:00
<at> <at> -32,15 +32,17 <at> <at>
0, 0, 0, 0, 0, 0, 0, 0
};
+/* bit numbers do not match the docs, these are precomputed so the bit for
+ * a given irq is (1 << irq_to_siubit[irq]) */
static u_char irq_to_siubit[] = {
- 31, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30,
- 29, 30, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 31,
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 15, 14, 13, 12, 11, 10, 9, 8,
- 7, 6, 5, 4, 3, 2, 1, 0
+ 0, 15, 14, 13, 12, 11, 10, 9,
(Continue reading)
>
> Thanks.
>
>
>
> -- Dan
RSS Feed