X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fpci%2Fops-titan.c;h=1ac7880dd2a0ec23072159cd8bca75986e4c0140;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=819309b8e02966aa299ae50271fe0681fa5fe911;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/arch/mips/pci/ops-titan.c b/arch/mips/pci/ops-titan.c index 819309b8e..1ac7880dd 100644 --- a/arch/mips/pci/ops-titan.c +++ b/arch/mips/pci/ops-titan.c @@ -58,15 +58,15 @@ static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg, switch (size) { case 1: - *val = TITAN_READ_8(data_reg + (~reg & 0x3)); + TITAN_READ_8(data_reg + (reg & 0x3), val); break; case 2: - *val = TITAN_READ_16(data_reg + (~reg & 0x2)); + TITAN_READ_16(data_reg + (reg & 0x2), val); break; case 4: - *val = TITAN_READ(data_reg); + TITAN_READ(data_reg, val); break; } @@ -98,11 +98,11 @@ static int titan_write_config(struct pci_bus *bus, unsigned int devfn, int reg, /* write the data */ switch (size) { case 1: - TITAN_WRITE_8(data_reg + (~reg & 0x3), val); + TITAN_WRITE_8(data_reg + (reg & 0x3), val); break; case 2: - TITAN_WRITE_16(data_reg + (~reg & 0x2), val); + TITAN_WRITE_16(data_reg + (reg & 0x2), val); break; case 4: @@ -120,3 +120,16 @@ struct pci_ops titan_pci_ops = { titan_read_config, titan_write_config, }; + +void __init pcibios_init(void) +{ + /* + * XXX These values below need to change + */ + ioport_resource.start = 0xe0000000; + ioport_resource.end = 0xe0000000 + 0x20000000 - 1; + iomem_resource.start = 0xc0000000; + iomem_resource.end = 0xc0000000 + 0x20000000 - 1; + + pci_scan_bus(0, &titan_pci_ops, NULL); +}