1 /****************************************************************************** 2 * Copyright (c) 2022 Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") 3 * All rights reserved. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 *****************************************************************************/ 18 19 #ifndef _SOC_H 20 #define _SOC_H 21 22 #include "soc_common.h" 23 24 /* 25 * Get the response interrupt number via mcause. 26 * id = mcause & MCAUSE_INT_ID_MASK 27 */ 28 #define MCAUSE_INT_ID_MASK 0x7FFFFFF 29 #define MTIMERCMP 0xE6000008 30 #define MTIMER 0xE6000000 31 32 #define RISCV_SYS_MAX_IRQ 11 33 34 /* 35 * Because of strange implementation of los_interrupt.c in kernel sum of 36 * (RISCV_SYS_MAX_IRQ + RISCV_PLIC_VECTOR_CNT) should be at least 25 37 */ 38 #define RISCV_PLIC_VECTOR_CNT 14 39 40 #endif 41