ARM: OMAP2+: Drop legacy platform data for am3 and am4 rtc
authorTony Lindgren <tony@atomide.com>
Fri, 3 Jul 2020 16:07:30 +0000 (09:07 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 24 Aug 2020 05:39:47 +0000 (08:39 +0300)
We can now probe devices with ti-sysc interconnect driver and dts
data. Let's drop the related platform data and custom ti,hwmods
dts property.

As we're just dropping data, and the early platform data init
is based on the custom ti,hwmods property, we want to drop both
the platform data and ti,hwmods property in a single patch.

Note that we also must tag rtc as disabled on am43x-epos-evm as
it's not accessible according to commit 4321dc8dff35 ("ARM: AM43XX:
hwmod: Add rtc hwmod"). And we must keep RTC enabled for rtcwake
to work now that we've removed the custom platfor code for
re-enabling the RTC on suspend.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am33xx-l4.dtsi
arch/arm/boot/dts/am437x-l4.dtsi
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/omap_hwmod_43xx_data.c

index b88d0caa4b2df29d8a8855f4a1d465618da7505b..ea20e4bdf040e457ef6686946950a9a336f386aa 100644 (file)
 
                target-module@3e000 {                   /* 0x44e3e000, ap 35 60.0 */
                        compatible = "ti,sysc-omap4-simple", "ti,sysc";
-                       ti,hwmods = "rtc";
                        reg = <0x3e074 0x4>,
                              <0x3e078 0x4>;
                        reg-names = "rev", "sysc";
index 3d393fe252c6b14d929829a41a7abe271350cad5..8a67bb29e3b7c79e551cabab8e33ec1083df4f87 100644 (file)
                        ranges = <0x0 0x39000 0x1000>;
                };
 
-               target-module@3e000 {                   /* 0x44e3e000, ap 34 60.0 */
+               rtc_target: target-module@3e000 {       /* 0x44e3e000, ap 34 60.0 */
                        compatible = "ti,sysc-omap4-simple", "ti,sysc";
-                       ti,hwmods = "rtc";
                        reg = <0x3e074 0x4>,
                              <0x3e078 0x4>;
                        reg-names = "rev", "sysc";
index de4fc78498a0ca80a5e8075013c9c878a9671d50..7f3faa36a5e4166e555ccca25478c3fb5b03356d 100644 (file)
        status = "okay";
 };
 
+&rtc_target {
+       status = "disabled";
+};
+
 &tscadc {
        status = "okay";
 
index 5f4ab24dd60d8b82b3949eda7f174f48a33bead5..e29841072287d29eca68aa8f8058745e9f577db8 100644 (file)
@@ -26,7 +26,6 @@ extern struct omap_hwmod_ocp_if am33xx_mpu__prcm;
 extern struct omap_hwmod_ocp_if am33xx_l3_s__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx;
-extern struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc;
 extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
 extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2;
 extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
@@ -43,7 +42,6 @@ extern struct omap_hwmod am33xx_ocmcram_hwmod;
 extern struct omap_hwmod am33xx_smartreflex0_hwmod;
 extern struct omap_hwmod am33xx_smartreflex1_hwmod;
 extern struct omap_hwmod am33xx_gpmc_hwmod;
-extern struct omap_hwmod am33xx_rtc_hwmod;
 
 extern struct omap_hwmod_class am33xx_emif_hwmod_class;
 extern struct omap_hwmod_class am33xx_l4_hwmod_class;
index b389d6589c32f53ffc584938b27b21920c2c86dd..a131bf231bb032bb9340b6df9e0a955abfa39a86 100644 (file)
@@ -90,14 +90,6 @@ struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-/* l4 wkup -> rtc */
-struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = {
-       .master         = &am33xx_l4_wkup_hwmod,
-       .slave          = &am33xx_rtc_hwmod,
-       .clk            = "clkdiv32k_ick",
-       .user           = OCP_USER_MPU,
-};
-
 /* l3s cfg -> gpmc */
 struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
        .master         = &am33xx_l3_s_hwmod,
index 4b3cd590fb5225b46fcf8edb26b5ab722c105c5c..f9ac2ead9815a9e1e4168acf1466308931a43f19 100644 (file)
@@ -26,7 +26,6 @@
 #define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
 #define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
 #define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
-#define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))
 
 /*
  * 'l3' class
@@ -274,47 +273,12 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
        },
 };
 
-
-/*
- * 'rtc' class
- * rtc subsystem
- */
-static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
-       .rev_offs       = 0x0074,
-       .sysc_offs      = 0x0078,
-       .sysc_flags     = SYSC_HAS_SIDLEMODE,
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO |
-                         SIDLE_SMART | SIDLE_SMART_WKUP),
-       .sysc_fields    = &omap_hwmod_sysc_type3,
-};
-
-static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
-       .name           = "rtc",
-       .sysc           = &am33xx_rtc_sysc,
-       .unlock         = &omap_hwmod_rtc_unlock,
-       .lock           = &omap_hwmod_rtc_lock,
-};
-
-struct omap_hwmod am33xx_rtc_hwmod = {
-       .name           = "rtc",
-       .class          = &am33xx_rtc_hwmod_class,
-       .clkdm_name     = "l4_rtc_clkdm",
-       .main_clk       = "clk_32768_ck",
-       .prcm           = {
-               .omap4  = {
-                       .modulemode     = MODULEMODE_SWCTRL,
-               },
-       },
-};
-
 static void omap_hwmod_am33xx_clkctrl(void)
 {
        CLKCTRL(am33xx_smartreflex0_hwmod,
                AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex1_hwmod,
                AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
-       PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
@@ -343,7 +307,6 @@ static void omap_hwmod_am43xx_clkctrl(void)
                AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_smartreflex1_hwmod,
                AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
-       CLKCTRL(am33xx_rtc_hwmod, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET);
        CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
index 3cf9c4c90b18654f7ee14966682af2fcfa30768d..c95c9b2276ca9f3b00d7d615befc32eaa6c9ce6b 100644 (file)
@@ -283,7 +283,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_l4_wkup__control,
        &am33xx_l4_wkup__smartreflex0,
        &am33xx_l4_wkup__smartreflex1,
-       &am33xx_l4_wkup__rtc,
        &am33xx_l3_s__gpmc,
        &am33xx_l3_main__ocmc,
        NULL,
index b88d12de68a23434329a0d8a173999c840f03333..62fe18fefb1dab9b20ae189db301bcc41786de73 100644 (file)
@@ -157,11 +157,6 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        NULL,
 };
 
-static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = {
-       &am33xx_l4_wkup__rtc,
-       NULL,
-};
-
 int __init am43xx_hwmod_init(void)
 {
        int ret;
@@ -170,8 +165,5 @@ int __init am43xx_hwmod_init(void)
        omap_hwmod_init();
        ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
 
-       if (!ret && of_machine_is_compatible("ti,am4372"))
-               ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);
-
        return ret;
 }