Skip to content
Snippets Groups Projects
Commit 936b3e69 authored by Ed Swarthout's avatar Ed Swarthout Committed by Jon Loeliger
Browse files

pciauto_setup_device bars_num fix


Passing bars_num=0 to pciauto_setup_device should assign no bars.

Signed-off-by: default avatarEd Swarthout <Ed.Swarthout@freescale.com>
Acked-by: default avatarShinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: default avatarAndy Fleming <afleming@freescale.com>
parent cf0b185e
Branches
Tags
No related merge requests found
......@@ -94,7 +94,7 @@ void pciauto_setup_device(struct pci_controller *hose,
pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
for (bar = PCI_BASE_ADDRESS_0; bar < PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
/* Tickle the BAR and get the response */
pci_hose_write_config_dword(hose, dev, bar, 0xffffffff);
pci_hose_read_config_dword(hose, dev, bar, &bar_response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment