]> git.baikalelectronics.ru Git - uboot.git/commit
arm: a37xx: pci: Extend validation for PCIe resources and oubound windows
authorPali Rohár <pali@kernel.org>
Thu, 8 Jul 2021 18:18:58 +0000 (20:18 +0200)
committerStefan Roese <sr@denx.de>
Thu, 15 Jul 2021 08:53:05 +0000 (10:53 +0200)
commitdb2d734715d4d723ad9dfe46a175d4c666cb9200
treed72f848e0de40a45ab9dac5a57aad1db09fc5bb3
parent24ed9e84b336ca31bdbe47eec6ef0a12a72685b3
arm: a37xx: pci: Extend validation for PCIe resources and oubound windows

Remapped address of PCIe outbound window may have set only bits from the
mask. Add additional check that remapped address which is calculated from
PCIe bus address specified in DTS file is valid.

Remove also useless clearing of low 16 bits in win_mask. As win_size is
power of two and is at least 0x10000 it means that it always has zero low
16 bits.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/pci/pci-aardvark.c