[5/6] ARM: DRA7: hwmod: Add VPE nodes
diff mbox

Message ID 20171012192719.15193-6-bparrot@ti.com
State New
Headers show

Commit Message

Benoit Parrot Oct. 12, 2017, 7:27 p.m. UTC
Add hwmod entries for VPE (Video Processing Engine) hardware block
found in DRA7x family of devices.

DRA75x_DRA74x_ES1.1 Version T Technical Reference Manual
(Literature Number SPRUHI2T) states that VPE only support NO_STANDBY,
FORCE_STANDBY, NO_IDLE, FORCE_IDLE and SMART_IDLE.
The hwmod flags were set to reflect this fact and make sure that
both are software supervised (SWSUSP).

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 43 +++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

Comments

Tony Lindgren Oct. 13, 2017, 5:05 p.m. UTC | #1
* Benoit Parrot <bparrot@ti.com> [171012 12:28]:
> +static struct omap_hwmod_class_sysconfig dra7xx_vpe_sysc = {
> +	.sysc_offs	= 0x0010,
> +	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
> +	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> +			   MSTANDBY_FORCE | MSTANDBY_NO |
> +			   MSTANDBY_SMART),
> +	.sysc_fields	= &omap_hwmod_sysc_type2,
> +};

I think checkpatch.pl --strict would complain about unnecessary
parentheses, might as well check the whole series while at it.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benoit Parrot Oct. 13, 2017, 6:05 p.m. UTC | #2
Tony Lindgren <tony@atomide.com> wrote on Fri [2017-Oct-13 10:05:13 -0700]:
> * Benoit Parrot <bparrot@ti.com> [171012 12:28]:
> > +static struct omap_hwmod_class_sysconfig dra7xx_vpe_sysc = {
> > +	.sysc_offs	= 0x0010,
> > +	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
> > +	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> > +			   MSTANDBY_FORCE | MSTANDBY_NO |
> > +			   MSTANDBY_SMART),
> > +	.sysc_fields	= &omap_hwmod_sysc_type2,
> > +};
> 
> I think checkpatch.pl --strict would complain about unnecessary
> parentheses, might as well check the whole series while at it.

I actually ran the whole series through "checkpatch.pl --strict"
before posting. And other then the usual MAINTAINER file needing
update warning for the binding patch it no other warning or error.

Based on the rest of the file I believe the parentheses around those
flags are at least consistent.

Now, would the .rev_offs comment also apply here?

Benoit

> 
> Regards,
> 
> Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Oct. 13, 2017, 7:01 p.m. UTC | #3
* Benoit Parrot <bparrot@ti.com> [171013 11:06]:
> Tony Lindgren <tony@atomide.com> wrote on Fri [2017-Oct-13 10:05:13 -0700]:
> > * Benoit Parrot <bparrot@ti.com> [171012 12:28]:
> > > +static struct omap_hwmod_class_sysconfig dra7xx_vpe_sysc = {
> > > +	.sysc_offs	= 0x0010,
> > > +	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
> > > +	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> > > +			   MSTANDBY_FORCE | MSTANDBY_NO |
> > > +			   MSTANDBY_SMART),
> > > +	.sysc_fields	= &omap_hwmod_sysc_type2,
> > > +};
> > 
> > I think checkpatch.pl --strict would complain about unnecessary
> > parentheses, might as well check the whole series while at it.
> 
> I actually ran the whole series through "checkpatch.pl --strict"
> before posting. And other then the usual MAINTAINER file needing
> update warning for the binding patch it no other warning or error.
> 
> Based on the rest of the file I believe the parentheses around those
> flags are at least consistent.

OK fine thanks for checking.

> Now, would the .rev_offs comment also apply here?

I don't think it has it, you might want to dump out the value
at offset 0 and see if it contains anything.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index fc53b498975c..c0bbc1099a11 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -240,6 +240,40 @@  static struct omap_hwmod dra7xx_bb2d_hwmod = {
 };
 
 /*
+ * 'vpe' class
+ *
+ */
+
+static struct omap_hwmod_class_sysconfig dra7xx_vpe_sysc = {
+	.sysc_offs	= 0x0010,
+	.sysc_flags	= (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   MSTANDBY_FORCE | MSTANDBY_NO |
+			   MSTANDBY_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class dra7xx_vpe_hwmod_class = {
+	.name	= "vpe",
+	.sysc	= &dra7xx_vpe_sysc,
+};
+
+/* vpe */
+static struct omap_hwmod dra7xx_vpe_hwmod = {
+	.name		= "vpe",
+	.class		= &dra7xx_vpe_hwmod_class,
+	.clkdm_name	= "vpe_clkdm",
+	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
+	.prcm = {
+		.omap4 = {
+			.clkctrl_offs = DRA7XX_CM_VPE_VPE_CLKCTRL_OFFSET,
+			.context_offs = DRA7XX_RM_VPE_VPE_CONTEXT_OFFSET,
+			.modulemode   = MODULEMODE_HWCTRL,
+		},
+	},
+};
+
+/*
  * 'cal' class
  *
  */
@@ -3936,6 +3970,14 @@  static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_per3 -> vpe */
+static struct omap_hwmod_ocp_if dra7xx_l4_per3__vpe = {
+	.master		= &dra7xx_l4_per3_hwmod,
+	.slave		= &dra7xx_vpe_hwmod,
+	.clk		= "l3_iclk_div",
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_per3 -> cal */
 static struct omap_hwmod_ocp_if dra7xx_l4_per3__cal = {
 	.master		= &dra7xx_l4_per3_hwmod,
@@ -4099,6 +4141,7 @@  static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 	&dra7xx_l4_per2__vcp1,
 	&dra7xx_l3_main_1__vcp2,
 	&dra7xx_l4_per2__vcp2,
+	&dra7xx_l4_per3__vpe,
 	&dra7xx_l4_wkup__wd_timer2,
 	&dra7xx_l4_per2__epwmss0,
 	&dra7xx_l4_per2__epwmss1,