m4.h 1000 Bytes
Newer Older
Angus Ainslie's avatar
Angus Ainslie committed
1 2 3 4 5
/*
 * Copyright (C) 2018 Purism
 *
 * SPDX-License-Identifier:     GPL-3.0+
 */
6 7 8 9 10 11 12
#ifndef __M4_H__
#define __M4_H_

#define NIRQ	256

#if !defined( __ASSEMBLER__ )

Angus Ainslie's avatar
Angus Ainslie committed
13 14 15 16 17
#include "usdhc.h"
#include "uart.h"
#include "spi.h"
#include "timer.h"

18 19 20 21 22 23
static void (*cortexM4_irq_table[])(void);

struct irq_vector {
        int irq_num;
        void *func;
};
Angus Ainslie's avatar
Angus Ainslie committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
 
struct irq_vector irq_vectors[] = {
        { USDHC1_INTR, usdhc1_isr },
        { USDHC2_INTR, usdhc2_isr },
        { UART1_INTR, uart1_isr },
        { UART2_INTR, uart2_isr },
        { UART3_INTR, uart3_isr },
        { UART4_INTR, uart4_isr },
        { TIMER1_INTR, timer1_isr },
        { TIMER2_INTR, timer2_isr },
        { TIMER3_INTR, timer3_isr },
        { TIMER4_INTR, timer4_isr },
        { TIMER5_INTR, timer5_isr },
        { TIMER6_INTR, timer6_isr },
        { ECSPI1_INTR, ecspi1_isr },
        { ECSPI2_INTR, ecspi2_isr },
        { ECSPI3_INTR, ecspi3_isr },
        { 0, 0 }
};
43 44 45

#endif /* __ASSEMBLER__ */
#endif /* __M4_H__ */