rpi3: Do prescaler and control setup in C
To initialise the arch timer configuration and some clock prescaler, we
need to do two MMIO access *once*, early during boot.

As tempting as it may sound, plat_reset_handler() is not the right place
to do this, as it will be called on every CPU coming up, both for
secondary cores as well as during warmboots. So this access will be done
multiple times, and even during a rich OS' runtime. Whether doing so anyway
is actually harmful is hard to say, but we should definitely avoid this if
possible.

Move the initialisation of these registers to C code in
bl1_early_platform_setup(), where it will still be executed early enough
(before enabling the console), but only once during the whole boot
process.

Change-Id: I081c41a5476d424411411488ff8f633e87d3bcc5
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
1 parent e6fd00a commit dcf6d4f8edfe76b3a01cbb80549499444ff3c7bd
@Andre Przywara Andre Przywara authored on 15 Jul 2019
Showing 2 changed files
View
plat/rpi/rpi3/aarch64/plat_helpers.S
View
plat/rpi/rpi3/rpi3_bl1_setup.c