PCI: mvebu: Obey bridge PCI_COMMAND_MEM and PCI_COMMAND_IO bits
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tue, 26 Nov 2013 18:02:54 +0000 (11:02 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 26 Nov 2013 18:36:32 +0000 (11:36 -0700)
When PCI_COMMAND_MEMORY/PCI_COMMAND_IO are cleared, the bridge should not
allocate windows or even look at the window limit/base registers.

Otherwise we may set up bogus windows while the PCI core code performs
discovery.  The core will leave PCI_COMMAND_IO cleared if it doesn't need
an IO window.

Have mvebu_pcie_handle_*_change respect the bits, and call the change
function whenever the bits changes.

Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>

No differences found