]> git.baikalelectronics.ru Git - kernel.git/commit
arch/sh: pci: don't use disabled resources
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 4 Dec 2017 15:09:02 +0000 (16:09 +0100)
committerRich Felker <dalias@libc.org>
Thu, 12 Apr 2018 23:47:54 +0000 (19:47 -0400)
commitbcd77c6670b2814490e857a582820a18e6d44575
tree0ce3c82f13dfb9b281a927878c75f0cf89b77a56
parentd31d75073764d5aa660200113a93bd4f776f5915
arch/sh: pci: don't use disabled resources

In pcibios_scanbus(), we provide to the PCI core the usable MEM and IO
regions using pci_add_resource_offset(). We travel through all
resources available in the "struct pci_channel".

Also, in register_pci_controller(), we travel through all resources to
request them, making sure they don't conflict with already requested
resources.

However, some resources may be disabled, in which case they should not
be requested nor provided to the PCI core.

In the current situation, none of the resources are disabled. However,
follow-up patches in this series will make some resources disabled,
making this preliminary change necessary.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/drivers/pci/pci.c