kernel/arm64: reuse existing GICv2 driver
Change-Id: I68d6978d1f4c3bf8d5d53674f794948a9771729b Reviewed-on: https://review.haiku-os.org/c/haiku/+/5276 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
6a1f97581f
commit
1eeb7213db
@ -23,7 +23,7 @@ KernelMergeObject kernel_arch_arm64.o :
|
||||
arch_real_time_clock.cpp
|
||||
arch_platform.cpp
|
||||
arch_asm.S
|
||||
|
||||
arch_int_gicv2.cpp
|
||||
soc.cpp
|
||||
|
||||
VMSAv8TranslationMap.cpp
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "arch_int_gicv2.h"
|
||||
|
||||
#define TRACE_ARCH_INT
|
||||
#ifdef TRACE_ARCH_INT
|
||||
@ -36,12 +37,18 @@
|
||||
void
|
||||
arch_int_enable_io_interrupt(int irq)
|
||||
{
|
||||
InterruptController *ic = InterruptController::Get();
|
||||
if (ic != NULL)
|
||||
ic->EnableInterrupt(irq);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_int_disable_io_interrupt(int irq)
|
||||
{
|
||||
InterruptController *ic = InterruptController::Get();
|
||||
if (ic != NULL)
|
||||
ic->DisableInterrupt(irq);
|
||||
}
|
||||
|
||||
|
||||
@ -64,6 +71,16 @@ arch_int_init(kernel_args *args)
|
||||
status_t
|
||||
arch_int_init_post_vm(kernel_args *args)
|
||||
{
|
||||
InterruptController *ic = NULL;
|
||||
if (strcmp(args->arch_args.interrupt_controller.kind, INTC_KIND_GICV2) == 0) {
|
||||
ic = new(std::nothrow) GICv2InterruptController(
|
||||
args->arch_args.interrupt_controller.regs1.start,
|
||||
args->arch_args.interrupt_controller.regs2.start);
|
||||
}
|
||||
|
||||
if (ic == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user