]> git.baikalelectronics.ru Git - uboot.git/commit
arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times
authorPali Rohár <pali@kernel.org>
Fri, 15 Jul 2022 08:13:12 +0000 (10:13 +0200)
committerStefan Roese <sr@denx.de>
Thu, 21 Jul 2022 08:14:04 +0000 (10:14 +0200)
commite84860291e713dec1cbc739d18d2d70ed1fe99c8
tree48fefba7371f5ca0703157d35797b42af64cd1b6
parent0043969e17e5ee1c9b08bf1e3be88d2717b97cf1
arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times

Change detection of platform/cpu from runtime to compile time via config
define. This completely eliminates compiling code which is not going to run
on selected platform. Code which parses and prints device / revision id
still reads device id from MVEBU_REG_PCIE_DEVID register, but only once.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/cpu.c
arch/arm/mach-mvebu/dram.c
arch/arm/mach-mvebu/include/mach/cpu.h