pci_32.c (6a506238b33efd93e60c1585d654b37e292183de) pci_32.c (5516b540e98de6f7474a4e7149470ad6a0bbc54a)
1/*
2 * Common pmac/prep/chrp pci routines. -- Cort
3 */
4
5#include <linux/kernel.h>
6#include <linux/pci.h>
7#include <linux/delay.h>
8#include <linux/string.h>

--- 606 unchanged lines hidden (view full) ---

615 struct pci_controller *hose;
616
617 hose = (struct pci_controller *)alloc_bootmem(sizeof(*hose));
618 memset(hose, 0, sizeof(struct pci_controller));
619
620 *hose_tail = hose;
621 hose_tail = &hose->next;
622
1/*
2 * Common pmac/prep/chrp pci routines. -- Cort
3 */
4
5#include <linux/kernel.h>
6#include <linux/pci.h>
7#include <linux/delay.h>
8#include <linux/string.h>

--- 606 unchanged lines hidden (view full) ---

615 struct pci_controller *hose;
616
617 hose = (struct pci_controller *)alloc_bootmem(sizeof(*hose));
618 memset(hose, 0, sizeof(struct pci_controller));
619
620 *hose_tail = hose;
621 hose_tail = &hose->next;
622
623 hose->index = next_controller_index++;
623 hose->global_number = next_controller_index++;
624
625 return hose;
626}
627
628#ifdef CONFIG_PPC_OF
629/*
630 * Functions below are used on OpenFirmware machines.
631 */

--- 699 unchanged lines hidden (view full) ---

1331 if (bus->parent == NULL) {
1332 /* This is a host bridge - fill in its resources */
1333 hose->bus = bus;
1334
1335 bus->resource[0] = res = &hose->io_resource;
1336 if (!res->flags) {
1337 if (io_offset)
1338 printk(KERN_ERR "I/O resource not set for host"
624
625 return hose;
626}
627
628#ifdef CONFIG_PPC_OF
629/*
630 * Functions below are used on OpenFirmware machines.
631 */

--- 699 unchanged lines hidden (view full) ---

1331 if (bus->parent == NULL) {
1332 /* This is a host bridge - fill in its resources */
1333 hose->bus = bus;
1334
1335 bus->resource[0] = res = &hose->io_resource;
1336 if (!res->flags) {
1337 if (io_offset)
1338 printk(KERN_ERR "I/O resource not set for host"
1339 " bridge %d\n", hose->index);
1339 " bridge %d\n", hose->global_number);
1340 res->start = 0;
1341 res->end = IO_SPACE_LIMIT;
1342 res->flags = IORESOURCE_IO;
1343 }
1344 res->start += io_offset;
1345 res->end += io_offset;
1346
1347 for (i = 0; i < 3; ++i) {
1348 res = &hose->mem_resources[i];
1349 if (!res->flags) {
1350 if (i > 0)
1351 continue;
1352 printk(KERN_ERR "Memory resource not set for "
1340 res->start = 0;
1341 res->end = IO_SPACE_LIMIT;
1342 res->flags = IORESOURCE_IO;
1343 }
1344 res->start += io_offset;
1345 res->end += io_offset;
1346
1347 for (i = 0; i < 3; ++i) {
1348 res = &hose->mem_resources[i];
1349 if (!res->flags) {
1350 if (i > 0)
1351 continue;
1352 printk(KERN_ERR "Memory resource not set for "
1353 "host bridge %d\n", hose->index);
1353 "host bridge %d\n", hose->global_number);
1354 res->start = hose->pci_mem_offset;
1355 res->end = ~0U;
1356 res->flags = IORESOURCE_MEM;
1357 }
1358 bus->resource[i+1] = res;
1359 }
1360 } else {
1361 /* This is a subordinate bridge */

--- 477 unchanged lines hidden ---
1354 res->start = hose->pci_mem_offset;
1355 res->end = ~0U;
1356 res->flags = IORESOURCE_MEM;
1357 }
1358 bus->resource[i+1] = res;
1359 }
1360 } else {
1361 /* This is a subordinate bridge */

--- 477 unchanged lines hidden ---