Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=252161eccd1a44f32a506d0fedb424d4ff84e4dc
Commit:     252161eccd1a44f32a506d0fedb424d4ff84e4dc
Parent:     2a9effc67804102d6d5182eb0116520588ae2256
Author:     Yoichi Yuasa <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 14 21:51:26 2007 +0900
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 16:20:23 2007 +0100

    [MIPS] merge GT64111 PCI routines and GT64120 PCI_0 routines
    
    This patch has merged GT64111 PCI routines and GT64120 PCI_0 routines.
    GT64111 PCI is almost the same as GT64120's PCI_0.
    This patch don't change GT64120 PCI routines.
    
    Signed-off-by: Yoichi Yuasa <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/Kconfig                   |   19 ++---
 arch/mips/cobalt/pci.c              |    4 +-
 arch/mips/gt64120/wrppmc/pci.c      |    4 +-
 arch/mips/mips-boards/generic/pci.c |    4 +-
 arch/mips/pci/Makefile              |    3 +-
 arch/mips/pci/ops-gt64111.c         |  100 -----------------------
 arch/mips/pci/ops-gt64120.c         |  152 -----------------------------------
 arch/mips/pci/ops-gt64xxx_pci0.c    |  152 +++++++++++++++++++++++++++++++++++
 arch/mips/pci/pci-lasat.c           |    4 +-
 arch/mips/pci/pci-ocelot.c          |    2 +-
 10 files changed, 170 insertions(+), 274 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c78b143..2fd82e5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -165,7 +165,7 @@ config MIPS_COBALT
        select HW_HAS_PCI
        select I8259
        select IRQ_CPU
-       select MIPS_GT64111
+       select PCI_GT64XXX_PCI0
        select SYS_HAS_CPU_NEVADA
        select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
@@ -207,7 +207,7 @@ config MIPS_EV64120
        depends on EXPERIMENTAL
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select SYS_HAS_CPU_R5000
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
@@ -245,7 +245,7 @@ config LASAT
        select DMA_NONCOHERENT
        select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select MIPS_NILE4
        select R5000_CPU_SCACHE
        select SYS_HAS_CPU_R5000
@@ -263,7 +263,7 @@ config MIPS_ATLAS
        select HW_HAS_PCI
        select MIPS_BOARDS_GEN
        select MIPS_BONITO64
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select MIPS_MSC
        select RM7000_CPU_SCACHE
        select SWAP_IO_SPACE
@@ -296,7 +296,7 @@ config MIPS_MALTA
        select MIPS_BOARDS_GEN
        select MIPS_BONITO64
        select MIPS_CPU_SCACHE
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select MIPS_MSC
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_MIPS32_R1
@@ -340,7 +340,7 @@ config WR_PPMC
        select BOOT_ELF32
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
@@ -398,7 +398,7 @@ config MOMENCO_OCELOT
        select HW_HAS_PCI
        select IRQ_CPU
        select IRQ_CPU_RM7K
-       select MIPS_GT64120
+       select PCI_GT64XXX_PCI0
        select RM7000_CPU_SCACHE
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM7000
@@ -999,10 +999,7 @@ config DDB5XXX_COMMON
 config MIPS_BOARDS_GEN
        bool
 
-config MIPS_GT64111
-       bool
-
-config MIPS_GT64120
+config PCI_GT64XXX_PCI0
        bool
 
 config MIPS_TX3927
diff --git a/arch/mips/cobalt/pci.c b/arch/mips/cobalt/pci.c
index d016006..d91027f 100644
--- a/arch/mips/cobalt/pci.c
+++ b/arch/mips/cobalt/pci.c
@@ -14,7 +14,7 @@
 
 #include <asm/gt64120.h>
 
-extern struct pci_ops gt64111_pci_ops;
+extern struct pci_ops gt64xxx_pci0_ops;
 
 static struct resource cobalt_mem_resource = {
        .start  = GT_DEF_PCI0_MEM0_BASE,
@@ -31,7 +31,7 @@ static struct resource cobalt_io_resource = {
 };
 
 static struct pci_controller cobalt_pci_controller = {
-       .pci_ops        = &gt64111_pci_ops,
+       .pci_ops        = &gt64xxx_pci0_ops,
        .mem_resource   = &cobalt_mem_resource,
        .io_resource    = &cobalt_io_resource,
        .io_offset      = 0 - GT_DEF_PCI0_IO_BASE,
diff --git a/arch/mips/gt64120/wrppmc/pci.c b/arch/mips/gt64120/wrppmc/pci.c
index 2fbe934..0d5289b 100644
--- a/arch/mips/gt64120/wrppmc/pci.c
+++ b/arch/mips/gt64120/wrppmc/pci.c
@@ -13,7 +13,7 @@
 #include <linux/kernel.h>
 #include <asm/gt64120.h>
 
-extern struct pci_ops gt64120_pci_ops;
+extern struct pci_ops gt64xxx_pci0_ops;
 
 static struct resource pci0_io_resource = {
        .name  = "pci_0 io",
@@ -30,7 +30,7 @@ static struct resource pci0_mem_resource = {
 };
 
 static struct pci_controller hose_0 = {
-       .pci_ops        = &gt64120_pci_ops,
+       .pci_ops        = &gt64xxx_pci0_ops,
        .io_resource    = &pci0_io_resource,
        .mem_resource   = &pci0_mem_resource,
 };
diff --git a/arch/mips/mips-boards/generic/pci.c 
b/arch/mips/mips-boards/generic/pci.c
index 3192a14..f98d60f 100644
--- a/arch/mips/mips-boards/generic/pci.c
+++ b/arch/mips/mips-boards/generic/pci.c
@@ -65,7 +65,7 @@ static struct resource msc_io_resource = {
 };
 
 extern struct pci_ops bonito64_pci_ops;
-extern struct pci_ops gt64120_pci_ops;
+extern struct pci_ops gt64xxx_pci0_ops;
 extern struct pci_ops msc_pci_ops;
 
 static struct pci_controller bonito64_controller = {
@@ -76,7 +76,7 @@ static struct pci_controller bonito64_controller = {
 };
 
 static struct pci_controller gt64120_controller = {
-       .pci_ops        = &gt64120_pci_ops,
+       .pci_ops        = &gt64xxx_pci0_ops,
        .io_resource    = &gt64120_io_resource,
        .mem_resource   = &gt64120_mem_resource,
 };
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index bf85995..df487c0 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -8,8 +8,7 @@ obj-y                           += pci.o pci-dac.o
 # PCI bus host bridge specific code
 #
 obj-$(CONFIG_MIPS_BONITO64)    += ops-bonito64.o
-obj-$(CONFIG_MIPS_GT64111)     += ops-gt64111.o
-obj-$(CONFIG_MIPS_GT64120)     += ops-gt64120.o
+obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o
 obj-$(CONFIG_PCI_MARVELL)      += ops-marvell.o
 obj-$(CONFIG_MIPS_MSC)         += ops-msc.o
 obj-$(CONFIG_MIPS_NILE4)       += ops-nile4.o
diff --git a/arch/mips/pci/ops-gt64111.c b/arch/mips/pci/ops-gt64111.c
deleted file mode 100644
index ecd3991..0000000
--- a/arch/mips/pci/ops-gt64111.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1995, 1996, 1997, 2002 by Ralf Baechle
- * Copyright (C) 2001, 2002, 2003 by Liam Davies ([EMAIL PROTECTED])
- */
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-
-#include <asm/pci.h>
-#include <asm/io.h>
-#include <asm/gt64120.h>
-
-#include <asm/mach-cobalt/cobalt.h>
-
-/*
- * Device 31 on the GT64111 is used to generate PCI special
- * cycles, so we shouldn't expected to find a device there ...
- */
-static inline int pci_range_ck(struct pci_bus *bus, unsigned int devfn)
-{
-       if (bus->number == 0 && PCI_SLOT(devfn) < 31)
-               return 0;
-
-       return -1;
-}
-
-static int gt64111_pci_read_config(struct pci_bus *bus, unsigned int devfn,
-       int where, int size, u32 * val)
-{
-       if (pci_range_ck(bus, devfn))
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       switch (size) {
-       case 4:
-               PCI_CFG_SET(devfn, where);
-               *val = GT_READ(GT_PCI0_CFGDATA_OFS);
-               return PCIBIOS_SUCCESSFUL;
-
-       case 2:
-               PCI_CFG_SET(devfn, (where & ~0x3));
-               *val = GT_READ(GT_PCI0_CFGDATA_OFS)
-                   >> ((where & 3) * 8);
-               return PCIBIOS_SUCCESSFUL;
-
-       case 1:
-               PCI_CFG_SET(devfn, (where & ~0x3));
-               *val = GT_READ(GT_PCI0_CFGDATA_OFS)
-                   >> ((where & 3) * 8);
-               return PCIBIOS_SUCCESSFUL;
-       }
-
-       return PCIBIOS_BAD_REGISTER_NUMBER;
-}
-
-static int gt64111_pci_write_config(struct pci_bus *bus, unsigned int devfn,
-       int where, int size, u32 val)
-{
-       u32 tmp;
-
-       if (pci_range_ck(bus, devfn))
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       switch (size) {
-       case 4:
-               PCI_CFG_SET(devfn, where);
-               GT_WRITE(GT_PCI0_CFGDATA_OFS, val);
-
-               return PCIBIOS_SUCCESSFUL;
-
-       case 2:
-               PCI_CFG_SET(devfn, (where & ~0x3));
-               tmp = GT_READ(GT_PCI0_CFGDATA_OFS);
-               tmp &= ~(0xffff << ((where & 0x3) * 8));
-               tmp |= (val << ((where & 0x3) * 8));
-               GT_WRITE(GT_PCI0_CFGDATA_OFS, tmp);
-
-               return PCIBIOS_SUCCESSFUL;
-
-       case 1:
-               PCI_CFG_SET(devfn, (where & ~0x3));
-               tmp = GT_READ(GT_PCI0_CFGDATA_OFS);
-               tmp &= ~(0xff << ((where & 0x3) * 8));
-               tmp |= (val << ((where & 0x3) * 8));
-               GT_WRITE(GT_PCI0_CFGDATA_OFS, tmp);
-
-               return PCIBIOS_SUCCESSFUL;
-       }
-
-       return PCIBIOS_BAD_REGISTER_NUMBER;
-}
-
-struct pci_ops gt64111_pci_ops = {
-       .read = gt64111_pci_read_config,
-       .write = gt64111_pci_write_config,
-};
diff --git a/arch/mips/pci/ops-gt64120.c b/arch/mips/pci/ops-gt64120.c
deleted file mode 100644
index 6335844..0000000
--- a/arch/mips/pci/ops-gt64120.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 1999, 2000, 2004  MIPS Technologies, Inc.
- *     All rights reserved.
- *     Authors: Carsten Langgaard <[EMAIL PROTECTED]>
- *              Maciej W. Rozycki <[EMAIL PROTECTED]>
- *
- *  This program is free software; you can distribute it and/or modify it
- *  under the terms of the GNU General Public License (Version 2) as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- *  for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
- */
-#include <linux/types.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-
-#include <asm/gt64120.h>
-
-#define PCI_ACCESS_READ  0
-#define PCI_ACCESS_WRITE 1
-
-/*
- *  PCI configuration cycle AD bus definition
- */
-/* Type 0 */
-#define PCI_CFG_TYPE0_REG_SHF           0
-#define PCI_CFG_TYPE0_FUNC_SHF          8
-
-/* Type 1 */
-#define PCI_CFG_TYPE1_REG_SHF           0
-#define PCI_CFG_TYPE1_FUNC_SHF          8
-#define PCI_CFG_TYPE1_DEV_SHF           11
-#define PCI_CFG_TYPE1_BUS_SHF           16
-
-static int gt64120_pcibios_config_access(unsigned char access_type,
-       struct pci_bus *bus, unsigned int devfn, int where, u32 * data)
-{
-       unsigned char busnum = bus->number;
-       u32 intr;
-
-       if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0)))
-               return -1;      /* Because of a bug in the galileo (for slot 
31). */
-
-       /* Clear cause register bits */
-       GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT |
-                                    GT_INTRCAUSE_TARABORT0_BIT));
-
-       /* Setup address */
-       GT_WRITE(GT_PCI0_CFGADDR_OFS,
-                (busnum << GT_PCI0_CFGADDR_BUSNUM_SHF) |
-                (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) |
-                ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) |
-                GT_PCI0_CFGADDR_CONFIGEN_BIT);
-
-       if (access_type == PCI_ACCESS_WRITE) {
-               if (busnum == 0 && PCI_SLOT(devfn) == 0) {
-                       /*
-                        * The Galileo system controller is acting
-                        * differently than other devices.
-                        */
-                       GT_WRITE(GT_PCI0_CFGDATA_OFS, *data);
-               } else
-                       __GT_WRITE(GT_PCI0_CFGDATA_OFS, *data);
-       } else {
-               if (busnum == 0 && PCI_SLOT(devfn) == 0) {
-                       /*
-                        * The Galileo system controller is acting
-                        * differently than other devices.
-                        */
-                       *data = GT_READ(GT_PCI0_CFGDATA_OFS);
-               } else
-                       *data = __GT_READ(GT_PCI0_CFGDATA_OFS);
-       }
-
-       /* Check for master or target abort */
-       intr = GT_READ(GT_INTRCAUSE_OFS);
-
-       if (intr & (GT_INTRCAUSE_MASABORT0_BIT | GT_INTRCAUSE_TARABORT0_BIT)) {
-               /* Error occurred */
-
-               /* Clear bits */
-               GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT |
-                                            GT_INTRCAUSE_TARABORT0_BIT));
-
-               return -1;
-       }
-
-       return 0;
-}
-
-
-/*
- * We can't address 8 and 16 bit words directly.  Instead we have to
- * read/write a 32bit word and mask/modify the data we actually want.
- */
-static int gt64120_pcibios_read(struct pci_bus *bus, unsigned int devfn,
-                                int where, int size, u32 * val)
-{
-       u32 data = 0;
-
-       if (gt64120_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
-                                         &data))
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       if (size == 1)
-               *val = (data >> ((where & 3) << 3)) & 0xff;
-       else if (size == 2)
-               *val = (data >> ((where & 3) << 3)) & 0xffff;
-       else
-               *val = data;
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-static int gt64120_pcibios_write(struct pci_bus *bus, unsigned int devfn,
-                             int where, int size, u32 val)
-{
-       u32 data = 0;
-
-       if (size == 4)
-               data = val;
-       else {
-               if (gt64120_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
-                                                 where, &data))
-                       return PCIBIOS_DEVICE_NOT_FOUND;
-
-               if (size == 1)
-                       data = (data & ~(0xff << ((where & 3) << 3))) |
-                               (val << ((where & 3) << 3));
-               else if (size == 2)
-                       data = (data & ~(0xffff << ((where & 3) << 3))) |
-                               (val << ((where & 3) << 3));
-       }
-
-       if (gt64120_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where,
-                                      &data))
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       return PCIBIOS_SUCCESSFUL;
-}
-
-struct pci_ops gt64120_pci_ops = {
-       .read = gt64120_pcibios_read,
-       .write = gt64120_pcibios_write
-};
diff --git a/arch/mips/pci/ops-gt64xxx_pci0.c b/arch/mips/pci/ops-gt64xxx_pci0.c
new file mode 100644
index 0000000..3d896c5
--- /dev/null
+++ b/arch/mips/pci/ops-gt64xxx_pci0.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 1999, 2000, 2004  MIPS Technologies, Inc.
+ *     All rights reserved.
+ *     Authors: Carsten Langgaard <[EMAIL PROTECTED]>
+ *              Maciej W. Rozycki <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can distribute it and/or modify it
+ *  under the terms of the GNU General Public License (Version 2) as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope it will be useful, but WITHOUT
+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ *  for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+
+#include <asm/gt64120.h>
+
+#define PCI_ACCESS_READ  0
+#define PCI_ACCESS_WRITE 1
+
+/*
+ *  PCI configuration cycle AD bus definition
+ */
+/* Type 0 */
+#define PCI_CFG_TYPE0_REG_SHF           0
+#define PCI_CFG_TYPE0_FUNC_SHF          8
+
+/* Type 1 */
+#define PCI_CFG_TYPE1_REG_SHF           0
+#define PCI_CFG_TYPE1_FUNC_SHF          8
+#define PCI_CFG_TYPE1_DEV_SHF           11
+#define PCI_CFG_TYPE1_BUS_SHF           16
+
+static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type,
+               struct pci_bus *bus, unsigned int devfn, int where, u32 * data)
+{
+       unsigned char busnum = bus->number;
+       u32 intr;
+
+       if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0)))
+               return -1;      /* Because of a bug in the galileo (for slot 
31). */
+
+       /* Clear cause register bits */
+       GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT |
+                                    GT_INTRCAUSE_TARABORT0_BIT));
+
+       /* Setup address */
+       GT_WRITE(GT_PCI0_CFGADDR_OFS,
+                (busnum << GT_PCI0_CFGADDR_BUSNUM_SHF) |
+                (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) |
+                ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) |
+                GT_PCI0_CFGADDR_CONFIGEN_BIT);
+
+       if (access_type == PCI_ACCESS_WRITE) {
+               if (busnum == 0 && PCI_SLOT(devfn) == 0) {
+                       /*
+                        * The Galileo system controller is acting
+                        * differently than other devices.
+                        */
+                       GT_WRITE(GT_PCI0_CFGDATA_OFS, *data);
+               } else
+                       __GT_WRITE(GT_PCI0_CFGDATA_OFS, *data);
+       } else {
+               if (busnum == 0 && PCI_SLOT(devfn) == 0) {
+                       /*
+                        * The Galileo system controller is acting
+                        * differently than other devices.
+                        */
+                       *data = GT_READ(GT_PCI0_CFGDATA_OFS);
+               } else
+                       *data = __GT_READ(GT_PCI0_CFGDATA_OFS);
+       }
+
+       /* Check for master or target abort */
+       intr = GT_READ(GT_INTRCAUSE_OFS);
+
+       if (intr & (GT_INTRCAUSE_MASABORT0_BIT | GT_INTRCAUSE_TARABORT0_BIT)) {
+               /* Error occurred */
+
+               /* Clear bits */
+               GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT |
+                                            GT_INTRCAUSE_TARABORT0_BIT));
+
+               return -1;
+       }
+
+       return 0;
+}
+
+
+/*
+ * We can't address 8 and 16 bit words directly.  Instead we have to
+ * read/write a 32bit word and mask/modify the data we actually want.
+ */
+static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn,
+               int where, int size, u32 * val)
+{
+       u32 data = 0;
+
+       if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
+                                              where, &data))
+               return PCIBIOS_DEVICE_NOT_FOUND;
+
+       if (size == 1)
+               *val = (data >> ((where & 3) << 3)) & 0xff;
+       else if (size == 2)
+               *val = (data >> ((where & 3) << 3)) & 0xffff;
+       else
+               *val = data;
+
+       return PCIBIOS_SUCCESSFUL;
+}
+
+static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn,
+               int where, int size, u32 val)
+{
+       u32 data = 0;
+
+       if (size == 4)
+               data = val;
+       else {
+               if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus,
+                                                      devfn, where, &data))
+                       return PCIBIOS_DEVICE_NOT_FOUND;
+
+               if (size == 1)
+                       data = (data & ~(0xff << ((where & 3) << 3))) |
+                               (val << ((where & 3) << 3));
+               else if (size == 2)
+                       data = (data & ~(0xffff << ((where & 3) << 3))) |
+                               (val << ((where & 3) << 3));
+       }
+
+       if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn,
+                                              where, &data))
+               return PCIBIOS_DEVICE_NOT_FOUND;
+
+       return PCIBIOS_SUCCESSFUL;
+}
+
+struct pci_ops gt64xxx_pci0_ops = {
+       .read   = gt64xxx_pci0_pcibios_read,
+       .write  = gt64xxx_pci0_pcibios_write
+};
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c
index 88fb191..985784a 100644
--- a/arch/mips/pci/pci-lasat.c
+++ b/arch/mips/pci/pci-lasat.c
@@ -12,7 +12,7 @@
 #include <asm/bootinfo.h>
 
 extern struct pci_ops nile4_pci_ops;
-extern struct pci_ops gt64120_pci_ops;
+extern struct pci_ops gt64xxx_pci0_ops;
 static struct resource lasat_pci_mem_resource = {
        .name   = "LASAT PCI MEM",
        .start  = 0x18000000,
@@ -38,7 +38,7 @@ static int __init lasat_pci_setup(void)
 
        switch (mips_machtype) {
        case MACH_LASAT_100:
-                lasat_pci_controller.pci_ops = &gt64120_pci_ops;
+                lasat_pci_controller.pci_ops = &gt64xxx_pci0_ops;
                 break;
        case MACH_LASAT_200:
                 lasat_pci_controller.pci_ops = &nile4_pci_ops;
diff --git a/arch/mips/pci/pci-ocelot.c b/arch/mips/pci/pci-ocelot.c
index 2b9495d..7f94f26 100644
--- a/arch/mips/pci/pci-ocelot.c
+++ b/arch/mips/pci/pci-ocelot.c
@@ -81,7 +81,7 @@ static struct resource ocelot_io_resource = {
 };
 
 static struct pci_controller ocelot_pci_controller = {
-       .pci_ops        = gt64120_pci_ops;
+       .pci_ops        = gt64xxx_pci0_ops;
        .mem_resource   = &ocelot_mem_resource;
        .io_resource    = &ocelot_io_resource;
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to