aboutsummaryrefslogtreecommitdiff
path: root/hw/timer
diff options
context:
space:
mode:
authorAxel Heider <axel.heider@hensoldt.net>2022-10-31 00:59:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-01-05 12:14:43 +0000
commit018ee7948ff1df9cd98efee6e9d117eadb630cff (patch)
tree31f1840b7bee0eb15b42220a6bcefb3fa14c83b3 /hw/timer
parentb9c993aaf8962a99bc6da80918e30d582912c863 (diff)
downloadqemu-018ee7948ff1df9cd98efee6e9d117eadb630cff.zip
qemu-018ee7948ff1df9cd98efee6e9d117eadb630cff.tar.gz
qemu-018ee7948ff1df9cd98efee6e9d117eadb630cff.tar.bz2
hw/timer/imx_epit: cleanup CR defines
remove unused defines, add needed defines Signed-off-by: Axel Heider <axel.heider@hensoldt.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer')
-rw-r--r--hw/timer/imx_epit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index 2841fba..661e915 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -82,8 +82,8 @@ static void imx_epit_set_freq(IMXEPITState *s)
uint32_t clksrc;
uint32_t prescaler;
- clksrc = extract32(s->cr, CR_CLKSRC_SHIFT, 2);
- prescaler = 1 + extract32(s->cr, CR_PRESCALE_SHIFT, 12);
+ clksrc = extract32(s->cr, CR_CLKSRC_SHIFT, CR_CLKSRC_BITS);
+ prescaler = 1 + extract32(s->cr, CR_PRESCALE_SHIFT, CR_PRESCALE_BITS);
s->freq = imx_ccm_get_clock_frequency(s->ccm,
imx_epit_clocks[clksrc]) / prescaler;