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)
commita83149509131b3c5cd1811f953cf96c213308eef
treed72f848e0de40a45ab9dac5a57aad1db09fc5bb3
parentc11f5abce84f630c92304683d5bde3204c5612c4
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