Skip to content

Commit

Permalink
pci-expmem-hack
Browse files Browse the repository at this point in the history
    
CFE 1.2.5 and earlier fails to turn on the ExpMemEn bit in the
PCIFeatureControl register, which means that DMA does not work
beyond physical address 01_0000_0000, ergo to DRAM beyond 1GB.
    
With ExpMemEn turned on, 01_0000_0000-0f_ffff_ffff is mapped,
so DMA works for up to 61 GB of DRAM.
    
Will be fixed in CFE 1.2.6 (yet to be released).
    
Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Andrew Isaacson authored and Ralf Baechle committed Oct 29, 2005
1 parent 8a1417d commit cb42624
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/mips/pci/pci-bcm1480.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ static int __init bcm1480_pcibios_init(void)
bcm1480_bus_status |= PCI_BUS_ENABLED;
}

/* turn on ExpMemEn */
cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40));
printk("PCIFeatureCtrl = %x\n", cmdreg);
WRITECFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40),
cmdreg | 0x10);
cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40));
printk("PCIFeatureCtrl = %x\n", cmdreg);

/*
* Establish mappings in KSEG2 (kernel virtual) to PCI I/O
* space. Use "match bytes" policy to make everything look
Expand Down

0 comments on commit cb42624

Please sign in to comment.