Skip to content

Commit 6b8a3de

Browse files
committed
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 4321dc8 ("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>
1 parent 2152fbb commit 6b8a3de

8 files changed

Lines changed: 5 additions & 59 deletions

arch/arm/boot/dts/am33xx-l4.dtsi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@
425425

426426
target-module@3e000 { /* 0x44e3e000, ap 35 60.0 */
427427
compatible = "ti,sysc-omap4-simple", "ti,sysc";
428-
ti,hwmods = "rtc";
429428
reg = <0x3e074 0x4>,
430429
<0x3e078 0x4>;
431430
reg-names = "rev", "sysc";

arch/arm/boot/dts/am437x-l4.dtsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,8 @@
409409
ranges = <0x0 0x39000 0x1000>;
410410
};
411411

412-
target-module@3e000 { /* 0x44e3e000, ap 34 60.0 */
412+
rtc_target: target-module@3e000 { /* 0x44e3e000, ap 34 60.0 */
413413
compatible = "ti,sysc-omap4-simple", "ti,sysc";
414-
ti,hwmods = "rtc";
415414
reg = <0x3e074 0x4>,
416415
<0x3e078 0x4>;
417416
reg-names = "rev", "sysc";

arch/arm/boot/dts/am43x-epos-evm.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,10 @@
833833
status = "okay";
834834
};
835835

836+
&rtc_target {
837+
status = "disabled";
838+
};
839+
836840
&tscadc {
837841
status = "okay";
838842

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ extern struct omap_hwmod_ocp_if am33xx_mpu__prcm;
2626
extern struct omap_hwmod_ocp_if am33xx_l3_s__l3_main;
2727
extern struct omap_hwmod_ocp_if am33xx_gfx__l3_main;
2828
extern struct omap_hwmod_ocp_if am33xx_l3_main__gfx;
29-
extern struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc;
3029
extern struct omap_hwmod_ocp_if am33xx_l3_s__gpmc;
3130
extern struct omap_hwmod_ocp_if am33xx_l4_ls__timer2;
3231
extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
@@ -43,7 +42,6 @@ extern struct omap_hwmod am33xx_ocmcram_hwmod;
4342
extern struct omap_hwmod am33xx_smartreflex0_hwmod;
4443
extern struct omap_hwmod am33xx_smartreflex1_hwmod;
4544
extern struct omap_hwmod am33xx_gpmc_hwmod;
46-
extern struct omap_hwmod am33xx_rtc_hwmod;
4745

4846
extern struct omap_hwmod_class am33xx_emif_hwmod_class;
4947
extern struct omap_hwmod_class am33xx_l4_hwmod_class;

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ struct omap_hwmod_ocp_if am33xx_l3_main__gfx = {
9090
.user = OCP_USER_MPU | OCP_USER_SDMA,
9191
};
9292

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-
10193
/* l3s cfg -> gpmc */
10294
struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
10395
.master = &am33xx_l3_s_hwmod,

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
2727
#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
2828
#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
29-
#define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))
3029

3130
/*
3231
* 'l3' class
@@ -274,47 +273,12 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
274273
},
275274
};
276275

277-
278-
/*
279-
* 'rtc' class
280-
* rtc subsystem
281-
*/
282-
static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
283-
.rev_offs = 0x0074,
284-
.sysc_offs = 0x0078,
285-
.sysc_flags = SYSC_HAS_SIDLEMODE,
286-
.idlemodes = (SIDLE_FORCE | SIDLE_NO |
287-
SIDLE_SMART | SIDLE_SMART_WKUP),
288-
.sysc_fields = &omap_hwmod_sysc_type3,
289-
};
290-
291-
static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
292-
.name = "rtc",
293-
.sysc = &am33xx_rtc_sysc,
294-
.unlock = &omap_hwmod_rtc_unlock,
295-
.lock = &omap_hwmod_rtc_lock,
296-
};
297-
298-
struct omap_hwmod am33xx_rtc_hwmod = {
299-
.name = "rtc",
300-
.class = &am33xx_rtc_hwmod_class,
301-
.clkdm_name = "l4_rtc_clkdm",
302-
.main_clk = "clk_32768_ck",
303-
.prcm = {
304-
.omap4 = {
305-
.modulemode = MODULEMODE_SWCTRL,
306-
},
307-
},
308-
};
309-
310276
static void omap_hwmod_am33xx_clkctrl(void)
311277
{
312278
CLKCTRL(am33xx_smartreflex0_hwmod,
313279
AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
314280
CLKCTRL(am33xx_smartreflex1_hwmod,
315281
AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
316-
CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
317-
PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET);
318282
CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
319283
CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
320284
CLKCTRL(am33xx_l4_wkup_hwmod, AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);
@@ -343,7 +307,6 @@ static void omap_hwmod_am43xx_clkctrl(void)
343307
AM43XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET);
344308
CLKCTRL(am33xx_smartreflex1_hwmod,
345309
AM43XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET);
346-
CLKCTRL(am33xx_rtc_hwmod, AM43XX_CM_RTC_RTC_CLKCTRL_OFFSET);
347310
CLKCTRL(am33xx_gpmc_hwmod, AM43XX_CM_PER_GPMC_CLKCTRL_OFFSET);
348311
CLKCTRL(am33xx_l4_ls_hwmod, AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET);
349312
CLKCTRL(am33xx_l4_wkup_hwmod, AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET);

arch/arm/mach-omap2/omap_hwmod_33xx_data.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
283283
&am33xx_l4_wkup__control,
284284
&am33xx_l4_wkup__smartreflex0,
285285
&am33xx_l4_wkup__smartreflex1,
286-
&am33xx_l4_wkup__rtc,
287286
&am33xx_l3_s__gpmc,
288287
&am33xx_l3_main__ocmc,
289288
NULL,

arch/arm/mach-omap2/omap_hwmod_43xx_data.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
157157
NULL,
158158
};
159159

160-
static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = {
161-
&am33xx_l4_wkup__rtc,
162-
NULL,
163-
};
164-
165160
int __init am43xx_hwmod_init(void)
166161
{
167162
int ret;
@@ -170,8 +165,5 @@ int __init am43xx_hwmod_init(void)
170165
omap_hwmod_init();
171166
ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
172167

173-
if (!ret && of_machine_is_compatible("ti,am4372"))
174-
ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);
175-
176168
return ret;
177169
}

0 commit comments

Comments
 (0)