Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git] / arch / mips / pci / pci-yosemite.c
index 9ab65c2..0357946 100644 (file)
@@ -9,12 +9,15 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <asm/gt64240.h>
+#include <asm/titan_dep.h>
 
 extern struct pci_ops titan_pci_ops;
 
 static struct resource py_mem_resource = {
-       "Titan PCI MEM", 0xe0000000UL, 0xe3ffffffUL, IORESOURCE_MEM
+       .start  = 0xe0000000UL,
+       .end    = 0xe3ffffffUL,
+       .name   = "Titan PCI MEM",
+       .flags  = IORESOURCE_MEM
 };
 
 /*
@@ -23,9 +26,13 @@ static struct resource py_mem_resource = {
  * anyway.  So we just claim 64kB here.
  */
 #define TITAN_IO_SIZE  0x0000ffffUL
+#define TITAN_IO_BASE  0xe8000000UL
 
 static struct resource py_io_resource = {
-       "Titan IO MEM", 0x00001000UL, TITAN_IO_SIZE - 1, IORESOURCE_IO,
+       .start  = 0x00001000UL,
+       .end    = TITAN_IO_SIZE - 1,
+       .name   = "Titan IO MEM",
+       .flags  = IORESOURCE_IO,
 };
 
 static struct pci_controller py_controller = {
@@ -42,11 +49,12 @@ static int __init pmc_yosemite_setup(void)
 {
        unsigned long io_v_base;
 
-       io_v_base = (unsigned long) ioremap(0xe0000000UL,TITAN_IO_SIZE);
+       io_v_base = (unsigned long) ioremap(TITAN_IO_BASE, TITAN_IO_SIZE);
        if (!io_v_base)
                panic(ioremap_failed);
 
        set_io_port_base(io_v_base);
+       TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1);
 
        ioport_resource.end = TITAN_IO_SIZE - 1;