]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite4d7ce5114f67ef7059a0f140fee129643e3d1e0
tree288382a18f7a41df93da129f576b673e29aa696d
parentec76b413174f8c2d67478a33c5c101416a5f750b
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