linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ppopov@linux-mips.org
Date: Tue, 01 Mar 2005 07:54:57 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ppopov@ftp.linux-mips.org       05/03/01 07:54:51

Modified files:
        arch/mips/au1000/common: dbdma.c 
        arch/mips/au1000/db1x00: irqmap.c 
        arch/mips/au1000/mtx-1: irqmap.c 
        arch/mips/au1000/pb1500: irqmap.c 
        arch/mips/au1000/pb1550: irqmap.c 
        arch/mips/pci  : fixup-au1000.c 
        include/asm-mips/mach-au1x00: au1000.h 

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

diff -urN linux/arch/mips/au1000/common/dbdma.c 
linux/arch/mips/au1000/common/dbdma.c
--- linux/arch/mips/au1000/common/dbdma.c       2005/03/01 06:33:16     1.12
+++ linux/arch/mips/au1000/common/dbdma.c       2005/03/01 07:54:50     1.13
@@ -39,11 +39,11 @@
 #include <linux/string.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-au1x00/au1xxx_dbdma.h>
 #include <asm/system.h>
 
-/* #include <linux/module.h> */
 
 #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
 
@@ -596,10 +596,10 @@
         * these parts. If it is fixedin the future, these dma_cache_inv will 
         * just be nothing more than empty macros. See io.h.
         * */
-       dma_cache_wback_inv(buf,nbytes);
+       dma_cache_wback_inv((unsigned long)buf, nbytes);
         dp->dscr_cmd0 |= DSCR_CMD0_V;        /* Let it rip */
        au_sync();
-       dma_cache_wback_inv(dp, sizeof(dp));
+       dma_cache_wback_inv((unsigned long)dp, sizeof(dp));
         ctp->chan_ptr->ddma_dbell = 0;
 
        /* return something not zero.
@@ -657,10 +657,10 @@
         * parts. If it is fixedin the future, these dma_cache_inv will just 
         * be nothing more than empty macros. See io.h. 
         * */
-       dma_cache_inv(buf,nbytes);
+       dma_cache_inv((unsigned long)buf,nbytes);
        dp->dscr_cmd0 |= DSCR_CMD0_V;   /* Let it rip */
        au_sync();
-       dma_cache_wback_inv(dp, sizeof(dp));
+       dma_cache_wback_inv((unsigned long)dp, sizeof(dp));
         ctp->chan_ptr->ddma_dbell = 0;
 
        /* Get next descriptor pointer.
@@ -821,7 +821,7 @@
        au1xxx_dbdma_stop(chanid);
 
        if (ctp->chan_desc_base != NULL)
-               kfree(ctp->chan_desc_base);
+               kfree((void *)ctp->chan_desc_base);
 
        stp->dev_flags &= ~DEV_FLAGS_INUSE;
        dtp->dev_flags &= ~DEV_FLAGS_INUSE;
@@ -831,11 +831,11 @@
 }
 EXPORT_SYMBOL(au1xxx_dbdma_chan_free);
 
-static void
+static irqreturn_t
 dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-       u32                                     intstat, flags;
-       u32     chan_index;
+       u32 intstat;
+       u32 chan_index;
        chan_tab_t              *ctp;
        au1x_ddma_desc_t        *dp;
        au1x_dma_chan_t *cp;
@@ -857,6 +857,7 @@
                (ctp->chan_callback)(irq, ctp->chan_callparam, regs);
 
        ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
+       return IRQ_RETVAL(1);
 }
 
 static void au1xxx_dbdma_init(void)
diff -urN linux/arch/mips/au1000/db1x00/irqmap.c 
linux/arch/mips/au1000/db1x00/irqmap.c
--- linux/arch/mips/au1000/db1x00/irqmap.c      2004/10/25 20:44:16     1.8
+++ linux/arch/mips/au1000/db1x00/irqmap.c      2005/03/01 07:54:50     1.9
@@ -48,6 +48,38 @@
 #include <asm/system.h>
 #include <asm/mach-au1x00/au1000.h>
 
+#ifdef CONFIG_MIPS_DB1500
+char irq_tab_alchemy[][5] __initdata = {
+ [12] =        { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - HPT371   */
+ [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
+};
+#endif
+
+#ifdef CONFIG_MIPS_BOSPORUS
+char irq_tab_alchemy[][5] __initdata = {
+ [11] =        { -1, INTA, INTB, INTX, INTX},   /* IDSEL 11 - miniPCI  */
+ [12] =        { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - SN1741   */
+ [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
+};
+#endif
+
+#ifdef CONFIG_MIPS_MIRAGE
+char irq_tab_alchemy[][5] __initdata = {
+ [11] =        { -1, INTD, INTX, INTX, INTX},   /* IDSEL 11 - SMI VGX */
+ [12] =        { -1, INTX, INTX, INTC, INTX},   /* IDSEL 12 - PNX1300 */
+ [13] =        { -1, INTA, INTB, INTX, INTX},   /* IDSEL 13 - miniPCI */
+};
+#endif
+
+#ifdef CONFIG_MIPS_DB1550
+char irq_tab_alchemy[][5] __initdata = {
+ [11] =        { -1, INTC, INTX, INTX, INTX},   /* IDSEL 11 - on-board HPT371  
  */
+ [12] =        { -1, INTB, INTC, INTD, INTA},   /* IDSEL 12 - PCI slot 2 
(left)  */
+ [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot 1 
(right) */
+};
+#endif
+
+
 au1xxx_irq_map_t au1xxx_irq_map[] = {
 
 #ifndef CONFIG_MIPS_MIRAGE
diff -urN linux/arch/mips/au1000/mtx-1/irqmap.c 
linux/arch/mips/au1000/mtx-1/irqmap.c
--- linux/arch/mips/au1000/mtx-1/irqmap.c       2004/12/03 08:55:48     1.5
+++ linux/arch/mips/au1000/mtx-1/irqmap.c       2005/03/01 07:54:50     1.6
@@ -47,6 +47,17 @@
 #include <asm/system.h>
 #include <asm/mach-au1x00/au1000.h>
 
+char irq_tab_alchemy[][5] __initdata = {
+ [0] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    
*/
+ [1] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 01 - AdapterA-Slot1 (bottom) 
*/
+ [2] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 02 - AdapterB-Slot0 (top)    
*/
+ [3] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 03 - AdapterB-Slot1 (bottom) 
*/
+ [4] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 04 - AdapterC-Slot0 (top)    
*/
+ [5] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 05 - AdapterC-Slot1 (bottom) 
*/
+ [6] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 06 - AdapterD-Slot0 (top)    
*/
+ [7] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 07 - AdapterD-Slot1 (bottom) 
*/
+};
+
 au1xxx_irq_map_t au1xxx_irq_map[] = {
        { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
        { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
diff -urN linux/arch/mips/au1000/pb1500/irqmap.c 
linux/arch/mips/au1000/pb1500/irqmap.c
--- linux/arch/mips/au1000/pb1500/irqmap.c      2004/10/25 20:44:16     1.5
+++ linux/arch/mips/au1000/pb1500/irqmap.c      2005/03/01 07:54:50     1.6
@@ -47,6 +47,11 @@
 #include <asm/system.h>
 #include <asm/mach-au1x00/au1000.h>
 
+char irq_tab_alchemy[][5] __initdata = {
+ [12] = { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - HPT370   */
+ [13] = { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
+};
+
 au1xxx_irq_map_t au1xxx_irq_map[] = {
        { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
        { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
diff -urN linux/arch/mips/au1000/pb1550/irqmap.c 
linux/arch/mips/au1000/pb1550/irqmap.c
--- linux/arch/mips/au1000/pb1550/irqmap.c      2004/10/25 20:44:16     1.4
+++ linux/arch/mips/au1000/pb1550/irqmap.c      2005/03/01 07:54:50     1.5
@@ -47,6 +47,11 @@
 #include <asm/system.h>
 #include <asm/mach-au1x00/au1000.h>
 
+char irq_tab_alchemy[][5] __initdata = {
+ [12] =        { -1, INTB, INTC, INTD, INTA},   /* IDSEL 12 - PCI slot 2 
(left)  */
+ [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot 1 
(right) */
+};
+
 au1xxx_irq_map_t au1xxx_irq_map[] = {
        { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 },
        { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 },
diff -urN linux/arch/mips/pci/fixup-au1000.c linux/arch/mips/pci/fixup-au1000.c
--- linux/arch/mips/pci/fixup-au1000.c  2004/12/03 08:55:48     1.14
+++ linux/arch/mips/pci/fixup-au1000.c  2005/03/01 07:54:50     1.15
@@ -34,82 +34,7 @@
 
 #include <asm/mach-au1x00/au1000.h>
 
-/*
- * Shortcut
- */
-#ifdef CONFIG_SOC_AU1500
-#define INTA AU1000_PCI_INTA
-#define INTB AU1000_PCI_INTB
-#define INTC AU1000_PCI_INTC
-#define INTD AU1000_PCI_INTD
-#endif
-
-#ifdef CONFIG_SOC_AU1550
-#define INTA AU1550_PCI_INTA
-#define INTB AU1550_PCI_INTB
-#define INTC AU1550_PCI_INTC
-#define INTD AU1550_PCI_INTD
-#endif
-
-#define INTX    0xFF /* not valid */
-
-#ifdef CONFIG_MIPS_DB1500
-static char irq_tab_alchemy[][5] __initdata = {
- [12] =        { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - HPT371   */
- [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
-};
-#endif
-
-#ifdef CONFIG_MIPS_BOSPORUS
-static char irq_tab_alchemy[][5] __initdata = {
- [11] =        { -1, INTA, INTB, INTX, INTX},   /* IDSEL 11 - miniPCI  */
- [12] =        { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - SN1741   */
- [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
-};
-#endif
-
-#ifdef CONFIG_MIPS_MIRAGE
-static char irq_tab_alchemy[][5] __initdata = {
- [11] =        { -1, INTD, INTX, INTX, INTX},   /* IDSEL 11 - SMI VGX */
- [12] =        { -1, INTX, INTX, INTC, INTX},   /* IDSEL 12 - PNX1300 */
- [13] =        { -1, INTA, INTB, INTX, INTX},   /* IDSEL 13 - miniPCI */
-};
-#endif
-
-#ifdef CONFIG_MIPS_DB1550
-static char irq_tab_alchemy[][5] __initdata = {
- [11] =        { -1, INTC, INTX, INTX, INTX},   /* IDSEL 11 - on-board HPT371  
  */
- [12] =        { -1, INTB, INTC, INTD, INTA},   /* IDSEL 12 - PCI slot 2 
(left)  */
- [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot 1 
(right) */
-};
-#endif
-
-#ifdef CONFIG_MIPS_PB1500
-static char irq_tab_alchemy[][5] __initdata = {
- [12] = { -1, INTA, INTX, INTX, INTX},   /* IDSEL 12 - HPT370   */
- [13] = { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot */
-};
-#endif
-
-#ifdef CONFIG_MIPS_PB1550
-static char irq_tab_alchemy[][5] __initdata = {
- [12] =        { -1, INTB, INTC, INTD, INTA},   /* IDSEL 12 - PCI slot 2 
(left)  */
- [13] =        { -1, INTA, INTB, INTC, INTD},   /* IDSEL 13 - PCI slot 1 
(right) */
-};
-#endif
-
-#ifdef CONFIG_MIPS_MTX1
-static char irq_tab_alchemy[][5] __initdata = {
- [0] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    
*/
- [1] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 01 - AdapterA-Slot1 (bottom) 
*/
- [2] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 02 - AdapterB-Slot0 (top)    
*/
- [3] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 03 - AdapterB-Slot1 (bottom) 
*/
- [4] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 04 - AdapterC-Slot0 (top)    
*/
- [5] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 05 - AdapterC-Slot1 (bottom) 
*/
- [6] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 06 - AdapterD-Slot0 (top)    
*/
- [7] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 07 - AdapterD-Slot1 (bottom) 
*/
-};
-#endif
+extern char irq_tab_alchemy[][5];
 
 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
diff -urN linux/include/asm-mips/mach-au1x00/au1000.h 
linux/include/asm-mips/mach-au1x00/au1000.h
--- linux/include/asm-mips/mach-au1x00/au1000.h 2005/03/01 06:33:19     1.14
+++ linux/include/asm-mips/mach-au1x00/au1000.h 2005/03/01 07:54:51     1.15
@@ -757,6 +757,12 @@
 #define AU1500_GPIO_207           62
 #define AU1500_GPIO_208_215       63
 
+/* shortcuts */
+#define INTA AU1000_PCI_INTA
+#define INTB AU1000_PCI_INTB
+#define INTC AU1000_PCI_INTC
+#define INTD AU1000_PCI_INTD
+
 #define UART0_ADDR                0xB1100000
 #define UART3_ADDR                0xB1400000
 
@@ -907,6 +913,12 @@
 #define AU1500_GPIO_207           62
 #define AU1500_GPIO_208_218       63   // Logical or of GPIO208:218
 
+/* shortcuts */
+#define INTA AU1550_PCI_INTA
+#define INTB AU1550_PCI_INTB
+#define INTC AU1550_PCI_INTC
+#define INTD AU1550_PCI_INTD
+
 #define UART0_ADDR                0xB1100000
 #define UART1_ADDR                0xB1200000
 #define UART3_ADDR                0xB1400000
@@ -1019,6 +1031,7 @@
 #define AU1000_LAST_INTC0_INT     31
 #define AU1000_LAST_INTC1_INT     63
 #define AU1000_MAX_INTR           63
+#define INTX                   0xFF /* not valid */
 
 /* Programmable Counters 0 and 1 */
 #define SYS_BASE                   0xB1900000

<Prev in Thread] Current Thread [Next in Thread>