Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Moved irq_tab_alchemy to the board specific irqmap.c files. Cleaned up a to of warnings in dbdma.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Pete Popov and committed by
Ralf Baechle
2d32ffa4 e3ad1c23

+77 -87
+10 -10
arch/mips/au1000/common/dbdma.c
··· 39 39 #include <linux/string.h> 40 40 #include <linux/delay.h> 41 41 #include <linux/interrupt.h> 42 + #include <linux/module.h> 42 43 #include <asm/mach-au1x00/au1000.h> 43 44 #include <asm/mach-au1x00/au1xxx_dbdma.h> 44 45 #include <asm/system.h> 45 46 46 - /* #include <linux/module.h> */ 47 47 48 48 #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) 49 49 ··· 596 596 * these parts. If it is fixedin the future, these dma_cache_inv will 597 597 * just be nothing more than empty macros. See io.h. 598 598 * */ 599 - dma_cache_wback_inv(buf,nbytes); 599 + dma_cache_wback_inv((unsigned long)buf, nbytes); 600 600 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 601 601 au_sync(); 602 - dma_cache_wback_inv(dp, sizeof(dp)); 602 + dma_cache_wback_inv((unsigned long)dp, sizeof(dp)); 603 603 ctp->chan_ptr->ddma_dbell = 0; 604 604 605 605 /* return something not zero. ··· 657 657 * parts. If it is fixedin the future, these dma_cache_inv will just 658 658 * be nothing more than empty macros. See io.h. 659 659 * */ 660 - dma_cache_inv(buf,nbytes); 660 + dma_cache_inv((unsigned long)buf,nbytes); 661 661 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ 662 662 au_sync(); 663 - dma_cache_wback_inv(dp, sizeof(dp)); 663 + dma_cache_wback_inv((unsigned long)dp, sizeof(dp)); 664 664 ctp->chan_ptr->ddma_dbell = 0; 665 665 666 666 /* Get next descriptor pointer. ··· 820 820 821 821 au1xxx_dbdma_stop(chanid); 822 822 823 - if (ctp->chan_desc_base != NULL) 824 - kfree(ctp->chan_desc_base); 823 + kfree((void *)ctp->chan_desc_base); 825 824 826 825 stp->dev_flags &= ~DEV_FLAGS_INUSE; 827 826 dtp->dev_flags &= ~DEV_FLAGS_INUSE; ··· 830 831 } 831 832 EXPORT_SYMBOL(au1xxx_dbdma_chan_free); 832 833 833 - static void 834 + static irqreturn_t 834 835 dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs) 835 836 { 836 - u32 intstat, flags; 837 - u32 chan_index; 837 + u32 intstat; 838 + u32 chan_index; 838 839 chan_tab_t *ctp; 839 840 au1x_ddma_desc_t *dp; 840 841 au1x_dma_chan_t *cp; ··· 856 857 (ctp->chan_callback)(irq, ctp->chan_callparam, regs); 857 858 858 859 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); 860 + return IRQ_RETVAL(1); 859 861 } 860 862 861 863 static void au1xxx_dbdma_init(void)
+32
arch/mips/au1000/db1x00/irqmap.c
··· 48 48 #include <asm/system.h> 49 49 #include <asm/mach-au1x00/au1000.h> 50 50 51 + #ifdef CONFIG_MIPS_DB1500 52 + char irq_tab_alchemy[][5] __initdata = { 53 + [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - HPT371 */ 54 + [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 55 + }; 56 + #endif 57 + 58 + #ifdef CONFIG_MIPS_BOSPORUS 59 + char irq_tab_alchemy[][5] __initdata = { 60 + [11] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 11 - miniPCI */ 61 + [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - SN1741 */ 62 + [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 63 + }; 64 + #endif 65 + 66 + #ifdef CONFIG_MIPS_MIRAGE 67 + char irq_tab_alchemy[][5] __initdata = { 68 + [11] = { -1, INTD, INTX, INTX, INTX}, /* IDSEL 11 - SMI VGX */ 69 + [12] = { -1, INTX, INTX, INTC, INTX}, /* IDSEL 12 - PNX1300 */ 70 + [13] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 13 - miniPCI */ 71 + }; 72 + #endif 73 + 74 + #ifdef CONFIG_MIPS_DB1550 75 + char irq_tab_alchemy[][5] __initdata = { 76 + [11] = { -1, INTC, INTX, INTX, INTX}, /* IDSEL 11 - on-board HPT371 */ 77 + [12] = { -1, INTB, INTC, INTD, INTA}, /* IDSEL 12 - PCI slot 2 (left) */ 78 + [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ 79 + }; 80 + #endif 81 + 82 + 51 83 au1xxx_irq_map_t au1xxx_irq_map[] = { 52 84 53 85 #ifndef CONFIG_MIPS_MIRAGE
+11
arch/mips/au1000/mtx-1/irqmap.c
··· 47 47 #include <asm/system.h> 48 48 #include <asm/mach-au1x00/au1000.h> 49 49 50 + char irq_tab_alchemy[][5] __initdata = { 51 + [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ 52 + [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ 53 + [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ 54 + [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ 55 + [4] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 04 - AdapterC-Slot0 (top) */ 56 + [5] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 05 - AdapterC-Slot1 (bottom) */ 57 + [6] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 06 - AdapterD-Slot0 (top) */ 58 + [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ 59 + }; 60 + 50 61 au1xxx_irq_map_t au1xxx_irq_map[] = { 51 62 { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, 52 63 { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
+5
arch/mips/au1000/pb1500/irqmap.c
··· 47 47 #include <asm/system.h> 48 48 #include <asm/mach-au1x00/au1000.h> 49 49 50 + char irq_tab_alchemy[][5] __initdata = { 51 + [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - HPT370 */ 52 + [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 53 + }; 54 + 50 55 au1xxx_irq_map_t au1xxx_irq_map[] = { 51 56 { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, 52 57 { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
+5
arch/mips/au1000/pb1550/irqmap.c
··· 47 47 #include <asm/system.h> 48 48 #include <asm/mach-au1x00/au1000.h> 49 49 50 + char irq_tab_alchemy[][5] __initdata = { 51 + [12] = { -1, INTB, INTC, INTD, INTA}, /* IDSEL 12 - PCI slot 2 (left) */ 52 + [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ 53 + }; 54 + 50 55 au1xxx_irq_map_t au1xxx_irq_map[] = { 51 56 { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, 52 57 { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 },
+1 -77
arch/mips/pci/fixup-au1000.c
··· 26 26 * with this program; if not, write to the Free Software Foundation, Inc., 27 27 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 28 */ 29 - #include <linux/config.h> 30 29 #include <linux/types.h> 31 30 #include <linux/pci.h> 32 31 #include <linux/kernel.h> ··· 33 34 34 35 #include <asm/mach-au1x00/au1000.h> 35 36 36 - /* 37 - * Shortcut 38 - */ 39 - #ifdef CONFIG_SOC_AU1500 40 - #define INTA AU1000_PCI_INTA 41 - #define INTB AU1000_PCI_INTB 42 - #define INTC AU1000_PCI_INTC 43 - #define INTD AU1000_PCI_INTD 44 - #endif 45 - 46 - #ifdef CONFIG_SOC_AU1550 47 - #define INTA AU1550_PCI_INTA 48 - #define INTB AU1550_PCI_INTB 49 - #define INTC AU1550_PCI_INTC 50 - #define INTD AU1550_PCI_INTD 51 - #endif 52 - 53 - #define INTX 0xFF /* not valid */ 54 - 55 - #ifdef CONFIG_MIPS_DB1500 56 - static char irq_tab_alchemy[][5] __initdata = { 57 - [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - HPT371 */ 58 - [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 59 - }; 60 - #endif 61 - 62 - #ifdef CONFIG_MIPS_BOSPORUS 63 - static char irq_tab_alchemy[][5] __initdata = { 64 - [11] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 11 - miniPCI */ 65 - [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - SN1741 */ 66 - [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 67 - }; 68 - #endif 69 - 70 - #ifdef CONFIG_MIPS_MIRAGE 71 - static char irq_tab_alchemy[][5] __initdata = { 72 - [11] = { -1, INTD, INTX, INTX, INTX}, /* IDSEL 11 - SMI VGX */ 73 - [12] = { -1, INTX, INTX, INTC, INTX}, /* IDSEL 12 - PNX1300 */ 74 - [13] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 13 - miniPCI */ 75 - }; 76 - #endif 77 - 78 - #ifdef CONFIG_MIPS_DB1550 79 - static char irq_tab_alchemy[][5] __initdata = { 80 - [11] = { -1, INTC, INTX, INTX, INTX}, /* IDSEL 11 - on-board HPT371 */ 81 - [12] = { -1, INTB, INTC, INTD, INTA}, /* IDSEL 12 - PCI slot 2 (left) */ 82 - [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ 83 - }; 84 - #endif 85 - 86 - #ifdef CONFIG_MIPS_PB1500 87 - static char irq_tab_alchemy[][5] __initdata = { 88 - [12] = { -1, INTA, INTX, INTX, INTX}, /* IDSEL 12 - HPT370 */ 89 - [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ 90 - }; 91 - #endif 92 - 93 - #ifdef CONFIG_MIPS_PB1550 94 - static char irq_tab_alchemy[][5] __initdata = { 95 - [12] = { -1, INTB, INTC, INTD, INTA}, /* IDSEL 12 - PCI slot 2 (left) */ 96 - [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ 97 - }; 98 - #endif 99 - 100 - #ifdef CONFIG_MIPS_MTX1 101 - static char irq_tab_alchemy[][5] __initdata = { 102 - [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ 103 - [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ 104 - [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ 105 - [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ 106 - [4] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 04 - AdapterC-Slot0 (top) */ 107 - [5] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 05 - AdapterC-Slot1 (bottom) */ 108 - [6] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 06 - AdapterD-Slot0 (top) */ 109 - [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ 110 - }; 111 - #endif 37 + extern char irq_tab_alchemy[][5]; 112 38 113 39 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 114 40 {
+13
include/asm-mips/mach-au1x00/au1000.h
··· 757 757 #define AU1500_GPIO_207 62 758 758 #define AU1500_GPIO_208_215 63 759 759 760 + /* shortcuts */ 761 + #define INTA AU1000_PCI_INTA 762 + #define INTB AU1000_PCI_INTB 763 + #define INTC AU1000_PCI_INTC 764 + #define INTD AU1000_PCI_INTD 765 + 760 766 #define UART0_ADDR 0xB1100000 761 767 #define UART3_ADDR 0xB1400000 762 768 ··· 913 907 #define AU1500_GPIO_207 62 914 908 #define AU1500_GPIO_208_218 63 // Logical or of GPIO208:218 915 909 910 + /* shortcuts */ 911 + #define INTA AU1550_PCI_INTA 912 + #define INTB AU1550_PCI_INTB 913 + #define INTC AU1550_PCI_INTC 914 + #define INTD AU1550_PCI_INTD 915 + 916 916 #define UART0_ADDR 0xB1100000 917 917 #define UART1_ADDR 0xB1200000 918 918 #define UART3_ADDR 0xB1400000 ··· 1031 1019 #define AU1000_LAST_INTC0_INT 31 1032 1020 #define AU1000_LAST_INTC1_INT 63 1033 1021 #define AU1000_MAX_INTR 63 1022 + #define INTX 0xFF /* not valid */ 1034 1023 1035 1024 /* Programmable Counters 0 and 1 */ 1036 1025 #define SYS_BASE 0xB1900000