mirror of https://gitee.com/openkylin/linux.git
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 4321dc8dff
("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>
This commit is contained in:
parent
2152fbbd47
commit
6b8a3deedc
|
@ -425,7 +425,6 @@ target-module@39000 { /* 0x44e39000, ap 33 02.0 */
|
|||
|
||||
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";
|
||||
|
|
|
@ -409,9 +409,8 @@ target-module@39000 { /* 0x44e39000, ap 32 02.0 */
|
|||
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";
|
||||
|
|
|
@ -833,6 +833,10 @@ &epwmss0 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&rtc_target {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tscadc {
|
||||
status = "okay";
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue