9 #include <linux/module.h>
62 #define SPI_ERR_MASK (BIT_STAT_TXCOL | BIT_STAT_RBSY | BIT_STAT_MODF | BIT_STAT_TXE)
63 #define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF)
64 #define PPI_ERR_MASK (0xFFFF & ~FLD)
65 #define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE)
66 #define UART_ERR_MASK (0x6)
67 #define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF)
69 static int error_int_mask;
71 static void bf537_generic_error_mask_irq(
struct irq_data *
d)
78 static void bf537_generic_error_unmask_irq(
struct irq_data *
d)
84 static struct irq_chip bf537_generic_error_irqchip = {
87 .irq_mask_ack = bf537_generic_error_mask_irq,
88 .irq_mask = bf537_generic_error_mask_irq,
89 .irq_unmask = bf537_generic_error_unmask_irq,
92 static void bf537_demux_error_irq(
unsigned int int_err_irq,
97 #if (defined(CONFIG_BF537) || defined(CONFIG_BF536))
126 #if (defined(CONFIG_BF537) || defined(CONFIG_BF536))
152 " MASKED PERIPHERAL ERROR INTERRUPT ASSERTED\n",
156 pr_err(
"%s: IRQ ?: PERIPHERAL ERROR INTERRUPT ASSERTED BUT NO SOURCE FOUND\n",
161 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
162 static int mac_rx_int_mask;
164 static void bf537_mac_rx_mask_irq(
struct irq_data *
d)
167 if (!mac_rx_int_mask)
171 static void bf537_mac_rx_unmask_irq(
struct irq_data *d)
177 static struct irq_chip bf537_mac_rx_irqchip = {
180 .irq_mask_ack = bf537_mac_rx_mask_irq,
181 .irq_mask = bf537_mac_rx_mask_irq,
182 .irq_unmask = bf537_mac_rx_unmask_irq,
185 static void bf537_demux_mac_rx_irq(
unsigned int int_irq,
199 #if defined(CONFIG_BF537) || defined(CONFIG_BF536)
206 irq_set_chip_and_handler(irq, &bf537_generic_error_irqchip,
209 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)