diff mbox

ARM: DRA7: hwmod: add entry for RTCSS

Message ID f99196358a3cc28b0bd451459badcfc286533845.1399638849.git.nsekhar@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sekhar Nori May 9, 2014, 12:37 p.m. UTC
From: Lokesh Vutla <lokeshvutla@ti.com>

RTCSS on DRA7 provides a precise real-time clock.
Add hwmod entry for this IP.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
Applies to linux-next of 5th May.

 arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   41 +++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Paul Walmsley June 13, 2014, 7:09 p.m. UTC | #1
Hi Sekhar,

On Fri, 9 May 2014, Sekhar Nori wrote:

> From: Lokesh Vutla <lokeshvutla@ti.com>
> 
> RTCSS on DRA7 provides a precise real-time clock.
> Add hwmod entry for this IP.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

Sorry for the delay on this patch.  Have been corresponding with TI to 
figure out what to do about DRA7xx/AM43xx patches.  I don't have boards or 
public documentation for these devices, so it's impossible for me to 
meaningfully review the patches.  Looks like boards and/or public docs 
won't be coming any time soon.

So for my part, here's what I'll need to merge any hwmod patches that
involve AM437x or DRA7xx:

1. A Reviewed-by: from one of the following folks (which should come from
a different person than who is submitting the patches):

Roger Quadros
Nishanth Menon
Rajendra Nayak
Kevin Hilman
Tony Lindgren

2. A Tested-by: from one of the following folks (who can be the same as 
the person who is the same as the person who is submitting the patches):

Nishanth Menon
Rajendra Nayak
Kevin Hilman 
Tony Lindgren


Once these are in place, I'd be happy to queue it for 3.16.



- Paul
Paul Walmsley June 15, 2014, 3:47 a.m. UTC | #2
On Fri, 13 Jun 2014, Paul Walmsley wrote:

> On Fri, 9 May 2014, Sekhar Nori wrote:
> 
> > From: Lokesh Vutla <lokeshvutla@ti.com>
> > 
> > RTCSS on DRA7 provides a precise real-time clock.
> > Add hwmod entry for this IP.
> > 
> > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> 
> Sorry for the delay on this patch.  Have been corresponding with TI to 
> figure out what to do about DRA7xx/AM43xx patches.  I don't have boards or 
> public documentation for these devices, so it's impossible for me to 
> meaningfully review the patches.  Looks like boards and/or public docs 
> won't be coming any time soon.
> 
> So for my part, here's what I'll need to merge any hwmod patches that
> involve AM437x or DRA7xx:
> 
> 1. A Reviewed-by: from one of the following folks (which should come from
> a different person than who is submitting the patches):
> 
> Roger Quadros
> Nishanth Menon
> Rajendra Nayak
> Kevin Hilman
> Tony Lindgren
> 
> 2. A Tested-by: from one of the following folks (who can be the same as 
> the person who is the same as the person who is submitting the patches):
> 
> Nishanth Menon
> Rajendra Nayak
> Kevin Hilman 
> Tony Lindgren
> 
> 
> Once these are in place, I'd be happy to queue it for 3.16.

I've tried to refine this a little bit.  More details here:

http://marc.info/?l=linux-omap&m=140280321814330&w=2

- Paul
Rajendra Nayak July 3, 2014, 10:22 a.m. UTC | #3
On Friday 09 May 2014 06:07 PM, Sekhar Nori wrote:
> From: Lokesh Vutla <lokeshvutla@ti.com>
> 
> RTCSS on DRA7 provides a precise real-time clock.
> Add hwmod entry for this IP.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

Reviewed-by: Rajendra Nayak <rnayak@ti.com>

> ---
> Applies to linux-next of 5th May.

Might need a repost with rebase on the latest mainline.

> 
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   41 +++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index 810c205..402ffc7 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -1249,6 +1249,38 @@ static struct omap_hwmod dra7xx_qspi_hwmod = {
>  };
>  
>  /*
> + * 'rtcss' class
> + *
> + */
> +static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
> +	.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 dra7xx_rtcss_hwmod_class = {
> +	.name	= "rtcss",
> +	.sysc	= &dra7xx_rtcss_sysc,
> +};
> +
> +/* rtcss */
> +static struct omap_hwmod dra7xx_rtcss_hwmod = {
> +	.name		= "rtcss",
> +	.class		= &dra7xx_rtcss_hwmod_class,
> +	.clkdm_name	= "rtc_clkdm",
> +	.main_clk	= "sys_32k_ck",
> +	.prcm = {
> +		.omap4 = {
> +			.clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
> +			.context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
> +			.modulemode   = MODULEMODE_SWCTRL,
> +		},
> +	},
> +};
> +
> +/*
>   * 'sata' class
>   *
>   */
> @@ -2354,6 +2386,14 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
>  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
>  };
>  
> +/* l4_per3 -> rtcss */
> +static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
> +	.master		= &dra7xx_l4_per3_hwmod,
> +	.slave		= &dra7xx_rtcss_hwmod,
> +	.clk		= "l4_root_clk_div",
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
>  static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
>  	{
>  		.name		= "sysc",
> @@ -2683,6 +2723,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>  	&dra7xx_l4_cfg__mpu,
>  	&dra7xx_l4_cfg__ocp2scp1,
>  	&dra7xx_l3_main_1__qspi,
> +	&dra7xx_l4_per3__rtcss,
>  	&dra7xx_l4_cfg__sata,
>  	&dra7xx_l4_cfg__smartreflex_core,
>  	&dra7xx_l4_cfg__smartreflex_mpu,
>
Paul Walmsley July 6, 2014, 12:32 a.m. UTC | #4
On Thu, 3 Jul 2014, Rajendra Nayak wrote:

> On Friday 09 May 2014 06:07 PM, Sekhar Nori wrote:
> > From: Lokesh Vutla <lokeshvutla@ti.com>
> > 
> > RTCSS on DRA7 provides a precise real-time clock.
> > Add hwmod entry for this IP.
> > 
> > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> 
> Reviewed-by: Rajendra Nayak <rnayak@ti.com>
> 
> > ---
> > Applies to linux-next of 5th May.
> 
> Might need a repost with rebase on the latest mainline.

Will queue this as soon as someone sends a Tested-by: & a boot log for it.


- Paul
Lokesh Vutla July 9, 2014, 8:35 a.m. UTC | #5
This series adds hwmod entry and dt node for RTC.

Tested on DRA7: logs can be seen here: http://hastebin.com/jaxogatuta.vhdl

Lokesh Vutla (2):
  ARM: DRA7: hwmod: Add data for RTC
  ARM: dts: DRA7: Add node for RTC

 arch/arm/boot/dts/dra7-evm.dts            |    1 +
 arch/arm/boot/dts/dra7.dtsi               |    9 +++++++
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   41 +++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 810c205..402ffc7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1249,6 +1249,38 @@  static struct omap_hwmod dra7xx_qspi_hwmod = {
 };
 
 /*
+ * 'rtcss' class
+ *
+ */
+static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
+	.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 dra7xx_rtcss_hwmod_class = {
+	.name	= "rtcss",
+	.sysc	= &dra7xx_rtcss_sysc,
+};
+
+/* rtcss */
+static struct omap_hwmod dra7xx_rtcss_hwmod = {
+	.name		= "rtcss",
+	.class		= &dra7xx_rtcss_hwmod_class,
+	.clkdm_name	= "rtc_clkdm",
+	.main_clk	= "sys_32k_ck",
+	.prcm = {
+		.omap4 = {
+			.clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
+			.context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
+			.modulemode   = MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+/*
  * 'sata' class
  *
  */
@@ -2354,6 +2386,14 @@  static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_per3 -> rtcss */
+static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
+	.master		= &dra7xx_l4_per3_hwmod,
+	.slave		= &dra7xx_rtcss_hwmod,
+	.clk		= "l4_root_clk_div",
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
 	{
 		.name		= "sysc",
@@ -2683,6 +2723,7 @@  static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 	&dra7xx_l4_cfg__mpu,
 	&dra7xx_l4_cfg__ocp2scp1,
 	&dra7xx_l3_main_1__qspi,
+	&dra7xx_l4_per3__rtcss,
 	&dra7xx_l4_cfg__sata,
 	&dra7xx_l4_cfg__smartreflex_core,
 	&dra7xx_l4_cfg__smartreflex_mpu,