/* * Set up the interrupt priorities * * Copyright 2008 Analog Devices Inc. * * Licensed under the GPL-2 or later. */ #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_DMA0_ERROR[0m - 7) << IRQ_DMA0_ERROR_POS) | (([31mCONFIG_IRQ_DMAR0_BLK[0m - 7) << IRQ_DMAR0_BLK_POS) | (([31mCONFIG_IRQ_DMAR1_BLK[0m - 7) << IRQ_DMAR1_BLK_POS) | (([31mCONFIG_IRQ_DMAR0_OVR[0m - 7) << IRQ_DMAR0_OVR_POS) | (([31mCONFIG_IRQ_DMAR1_OVR[0m - 7) << IRQ_DMAR1_OVR_POS) | (([31mCONFIG_IRQ_PPI_ERROR[0m - 7) << IRQ_PPI_ERROR_POS) | (([31mCONFIG_IRQ_MAC_ERROR[0m - 7) << IRQ_MAC_ERROR_POS)); bfin_write_SIC_IAR1((([31mCONFIG_IRQ_SPORT0_ERROR[0m - 7) << IRQ_SPORT0_ERROR_POS) | (([31mCONFIG_IRQ_SPORT1_ERROR[0m - 7) << IRQ_SPORT1_ERROR_POS) | (([31mCONFIG_IRQ_PTP_ERROR[0m - 7) << IRQ_PTP_ERROR_POS) | (([31mCONFIG_IRQ_UART0_ERROR[0m - 7) << IRQ_UART0_ERROR_POS) | (([31mCONFIG_IRQ_UART1_ERROR[0m - 7) << IRQ_UART1_ERROR_POS) | (([31mCONFIG_IRQ_RTC[0m - 7) << IRQ_RTC_POS) | (([31mCONFIG_IRQ_PPI[0m - 7) << IRQ_PPI_POS)); bfin_write_SIC_IAR2((([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_TWI[0m - 7) << IRQ_TWI_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_IAR3((([31mCONFIG_IRQ_UART1_RX[0m - 7) << IRQ_UART1_RX_POS) | (([31mCONFIG_IRQ_UART1_TX[0m - 7) << IRQ_UART1_TX_POS) | (([31mCONFIG_IRQ_OPTSEC[0m - 7) << IRQ_OPTSEC_POS) | (([31mCONFIG_IRQ_CNT[0m - 7) << IRQ_CNT_POS) | (([31mCONFIG_IRQ_MAC_RX[0m - 7) << IRQ_MAC_RX_POS) | (([31mCONFIG_IRQ_PORTH_INTA[0m - 7) << IRQ_PORTH_INTA_POS) | (([31mCONFIG_IRQ_MAC_TX[0m - 7) << IRQ_MAC_TX_POS) | (([31mCONFIG_IRQ_PORTH_INTB[0m - 7) << IRQ_PORTH_INTB_POS)); bfin_write_SIC_IAR4((([31mCONFIG_IRQ_TIMER0[0m - 7) << IRQ_TIMER0_POS) | (([31mCONFIG_IRQ_TIMER1[0m - 7) << IRQ_TIMER1_POS) | (([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)); bfin_write_SIC_IAR5((([31mCONFIG_IRQ_PORTG_INTA[0m - 7) << IRQ_PORTG_INTA_POS) | (([31mCONFIG_IRQ_PORTG_INTB[0m - 7) << IRQ_PORTG_INTB_POS) | (([31mCONFIG_IRQ_MEM_DMA0[0m - 7) << IRQ_MEM_DMA0_POS) | (([31mCONFIG_IRQ_MEM_DMA1[0m - 7) << IRQ_MEM_DMA1_POS) | (([31mCONFIG_IRQ_WATCH[0m - 7) << IRQ_WATCH_POS) | (([31mCONFIG_IRQ_PORTF_INTA[0m - 7) << IRQ_PORTF_INTA_POS) | (([31mCONFIG_IRQ_PORTF_INTB[0m - 7) << IRQ_PORTF_INTB_POS) | (([31mCONFIG_IRQ_SPI0_ERROR[0m - 7) << IRQ_SPI0_ERROR_POS)); bfin_write_SIC_IAR6((([31mCONFIG_IRQ_SPI1_ERROR[0m - 7) << IRQ_SPI1_ERROR_POS) | (([31mCONFIG_IRQ_RSI_INT0[0m - 7) << IRQ_RSI_INT0_POS) | (([31mCONFIG_IRQ_RSI_INT1[0m - 7) << IRQ_RSI_INT1_POS) | (([31mCONFIG_IRQ_PWM_TRIP[0m - 7) << IRQ_PWM_TRIP_POS) | (([31mCONFIG_IRQ_PWM_SYNC[0m - 7) << IRQ_PWM_SYNC_POS) | (([31mCONFIG_IRQ_PTP_STAT[0m - 7) << IRQ_PTP_STAT_POS)); SSYNC(); } |