arch/sh: pcie-sh7786: exclude unusable PCI MEM areas
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 4 Dec 2017 15:09:04 +0000 (16:09 +0100)
committerRich Felker <dalias@libc.org>
Thu, 12 Apr 2018 23:47:56 +0000 (19:47 -0400)
commitd62e9bf5dd4c0298465dd70b78b5532ea6708d63
tree288382a18f7a41df93da129f576b673e29aa696d
parent7dd7f69809b4e3bed5c28dd8600a3a8b20f6441c
arch/sh: pcie-sh7786: exclude unusable PCI MEM areas

Depending on the physical memory layout, some PCI MEM areas are not
usable. According to the SH7786 datasheet, the PCI MEM area from
1000_0000 to 13FF_FFFF is only usable if the physical memory layout
(in MMSELR) is 1, 2, 5 or 6. In all other configurations, this PCI MEM
area is not usable (because it overlaps with DRAM).

Therefore, this commit adjusts the PCI SH7786 initialization to mark
the relevant PCI resource as IORESOURCE_DISABLED if we can't use it.

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