Skip to content

Commit

Permalink
drivers: gic: use DT bindings
Browse files Browse the repository at this point in the history
Use DT bindings GIC_PPI and GIC_SIP instead of 1 and 0 raw values.

Acked-by: Jerome Forissier <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Nov 21, 2023
1 parent e43c72b commit 9a670cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/drivers/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <arm.h>
#include <assert.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <config.h>
#include <compiler.h>
#include <drivers/gic.h>
Expand Down Expand Up @@ -208,10 +209,10 @@ static int gic_dt_get_irq(const uint32_t *properties, int count, uint32_t *type,
it_num = fdt32_to_cpu(properties[1]);

switch (fdt32_to_cpu(properties[0])) {
case 1:
case GIC_PPI:
it_num += 16;
break;
case 0:
case GIC_SPI:
it_num += 32;
break;
default:
Expand Down

0 comments on commit 9a670cd

Please sign in to comment.