ARM: OMAP3: CM: remove a few OMAP34XX_CM_REGADDR defines
authorTero Kristo <t-kristo@ti.com>
Tue, 4 Mar 2014 16:19:01 +0000 (18:19 +0200)
committerPaul Walmsley <paul@pwsan.com>
Mon, 12 May 2014 01:35:13 +0000 (19:35 -0600)
Remove a few OMAP34XX_CM_REGADDR defines and replace these with offset
based register accesses instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/cm3xxx.c
arch/arm/mach-omap2/cm3xxx.h

index f6f028867bfe175f70cb6864e62bbf471125ec4f..60c2c9f9438aff826d2aaf70290cb952aa8f1281 100644 (file)
@@ -388,7 +388,8 @@ void omap3_cm_save_context(void)
                omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1);
        cm_context.iva2_cm_clksel2 =
                omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL2);
-       cm_context.cm_sysconfig = __raw_readl(OMAP3430_CM_SYSCONFIG);
+       cm_context.cm_sysconfig =
+               omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_SYSCONFIG);
        cm_context.sgx_cm_clksel =
                omap2_cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL);
        cm_context.dss_cm_clksel =
@@ -418,7 +419,8 @@ void omap3_cm_save_context(void)
                omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5);
        cm_context.pll_cm_clken2 =
                omap2_cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2);
-       cm_context.cm_polctrl = __raw_readl(OMAP3430_CM_POLCTRL);
+       cm_context.cm_polctrl =
+               omap2_cm_read_mod_reg(OCP_MOD, OMAP3430_CM_POLCTRL);
        cm_context.iva2_cm_fclken =
                omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_FCLKEN);
        cm_context.iva2_cm_clken_pll =
@@ -519,7 +521,8 @@ void omap3_cm_restore_context(void)
                               CM_CLKSEL1);
        omap2_cm_write_mod_reg(cm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD,
                               CM_CLKSEL2);
-       __raw_writel(cm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG);
+       omap2_cm_write_mod_reg(cm_context.cm_sysconfig, OCP_MOD,
+                              OMAP3430_CM_SYSCONFIG);
        omap2_cm_write_mod_reg(cm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD,
                               CM_CLKSEL);
        omap2_cm_write_mod_reg(cm_context.dss_cm_clksel, OMAP3430_DSS_MOD,
@@ -547,7 +550,8 @@ void omap3_cm_restore_context(void)
                               OMAP3430ES2_CM_CLKSEL5);
        omap2_cm_write_mod_reg(cm_context.pll_cm_clken2, PLL_MOD,
                               OMAP3430ES2_CM_CLKEN2);
-       __raw_writel(cm_context.cm_polctrl, OMAP3430_CM_POLCTRL);
+       omap2_cm_write_mod_reg(cm_context.cm_polctrl, OCP_MOD,
+                              OMAP3430_CM_POLCTRL);
        omap2_cm_write_mod_reg(cm_context.iva2_cm_fclken, OMAP3430_IVA2_MOD,
                               CM_FCLKEN);
        omap2_cm_write_mod_reg(cm_context.iva2_cm_clken_pll, OMAP3430_IVA2_MOD,
index 8224c91b4d7a849fa436d06cbff33613f695a2fc..7a16b5598127320b5f4b30d42b2ced459f4981ae 100644 (file)
@@ -29,9 +29,8 @@
  * These registers appear once per CM module.
  */
 
-#define OMAP3430_CM_REVISION           OMAP34XX_CM_REGADDR(OCP_MOD, 0x0000)
-#define OMAP3430_CM_SYSCONFIG          OMAP34XX_CM_REGADDR(OCP_MOD, 0x0010)
-#define OMAP3430_CM_POLCTRL            OMAP34XX_CM_REGADDR(OCP_MOD, 0x009c)
+#define OMAP3430_CM_SYSCONFIG          0x0010
+#define OMAP3430_CM_POLCTRL            0x009c
 
 #define OMAP3_CM_CLKOUT_CTRL_OFFSET    0x0070
 #define OMAP3430_CM_CLKOUT_CTRL                OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)