2 * Copyright (C) 2006 Atmel Corporation
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm/sysreg.h>
10 int interrupt_init(void)
15 void enable_interrupts(void)
17 asm volatile("csrf %0" : : "n"(SYSREG_GM_OFFSET));
20 int disable_interrupts(void)
25 asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET));
27 #ifdef CONFIG_AT32UC3A0xxx
28 /* Two NOPs are required after masking interrupts on the
29 * AT32UC3A0512ES. See errata 41.4.5.5. */
34 return !SYSREG_BFEXT(GM, sr);