make sure PCI cards can become bus masters
This commit is contained in:
@@ -952,7 +952,8 @@ static void pci_device_config(uint16_t bus, uint16_t device, uint16_t function)
|
|||||||
|
|
||||||
/* disable interrupt on PCI device */
|
/* disable interrupt on PCI device */
|
||||||
|
|
||||||
cr |= PCICR_INT_DISABLE;
|
cr &= ~PCICR_INT_DISABLE;
|
||||||
|
cr |= PCICR_MASTER;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enable device memory or I/O access
|
* enable device memory or I/O access
|
||||||
@@ -974,7 +975,7 @@ static void pci_bridge_config(uint16_t bus, uint16_t device, uint16_t function)
|
|||||||
|
|
||||||
pci_write_config_longword(handle, PCIBISTR, MCF_PCI_PCICR1_CACHELINESIZE(8) |
|
pci_write_config_longword(handle, PCIBISTR, MCF_PCI_PCICR1_CACHELINESIZE(8) |
|
||||||
MCF_PCI_PCICR1_LATTIMER(0x20));
|
MCF_PCI_PCICR1_LATTIMER(0x20));
|
||||||
pci_write_config_longword(handle, PCIBAR0, swpl(0x00000000));
|
pci_write_config_longword(handle, PCIBAR0, swpl(0x40000000));
|
||||||
pci_write_config_longword(handle, PCIBAR1, 0x0);
|
pci_write_config_longword(handle, PCIBAR1, 0x0);
|
||||||
pci_write_config_word(handle, PCI_LANESWAP_W(PCICR), swpw(
|
pci_write_config_word(handle, PCI_LANESWAP_W(PCICR), swpw(
|
||||||
(1 << 1) /* memory space */
|
(1 << 1) /* memory space */
|
||||||
|
|||||||
Reference in New Issue
Block a user