hw/arm/msf2: Use Clock input to MSF2_SOC instead of m3clk property

Instead of passing the MSF2 SoC an integer property specifying the
CPU clock rate, pass it a Clock instead.  This lets us wire that
clock up to the armv7m object.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Message-id: 20210812093356.1946-20-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2021-08-12 10:33:50 +01:00
parent a4b1e9d3f8
commit 9bfaf3754b
3 changed files with 25 additions and 13 deletions

View file

@ -30,6 +30,7 @@
#include "hw/misc/msf2-sysreg.h"
#include "hw/ssi/mss-spi.h"
#include "hw/net/msf2-emac.h"
#include "hw/clock.h"
#include "qom/object.h"
#define TYPE_MSF2_SOC "msf2-soc"
@ -57,7 +58,7 @@ struct MSF2State {
uint64_t envm_size;
uint64_t esram_size;
uint32_t m3clk;
Clock *m3clk;
uint8_t apb0div;
uint8_t apb1div;