summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2016-02-19 10:08:55 +0530
committerPaul Walmsley <paul@pwsan.com>2016-02-18 21:46:19 -0700
commit4321dc8dff356cdc852936fcfb443463b504890d (patch)
tree0c5d3db893192940804c083affc12867a3ced35c /arch/arm/mach-omap2/omap_hwmod_43xx_data.c
parent8fe097a3d99e22355fb8e3bcee59542bf3f46b2d (diff)
ARM: AM43XX: hwmod: Add rtc hwmod
The patch registers the rtc hwmod on AM437x chips. The RTC module is physically present on the AM438x SoC used on AM43X-EPOS-EVM, but it is permanently disabled. A secure RTC is used instead on these devices, where needed. Hence adding it selectively using a separate list to get RTC Module functional on the other am43x SoCs used on am437x-gp-evm and am437x-sk-evm. Signed-off-by: Keerthy <j-keerthy@ti.com> [paul@pwsan.com: cleaned up patch description] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_43xx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index e97a894b5f88..97fd399202dc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -1020,9 +1020,21 @@ 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;
+
omap_hwmod_am43xx_reg();
omap_hwmod_init();
- return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
+ 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;
}