From cb54d868c6a2292443645f25b295630f925474f8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Dubois Date: Thu, 17 Dec 2015 13:37:15 +0000 Subject: i.MX: Split the CCM class into an abstract base class and a concrete class The IMX_CCM class is now the base abstract class that is used by EPIT and GPT timer implementation. IMX31_CCM class is the concrete class implementing CCM for i.MX31 SOC. For now the i.MX25 continues to use the i.MX31 CCM implementation. An i.MX25 specific CCM will be introduced in a later patch. We also rework initialization to stop using deprecated sysbus device init. Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite Message-id: fd3c7f87b50f5ebc99ec91f01413db35017f116d.1449528242.git.jcd@tribudubois.net Signed-off-by: Peter Maydell --- include/hw/timer/imx_epit.h | 5 +++-- include/hw/timer/imx_gpt.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'include/hw/timer') diff --git a/include/hw/timer/imx_epit.h b/include/hw/timer/imx_epit.h index c5328ae..0730ac3 100644 --- a/include/hw/timer/imx_epit.h +++ b/include/hw/timer/imx_epit.h @@ -31,6 +31,7 @@ #include "hw/sysbus.h" #include "hw/ptimer.h" +#include "hw/misc/imx_ccm.h" /* * EPIT: Enhanced periodic interrupt timer @@ -63,8 +64,8 @@ typedef struct IMXEPITState{ /*< public >*/ ptimer_state *timer_reload; ptimer_state *timer_cmp; - MemoryRegion iomem; - DeviceState *ccm; + MemoryRegion iomem; + IMXCCMState *ccm; uint32_t cr; uint32_t sr; diff --git a/include/hw/timer/imx_gpt.h b/include/hw/timer/imx_gpt.h index 3f02d3b..461adbe 100644 --- a/include/hw/timer/imx_gpt.h +++ b/include/hw/timer/imx_gpt.h @@ -31,6 +31,7 @@ #include "hw/sysbus.h" #include "hw/ptimer.h" +#include "hw/misc/imx_ccm.h" /* * GPT : General purpose timer @@ -82,8 +83,8 @@ typedef struct IMXGPTState{ /*< public >*/ ptimer_state *timer; - MemoryRegion iomem; - DeviceState *ccm; + MemoryRegion iomem; + IMXCCMState *ccm; uint32_t cr; uint32_t pr; -- cgit v1.1