1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | /* * Copyright 2007-2008 Analog Devices Inc. * * Licensed under the GPL-2 or later. * * Set up the interrupt priorities */ #include <linux/module.h> #include <linux/irq.h> #include <asm/blackfin.h> void __init program_IAR(void) { /* Program the IAR0 Register with the configured priority */ bfin_write_SIC_IAR0((([31mCONFIG_IRQ_PLL_WAKEUP[0m - 7) << IRQ_PLL_WAKEUP_POS) | (([31mCONFIG_IRQ_DMAC0_ERR[0m - 7) << IRQ_DMAC0_ERR_POS) | (([31mCONFIG_IRQ_EPPI0_ERR[0m - 7) << IRQ_EPPI0_ERR_POS) | (([31mCONFIG_IRQ_SPORT0_ERR[0m - 7) << IRQ_SPORT0_ERR_POS) | (([31mCONFIG_IRQ_SPORT1_ERR[0m - 7) << IRQ_SPORT1_ERR_POS) | (([31mCONFIG_IRQ_SPI0_ERR[0m - 7) << IRQ_SPI0_ERR_POS) | (([31mCONFIG_IRQ_UART0_ERR[0m - 7) << IRQ_UART0_ERR_POS) | (([31mCONFIG_IRQ_RTC[0m - 7) << IRQ_RTC_POS)); bfin_write_SIC_IAR1((([31mCONFIG_IRQ_EPPI0[0m - 7) << IRQ_EPPI0_POS) | (([31mCONFIG_IRQ_SPORT0_RX[0m - 7) << IRQ_SPORT0_RX_POS) | (([31mCONFIG_IRQ_SPORT0_TX[0m - 7) << IRQ_SPORT0_TX_POS) | (([31mCONFIG_IRQ_SPORT1_RX[0m - 7) << IRQ_SPORT1_RX_POS) | (([31mCONFIG_IRQ_SPORT1_TX[0m - 7) << IRQ_SPORT1_TX_POS) | (([31mCONFIG_IRQ_SPI0[0m - 7) << IRQ_SPI0_POS) | (([31mCONFIG_IRQ_UART0_RX[0m - 7) << IRQ_UART0_RX_POS) | (([31mCONFIG_IRQ_UART0_TX[0m - 7) << IRQ_UART0_TX_POS)); bfin_write_SIC_IAR2((([31mCONFIG_IRQ_TIMER8[0m - 7) << IRQ_TIMER8_POS) | (([31mCONFIG_IRQ_TIMER9[0m - 7) << IRQ_TIMER9_POS) | (([31mCONFIG_IRQ_PINT0[0m - 7) << IRQ_PINT0_POS) | (([31mCONFIG_IRQ_PINT1[0m - 7) << IRQ_PINT1_POS) | (([31mCONFIG_IRQ_MDMAS0[0m - 7) << IRQ_MDMAS0_POS) | (([31mCONFIG_IRQ_MDMAS1[0m - 7) << IRQ_MDMAS1_POS) | (([31mCONFIG_IRQ_WATCHDOG[0m - 7) << IRQ_WATCH_POS)); bfin_write_SIC_IAR3((([31mCONFIG_IRQ_DMAC1_ERR[0m - 7) << IRQ_DMAC1_ERR_POS) | (([31mCONFIG_IRQ_SPORT2_ERR[0m - 7) << IRQ_SPORT2_ERR_POS) | (([31mCONFIG_IRQ_SPORT3_ERR[0m - 7) << IRQ_SPORT3_ERR_POS) | (([31mCONFIG_IRQ_MXVR_DATA[0m - 7) << IRQ_MXVR_DATA_POS) | (([31mCONFIG_IRQ_SPI1_ERR[0m - 7) << IRQ_SPI1_ERR_POS) | (([31mCONFIG_IRQ_SPI2_ERR[0m - 7) << IRQ_SPI2_ERR_POS) | (([31mCONFIG_IRQ_UART1_ERR[0m - 7) << IRQ_UART1_ERR_POS) | (([31mCONFIG_IRQ_UART2_ERR[0m - 7) << IRQ_UART2_ERR_POS)); bfin_write_SIC_IAR4((([31mCONFIG_IRQ_CAN0_ERR[0m - 7) << IRQ_CAN0_ERR_POS) | (([31mCONFIG_IRQ_SPORT2_RX[0m - 7) << IRQ_SPORT2_RX_POS) | (([31mCONFIG_IRQ_SPORT2_TX[0m - 7) << IRQ_SPORT2_TX_POS) | (([31mCONFIG_IRQ_SPORT3_RX[0m - 7) << IRQ_SPORT3_RX_POS) | (([31mCONFIG_IRQ_SPORT3_TX[0m - 7) << IRQ_SPORT3_TX_POS) | (([31mCONFIG_IRQ_EPPI1[0m - 7) << IRQ_EPPI1_POS) | (([31mCONFIG_IRQ_EPPI2[0m - 7) << IRQ_EPPI2_POS) | (([31mCONFIG_IRQ_SPI1[0m - 7) << IRQ_SPI1_POS)); bfin_write_SIC_IAR5((([31mCONFIG_IRQ_SPI2[0m - 7) << IRQ_SPI2_POS) | (([31mCONFIG_IRQ_UART1_RX[0m - 7) << IRQ_UART1_RX_POS) | (([31mCONFIG_IRQ_UART1_TX[0m - 7) << IRQ_UART1_TX_POS) | (([31mCONFIG_IRQ_ATAPI_RX[0m - 7) << IRQ_ATAPI_RX_POS) | (([31mCONFIG_IRQ_ATAPI_TX[0m - 7) << IRQ_ATAPI_TX_POS) | (([31mCONFIG_IRQ_TWI0[0m - 7) << IRQ_TWI0_POS) | (([31mCONFIG_IRQ_TWI1[0m - 7) << IRQ_TWI1_POS) | (([31mCONFIG_IRQ_CAN0_RX[0m - 7) << IRQ_CAN0_RX_POS)); bfin_write_SIC_IAR6((([31mCONFIG_IRQ_CAN0_TX[0m - 7) << IRQ_CAN0_TX_POS) | (([31mCONFIG_IRQ_MDMAS2[0m - 7) << IRQ_MDMAS2_POS) | (([31mCONFIG_IRQ_MDMAS3[0m - 7) << IRQ_MDMAS3_POS) | (([31mCONFIG_IRQ_MXVR_ERR[0m - 7) << IRQ_MXVR_ERR_POS) | (([31mCONFIG_IRQ_MXVR_MSG[0m - 7) << IRQ_MXVR_MSG_POS) | (([31mCONFIG_IRQ_MXVR_PKT[0m - 7) << IRQ_MXVR_PKT_POS) | (([31mCONFIG_IRQ_EPPI1_ERR[0m - 7) << IRQ_EPPI1_ERR_POS) | (([31mCONFIG_IRQ_EPPI2_ERR[0m - 7) << IRQ_EPPI2_ERR_POS)); bfin_write_SIC_IAR7((([31mCONFIG_IRQ_UART3_ERR[0m - 7) << IRQ_UART3_ERR_POS) | (([31mCONFIG_IRQ_HOST_ERR[0m - 7) << IRQ_HOST_ERR_POS) | (([31mCONFIG_IRQ_PIXC_ERR[0m - 7) << IRQ_PIXC_ERR_POS) | (([31mCONFIG_IRQ_NFC_ERR[0m - 7) << IRQ_NFC_ERR_POS) | (([31mCONFIG_IRQ_ATAPI_ERR[0m - 7) << IRQ_ATAPI_ERR_POS) | (([31mCONFIG_IRQ_CAN1_ERR[0m - 7) << IRQ_CAN1_ERR_POS) | (([31mCONFIG_IRQ_HS_DMA_ERR[0m - 7) << IRQ_HS_DMA_ERR_POS)); bfin_write_SIC_IAR8((([31mCONFIG_IRQ_PIXC_IN0[0m - 7) << IRQ_PIXC_IN1_POS) | (([31mCONFIG_IRQ_PIXC_IN1[0m - 7) << IRQ_PIXC_IN1_POS) | (([31mCONFIG_IRQ_PIXC_OUT[0m - 7) << IRQ_PIXC_OUT_POS) | (([31mCONFIG_IRQ_SDH[0m - 7) << IRQ_SDH_POS) | (([31mCONFIG_IRQ_CNT[0m - 7) << IRQ_CNT_POS) | (([31mCONFIG_IRQ_KEY[0m - 7) << IRQ_KEY_POS) | (([31mCONFIG_IRQ_CAN1_RX[0m - 7) << IRQ_CAN1_RX_POS) | (([31mCONFIG_IRQ_CAN1_TX[0m - 7) << IRQ_CAN1_TX_POS)); bfin_write_SIC_IAR9((([31mCONFIG_IRQ_SDH_MASK0[0m - 7) << IRQ_SDH_MASK0_POS) | (([31mCONFIG_IRQ_SDH_MASK1[0m - 7) << IRQ_SDH_MASK1_POS) | (([31mCONFIG_IRQ_USB_INT0[0m - 7) << IRQ_USB_INT0_POS) | (([31mCONFIG_IRQ_USB_INT1[0m - 7) << IRQ_USB_INT1_POS) | (([31mCONFIG_IRQ_USB_INT2[0m - 7) << IRQ_USB_INT2_POS) | (([31mCONFIG_IRQ_USB_DMA[0m - 7) << IRQ_USB_DMA_POS) | (([31mCONFIG_IRQ_OTPSEC[0m - 7) << IRQ_OTPSEC_POS)); bfin_write_SIC_IAR10((([31mCONFIG_IRQ_TIMER0[0m - 7) << IRQ_TIMER0_POS) | (([31mCONFIG_IRQ_TIMER1[0m - 7) << IRQ_TIMER1_POS)); bfin_write_SIC_IAR11((([31mCONFIG_IRQ_TIMER2[0m - 7) << IRQ_TIMER2_POS) | (([31mCONFIG_IRQ_TIMER3[0m - 7) << IRQ_TIMER3_POS) | (([31mCONFIG_IRQ_TIMER4[0m - 7) << IRQ_TIMER4_POS) | (([31mCONFIG_IRQ_TIMER5[0m - 7) << IRQ_TIMER5_POS) | (([31mCONFIG_IRQ_TIMER6[0m - 7) << IRQ_TIMER6_POS) | (([31mCONFIG_IRQ_TIMER7[0m - 7) << IRQ_TIMER7_POS) | (([31mCONFIG_IRQ_PINT2[0m - 7) << IRQ_PINT2_POS) | (([31mCONFIG_IRQ_PINT3[0m - 7) << IRQ_PINT3_POS)); SSYNC(); } |