Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP2+: Drop legacy platform data for am3 and am4 rtc

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>

+5 -59
-1
arch/arm/boot/dts/am33xx-l4.dtsi
··· 425 425 426 426 target-module@3e000 { /* 0x44e3e000, ap 35 60.0 */ 427 427 compatible = "ti,sysc-omap4-simple", "ti,sysc"; 428 - ti,hwmods = "rtc"; 429 428 reg = <0x3e074 0x4>, 430 429 <0x3e078 0x4>; 431 430 reg-names = "rev", "sysc";
+1 -2
arch/arm/boot/dts/am437x-l4.dtsi
··· 409 409 ranges = <0x0 0x39000 0x1000>; 410 410 }; 411 411 412 - target-module@3e000 { /* 0x44e3e000, ap 34 60.0 */ 412 + rtc_target: target-module@3e000 { /* 0x44e3e000, ap 34 60.0 */ 413 413 compatible = "ti,sysc-omap4-simple", "ti,sysc"; 414 - ti,hwmods = "rtc"; 415 414 reg = <0x3e074 0x4>, 416 415 <0x3e078 0x4>; 417 416 reg-names = "rev", "sysc";
+4
arch/arm/boot/dts/am43x-epos-evm.dts
··· 833 833 status = "okay"; 834 834 }; 835 835 836 + &rtc_target { 837 + status = "disabled"; 838 + }; 839 + 836 840 &tscadc { 837 841 status = "okay"; 838 842
-2
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
··· 26 26 extern struct omap_hwmod_ocp_if am33xx_l3_s__l3_main; 27 27 extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main; 28 28 extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx; 29 - extern struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc; 30 29 extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc; 31 30 extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2; 32 31 extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc; ··· 42 43 extern struct omap_hwmod am33xx_smartreflex0_hwmod; 43 44 extern struct omap_hwmod am33xx_smartreflex1_hwmod; 44 45 extern struct omap_hwmod am33xx_gpmc_hwmod; 45 - extern struct omap_hwmod am33xx_rtc_hwmod; 46 46 47 47 extern struct omap_hwmod_class am33xx_emif_hwmod_class; 48 48 extern struct omap_hwmod_class am33xx_l4_hwmod_class;
-8
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
··· 90 90 .user = OCP_USER_MPU | OCP_USER_SDMA, 91 91 }; 92 92 93 - /* l4 wkup -> rtc */ 94 - struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = { 95 - .master = &am33xx_l4_wkup_hwmod, 96 - .slave = &am33xx_rtc_hwmod, 97 - .clk = "clkdiv32k_ick", 98 - .user = OCP_USER_MPU, 99 - }; 100 - 101 93 /* l3s cfg -> gpmc */ 102 94 struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = { 103 95 .master = &am33xx_l3_s_hwmod,
-37
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
··· 26 26 #define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl)) 27 27 #define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl)) 28 28 #define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst)) 29 - #define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag)) 30 29 31 30 /* 32 31 * 'l3' class ··· 273 274 }, 274 275 }; 275 276 276 - 277 - /* 278 - * 'rtc' class 279 - * rtc subsystem 280 - */ 281 - static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = { 282 - .rev_offs = 0x0074, 283 - .sysc_offs = 0x0078, 284 - .sysc_flags = SYSC_HAS_SIDLEMODE, 285 - .idlemodes = (SIDLE_FORCE | SIDLE_NO | 286 - SIDLE_SMART | SIDLE_SMART_WKUP), 287 - .sysc_fields = &omap_hwmod_sysc_type3, 288 - }; 289 - 290 - static struct omap_hwmod_class am33xx_rtc_hwmod_class = { 291 - .name = "rtc", 292 - .sysc = &am33xx_rtc_sysc, 293 - .unlock = &omap_hwmod_rtc_unlock, 294 - .lock = &omap_hwmod_rtc_lock, 295 - }; 296 - 297 - struct omap_hwmod am33xx_rtc_hwmod = { 298 - .name = "rtc", 299 - .class = &am33xx_rtc_hwmod_class, 300 - .clkdm_name = "l4_rtc_clkdm", 301 - .main_clk = "clk_32768_ck", 302 - .prcm = { 303 - .omap4 = { 304 - .modulemode = MODULEMODE_SWCTRL, 305 - }, 306 - }, 307 - }; 308 - 309 277 static void omap_hwmod_am33xx_clkctrl(void) 310 278 { 311 279 CLKCTRL(am33xx_smartreflex0_hwmod, 312 280 AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); 313 281 CLKCTRL(am33xx_smartreflex1_hwmod, 314 282 AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET); 315 - CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET); 316 - PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET); 317 283 CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET); 318 284 CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET); 319 285 CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET); ··· 307 343 AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET); 308 344 CLKCTRL(am33xx_smartreflex1_hwmod, 309 345 AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET); 310 - CLKCTRL(am33xx_rtc_hwmod, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET); 311 346 CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET); 312 347 CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET); 313 348 CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
-1
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
··· 283 283 &am33xx_l4_wkup__control, 284 284 &am33xx_l4_wkup__smartreflex0, 285 285 &am33xx_l4_wkup__smartreflex1, 286 - &am33xx_l4_wkup__rtc, 287 286 &am33xx_l3_s__gpmc, 288 287 &am33xx_l3_main__ocmc, 289 288 NULL,
-8
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
··· 157 157 NULL, 158 158 }; 159 159 160 - static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = { 161 - &am33xx_l4_wkup__rtc, 162 - NULL, 163 - }; 164 - 165 160 int __init am43xx_hwmod_init(void) 166 161 { 167 162 int ret; ··· 164 169 omap_hwmod_am43xx_reg(); 165 170 omap_hwmod_init(); 166 171 ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs); 167 - 168 - if (!ret && of_machine_is_compatible("ti,am4372")) 169 - ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs); 170 172 171 173 return ret; 172 174 }