Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/cortex add helper macros.



details:   https://anonhg.NetBSD.org/src/rev/6e9527cd97a5
branches:  trunk
changeset: 328603:6e9527cd97a5
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Apr 09 16:59:53 2014 +0000

description:
add helper macros.

diffstat:

 sys/arch/arm/cortex/gic_intr.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r b09a67ad4541 -r 6e9527cd97a5 sys/arch/arm/cortex/gic_intr.h
--- a/sys/arch/arm/cortex/gic_intr.h    Wed Apr 09 16:29:08 2014 +0000
+++ b/sys/arch/arm/cortex/gic_intr.h    Wed Apr 09 16:59:53 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gic_intr.h,v 1.1 2012/09/01 00:03:14 matt Exp $        */
+/*     $NetBSD: gic_intr.h,v 1.2 2014/04/09 16:59:53 matt Exp $        */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -47,6 +47,11 @@
 #error PIC_MAXMAXSOURCES needs to be defined
 #endif
 
+#define IRQ_SGI(n)             ( 0 + ((n) & 15))
+#define IRQ_PPI(n)             (16 + ((n) & 15))
+#define IRQ_SPI(n)             (32 + (n))
+#define GIC_MAXSOURCES(n)      IRQ_SPI(n)
+
 void armgic_irq_handler(void *);
 
 #include <arm/pic/picvar.h>



Home | Main Index | Thread Index | Old Index