[rtems commit] bsps/arm: Fix some GIC functions
Sebastian Huber
sebh at rtems.org
Thu Jun 20 08:10:00 UTC 2013
Module: rtems
Branch: master
Commit: cddb8f4a45fffdf76a61724e83f3cd3c15c338a5
Changeset: http://git.rtems.org/rtems/commit/?id=cddb8f4a45fffdf76a61724e83f3cd3c15c338a5
Author: Ric Claus <claus at slac.stanford.edu>
Date: Thu Jun 20 09:48:27 2013 +0200
bsps/arm: Fix some GIC functions
---
c/src/lib/libbsp/arm/shared/include/arm-gic.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-gic.h b/c/src/lib/libbsp/arm/shared/include/arm-gic.h
index ff5eee5..a336bfa 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-gic.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-gic.h
@@ -127,7 +127,8 @@ static inline gic_trigger_mode gic_id_get_trigger_mode(
uint32_t o = GIC_ID_TO_TWO_BITS_REG_OFFSET(id) + 1;
uint32_t bit = 1U << o;
- return dist->icdicfr[i] & bit;
+ return (dist->icdicfr[i] & bit) != 0 ?
+ GIC_EDGE_TRIGGERED : GIC_LEVEL_SENSITIVE;
}
static inline void gic_id_set_trigger_mode(
@@ -162,7 +163,7 @@ static inline gic_handling_model gic_id_get_handling_model(
uint32_t o = GIC_ID_TO_TWO_BITS_REG_OFFSET(id);
uint32_t bit = 1U << o;
- return dist->icdicfr[i] & bit;
+ return (dist->icdicfr[i] & bit) != 0 ? GIC_1_TO_N : GIC_N_TO_N;
}
static inline void gic_id_set_handling_model(
More information about the vc
mailing list