]> 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)
commitc6f666cfaec5c5bf0c9012bccd42ce806b1af1d7
tree288382a18f7a41df93da129f576b673e29aa696d
parent6f3a82956df7b322b10bbe93e91e037de81ead23
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