]> git.sur5r.net Git - u-boot/blobdiff - board/eNET/eNET_pci.c
mmc: rescan fails on empty slot
[u-boot] / board / eNET / eNET_pci.c
index e80a8feb162b7eb019afb72bac60db319f13335a..a03090e54061ad15748cb4a0072fbbad5b5a933f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * (C) Copyright 2008
- * Graeme Russ, graeme.russ@gmail.com.
+ * (C) Copyright 2008,2009
+ * Graeme Russ, <graeme.russ@gmail.com>
  *
  * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB <daniel@omicron.se>.
+ * Daniel Engström, Omicron Ceti AB, <daniel@omicron.se>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,6 +23,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
+
 #include <common.h>
 #include <pci.h>
 #include <asm/pci.h>
@@ -93,3 +94,36 @@ void pci_init_board(void)
 {
        pci_sc520_init(&enet_hose);
 }
+
+int pci_set_regions(struct pci_controller *hose)
+{
+       /* System memory space */
+       pci_set_region(hose->regions + 0,
+                      SC520_PCI_MEMORY_BUS,
+                      SC520_PCI_MEMORY_PHYS,
+                      SC520_PCI_MEMORY_SIZE,
+                      PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
+
+       /* ISA/PCI memory space */
+       pci_set_region(hose->regions + 1,
+                      SC520_ISA_MEM_BUS,
+                      SC520_ISA_MEM_PHYS,
+                      SC520_ISA_MEM_SIZE,
+                      PCI_REGION_MEM);
+
+       /* PCI I/O space */
+       pci_set_region(hose->regions + 2,
+                      SC520_PCI_IO_BUS,
+                      SC520_PCI_IO_PHYS,
+                      SC520_PCI_IO_SIZE,
+                      PCI_REGION_IO);
+
+       /* ISA/PCI I/O space */
+       pci_set_region(hose->regions + 3,
+                      SC520_ISA_IO_BUS,
+                      SC520_ISA_IO_PHYS,
+                      SC520_ISA_IO_SIZE,
+                      PCI_REGION_IO);
+
+       return 4;
+}