1*61961fe5Sjsg /* $OpenBSD: intc.h,v 1.8 2024/04/29 12:46:22 jsg Exp $ */ 28eda2d14Spatrick /* 38eda2d14Spatrick * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> 48eda2d14Spatrick * 58eda2d14Spatrick * Permission to use, copy, modify, and distribute this software for any 68eda2d14Spatrick * purpose with or without fee is hereby granted, provided that the above 78eda2d14Spatrick * copyright notice and this permission notice appear in all copies. 88eda2d14Spatrick * 98eda2d14Spatrick * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 108eda2d14Spatrick * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 118eda2d14Spatrick * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 128eda2d14Spatrick * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 138eda2d14Spatrick * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 148eda2d14Spatrick * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 158eda2d14Spatrick * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 168eda2d14Spatrick */ 178eda2d14Spatrick 188eda2d14Spatrick #ifndef _OMAPINTC_INTR_H_ 198eda2d14Spatrick #define _OMAPINTC_INTR_H_ 208eda2d14Spatrick 218eda2d14Spatrick #ifndef _LOCORE 228eda2d14Spatrick 238eda2d14Spatrick #include <arm/armreg.h> 248eda2d14Spatrick #include <arm/cpufunc.h> 258eda2d14Spatrick #include <machine/intr.h> 268eda2d14Spatrick #include <arm/softintr.h> 278eda2d14Spatrick 288eda2d14Spatrick #define SI_TO_IRQBIT(si) (1U<<(si)) 298eda2d14Spatrick void intc_setipl(int new); 308eda2d14Spatrick void intc_splx(int new); 318eda2d14Spatrick int intc_splraise(int ipl); 328eda2d14Spatrick int intc_spllower(int ipl); 338eda2d14Spatrick 348eda2d14Spatrick void intc_irq_handler(void *); 35789e88a4Spatrick void *intc_intr_establish(int irqno, int level, struct cpu_info *ci, 36789e88a4Spatrick int (*func)(void *), void *cookie, char *name); 378eda2d14Spatrick void intc_intr_disestablish(void *cookie); 388eda2d14Spatrick const char *intc_intr_string(void *cookie); 398eda2d14Spatrick 408eda2d14Spatrick #endif /* ! _LOCORE */ 418eda2d14Spatrick 428eda2d14Spatrick #endif /* _OMAPINTC_INTR_H_ */ 438eda2d14Spatrick 44