From e6dd8ec3f9e6d5ffaaeae7065be8a8085a8f4d35 Mon Sep 17 00:00:00 2001 From: visa Date: Thu, 6 Apr 2017 15:25:24 +0000 Subject: [PATCH] Extend the fdt interrupt API a little. --- sys/arch/octeon/dev/octeon_intr.c | 16 +++++++++++++++- sys/arch/octeon/include/intr.h | 10 +++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sys/arch/octeon/dev/octeon_intr.c b/sys/arch/octeon/dev/octeon_intr.c index b731c520805..536b9af1b8b 100644 --- a/sys/arch/octeon/dev/octeon_intr.c +++ b/sys/arch/octeon/dev/octeon_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_intr.c,v 1.19 2016/12/08 16:27:46 visa Exp $ */ +/* $OpenBSD: octeon_intr.c,v 1.20 2017/04/06 15:25:24 visa Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -151,6 +151,14 @@ octeon_intr_establish(int irq, int level, return (ih); } +void * +octeon_intr_establish_fdt(int node, int level, + int (*ih_fun)(void *), void *ih_arg, const char *ih_what) +{ + return octeon_intr_establish_fdt_idx(node, 0, level, ih_fun, + ih_arg, ih_what); +} + void * octeon_intr_establish_fdt_idx(int node, int idx, int level, int (*ih_fun)(void *), void *ih_arg, const char *ih_what) @@ -216,6 +224,12 @@ octeon_intr_disestablish(void *_ih) splx(s); /* causes hw mask update */ } +void +octeon_intr_disestablish_fdt(void *ih) +{ + octeon_intr_disestablish(ih); +} + void octeon_splx(int newipl) { diff --git a/sys/arch/octeon/include/intr.h b/sys/arch/octeon/include/intr.h index 2b1eb6a5e42..df8f86c2c1c 100644 --- a/sys/arch/octeon/include/intr.h +++ b/sys/arch/octeon/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.8 2016/12/08 16:27:46 visa Exp $ */ +/* $OpenBSD: intr.h,v 1.9 2017/04/06 15:25:24 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -202,11 +202,15 @@ void octeon_intr_init(void); void octeon_setintrmask(int); void *octeon_intr_establish(int, int, int (*)(void *), void *, const char *); -void *octeon_intr_establish_fdt_idx(int, int, int, int (*)(void *), - void *, const char *); void octeon_intr_disestablish(void *); void octeon_intr_init(void); +void *octeon_intr_establish_fdt(int, int, int (*)(void *), + void *, const char *); +void *octeon_intr_establish_fdt_idx(int, int, int, int (*)(void *), + void *, const char *); +void octeon_intr_disestablish_fdt(void *); + #endif /* _LOCORE */ #endif /* _MACHINE_INTR_H_ */ -- 2.20.1