2019-12-31 16:06:20 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* arch/risc-v/include/k210/irq.h
|
|
|
|
*
|
2021-03-12 05:01:43 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2019-12-31 16:06:20 +01:00
|
|
|
*
|
2021-03-12 05:01:43 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2019-12-31 16:06:20 +01:00
|
|
|
*
|
2021-03-12 05:01:43 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2019-12-31 16:06:20 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ARCH_RISCV_INCLUDE_K210_IRQ_H
|
|
|
|
#define __ARCH_RISCV_INCLUDE_K210_IRQ_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <arch/irq.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Map RISC-V exception code to NuttX IRQ */
|
|
|
|
|
2020-01-10 15:04:41 +01:00
|
|
|
#ifdef CONFIG_K210_WITH_QEMU
|
2022-01-20 15:09:24 +01:00
|
|
|
#define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 4)
|
2020-01-10 15:04:41 +01:00
|
|
|
#else
|
2022-01-20 15:09:24 +01:00
|
|
|
#define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 33)
|
2020-01-10 15:04:41 +01:00
|
|
|
#endif
|
2019-12-31 16:06:20 +01:00
|
|
|
|
|
|
|
/* Total number of IRQs */
|
|
|
|
|
2022-01-20 15:09:24 +01:00
|
|
|
#define NR_IRQS (K210_IRQ_UART0 + 1)
|
2019-12-31 16:06:20 +01:00
|
|
|
|
|
|
|
#endif /* __ARCH_RISCV_INCLUDE_K210_IRQ_H */
|