]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Vr41xx: Initialize PCI io_map_base
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Mon, 16 Jun 2008 13:51:08 +0000 (22:51 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 16 Jun 2008 14:14:48 +0000 (15:14 +0100)
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/pci/pci-vr41xx.c

index 33c4f683d067063488115e720b3c0b83861e73e9..d1e049b55f34f07f2035f830fd82d7324f8fbe41 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2001-2003 MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copyright (C) 2004-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2004-2008  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *  Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -300,6 +300,18 @@ static int __init vr41xx_pciu_init(void)
                ioport_resource.end = IO_PORT_RESOURCE_END;
        }
 
+       if (setup->master_io) {
+               void __iomem *io_map_base;
+               struct resource *res = vr41xx_pci_controller.io_resource;
+               master = setup->master_io;
+               io_map_base = ioremap(master->bus_base_address,
+                                     res->end - res->start + 1);
+               if (!io_map_base)
+                       return -EBUSY;
+
+               vr41xx_pci_controller.io_map_base = (unsigned long)io_map_base;
+       }
+
        register_pci_controller(&vr41xx_pci_controller);
 
        return 0;