Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:45

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup genmcf548x_interrupt
0007  *
0008  * @brief Interrupt definitions.
0009  */
0010 
0011 /*
0012  * Copyright (c) 2013 embedded brains GmbH & Co. KG
0013  *
0014  * Redistribution and use in source and binary forms, with or without
0015  * modification, are permitted provided that the following conditions
0016  * are met:
0017  * 1. Redistributions of source code must retain the above copyright
0018  *    notice, this list of conditions and the following disclaimer.
0019  * 2. Redistributions in binary form must reproduce the above copyright
0020  *    notice, this list of conditions and the following disclaimer in the
0021  *    documentation and/or other materials provided with the distribution.
0022  *
0023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0024  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0026  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0027  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0028  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0029  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0033  * POSSIBILITY OF SUCH DAMAGE.
0034  */
0035 
0036 #ifndef LIBBSP_M68K_MCF548X_IRQ_H
0037 #define LIBBSP_M68K_MCF548X_IRQ_H
0038 
0039 #include <rtems.h>
0040 #include <rtems/irq.h>
0041 #include <rtems/irq-extension.h>
0042 
0043 /**
0044  * @defgroup genmcf548x_interrupt Interrupt Support
0045  *
0046  * @ingroup RTEMSBSPsM68kGenMCF548X
0047  *
0048  * @brief Interrupt support.
0049  */
0050 
0051 
0052 #define MCF548X_IRQ_EPORT_EPF1 1
0053 #define MCF548X_IRQ_EPORT_EPF2 2
0054 #define MCF548X_IRQ_EPORT_EPF3 3
0055 #define MCF548X_IRQ_EPORT_EPF4 4
0056 #define MCF548X_IRQ_EPORT_EPF5 5
0057 #define MCF548X_IRQ_EPORT_EPF6 6
0058 #define MCF548X_IRQ_EPORT_EPF7 7
0059 #define MCF548X_IRQ_USB_EP0ISR 15
0060 #define MCF548X_IRQ_USB_EP1ISR 16
0061 #define MCF548X_IRQ_USB_EP2ISR 17
0062 #define MCF548X_IRQ_USB_EP3ISR 18
0063 #define MCF548X_IRQ_USB_EP4ISR 19
0064 #define MCF548X_IRQ_USB_EP5ISR 20
0065 #define MCF548X_IRQ_USB_EP6ISR 21
0066 #define MCF548X_IRQ_USB_ISR 22
0067 #define MCF548X_IRQ_USB_AISR 23
0068 #define MCF548X_IRQ_DSPI_RFOF_TFUF 25
0069 #define MCF548X_IRQ_DSPI_RFOF 26
0070 #define MCF548X_IRQ_DSPI_RFDF 27
0071 #define MCF548X_IRQ_DSPI_TFUF 28
0072 #define MCF548X_IRQ_DSPI_TCF 29
0073 #define MCF548X_IRQ_DSPI_TFFF 30
0074 #define MCF548X_IRQ_DSPI_EOQF 31
0075 #define MCF548X_IRQ_DSPI 25
0076 #define MCF548X_IRQ_PSC3 32
0077 #define MCF548X_IRQ_PSC2 33
0078 #define MCF548X_IRQ_PSC1 34
0079 #define MCF548X_IRQ_PSC0 35
0080 #define MCF548X_IRQ_PSC(i) (35 - (i))
0081 #define MCF548X_IRQ_COMMTIM 36
0082 #define MCF548X_IRQ_SEC 37
0083 #define MCF548X_IRQ_FEC1 38
0084 #define MCF548X_IRQ_FEC0 39
0085 #define MCF548X_IRQ_FEC(i) (39 - (i))
0086 #define MCF548X_IRQ_I2C 40
0087 #define MCF548X_IRQ_PCIARB 41
0088 #define MCF548X_IRQ_CBPCI 42
0089 #define MCF548X_IRQ_XLBPCI 43
0090 #define MCF548X_IRQ_XLBARB 47
0091 #define MCF548X_IRQ_DMA 48
0092 #define MCF548X_IRQ_CAN0_ERROR 49
0093 #define MCF548X_IRQ_CAN0_BUSOFF 50
0094 #define MCF548X_IRQ_CAN0_MBOR 51
0095 #define MCF548X_IRQ_SLT1 53
0096 #define MCF548X_IRQ_SLT0 54
0097 #define MCF548X_IRQ_CAN1_ERROR 55
0098 #define MCF548X_IRQ_CAN1_BUSOFF 56
0099 #define MCF548X_IRQ_CAN1_MBOR 57
0100 #define MCF548X_IRQ_GPT3 59
0101 #define MCF548X_IRQ_GPT2 60
0102 #define MCF548X_IRQ_GPT1 61
0103 #define MCF548X_IRQ_GPT0 62
0104 
0105 #define BSP_INTERRUPT_VECTOR_COUNT 64
0106 
0107 #define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
0108 
0109 static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
0110 {
0111   return 1 <= vector
0112     && vector < (rtems_vector_number) BSP_INTERRUPT_VECTOR_COUNT;
0113 }
0114 
0115 void mcf548x_interrupt_vector_install(rtems_vector_number vector);
0116 
0117 void mcf548x_interrupt_vector_remove(rtems_vector_number vector);
0118 
0119 #define bsp_interrupt_vector_install(v) mcf548x_interrupt_vector_install(v)
0120 
0121 #define bsp_interrupt_vector_remove(v) mcf548x_interrupt_vector_remove(v)
0122 
0123 #endif /* LIBBSP_M68K_MCF548X_IRQ_H */