diff mbox

[v3] ARM: AM43xx: hwmod: add VPFE hwmod entries

Message ID 1422260488-380-1-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lad, Prabhakar Jan. 26, 2015, 8:21 a.m. UTC
From: Benoit Parrot <bparrot@ti.com>

this patch adds VPFE HWMOD data for AM43xx.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 Changes for v3:
 a: Dropped OCPIF_SWSUP_IDLE flag from l3 hwmods of vpfe.
 
 arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 70 ++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/prcm43xx.h             |  3 +-
 2 files changed, 72 insertions(+), 1 deletion(-)

Comments

Benoit Parrot Jan. 28, 2015, 7:32 p.m. UTC | #1
Suspend/resume is functional with this patch.

Tested-by: Benoit Parrot <bparrot@ti.com>

Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote on Mon [2015-Jan-26 08:21:28 +0000]:
> From: Benoit Parrot <bparrot@ti.com>
> 
> this patch adds VPFE HWMOD data for AM43xx.
> 
> Signed-off-by: Benoit Parrot <bparrot@ti.com>
> Signed-off-by: Darren Etheridge <detheridge@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
>  Changes for v3:
>  a: Dropped OCPIF_SWSUP_IDLE flag from l3 hwmods of vpfe.
>  
>  arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 70 ++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/prcm43xx.h             |  3 +-
>  2 files changed, 72 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> index 5c6c841..8543f9f 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
> @@ -514,6 +514,44 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
>  	},
>  };
>  
> +static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
> +	.rev_offs       = 0x0,
> +	.sysc_offs      = 0x104,
> +	.sysc_flags     = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
> +	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
> +				MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
> +	.sysc_fields    = &omap_hwmod_sysc_type2,
> +};
> +
> +static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
> +	.name           = "vpfe",
> +	.sysc           = &am43xx_vpfe_sysc,
> +};
> +
> +static struct omap_hwmod am43xx_vpfe0_hwmod = {
> +	.name           = "vpfe0",
> +	.class          = &am43xx_vpfe_hwmod_class,
> +	.clkdm_name     = "l3s_clkdm",
> +	.prcm           = {
> +		.omap4  = {
> +			.modulemode     = MODULEMODE_SWCTRL,
> +			.clkctrl_offs   = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
> +		},
> +	},
> +};
> +
> +static struct omap_hwmod am43xx_vpfe1_hwmod = {
> +	.name           = "vpfe1",
> +	.class          = &am43xx_vpfe_hwmod_class,
> +	.clkdm_name     = "l3s_clkdm",
> +	.prcm           = {
> +		.omap4  = {
> +			.modulemode     = MODULEMODE_SWCTRL,
> +			.clkctrl_offs   = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
> +		},
> +	},
> +};
> +
>  /* Interfaces */
>  static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
>  	.master		= &am33xx_l3_main_hwmod,
> @@ -788,6 +826,34 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
>  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
>  };
>  
> +static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
> +	.master         = &am43xx_vpfe0_hwmod,
> +	.slave          = &am33xx_l3_main_hwmod,
> +	.clk            = "l3_gclk",
> +	.user           = OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
> +	.master         = &am43xx_vpfe1_hwmod,
> +	.slave          = &am33xx_l3_main_hwmod,
> +	.clk            = "l3_gclk",
> +	.user           = OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = {
> +	.master         = &am33xx_l4_ls_hwmod,
> +	.slave          = &am43xx_vpfe0_hwmod,
> +	.clk            = "l4ls_gclk",
> +	.user           = OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
> +	.master         = &am33xx_l4_ls_hwmod,
> +	.slave          = &am43xx_vpfe1_hwmod,
> +	.clk            = "l4ls_gclk",
> +	.user           = OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
>  static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
>  	&am33xx_l4_wkup__synctimer,
>  	&am43xx_l4_ls__timer8,
> @@ -887,6 +953,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
>  	&am43xx_l4_ls__dss,
>  	&am43xx_l4_ls__dss_dispc,
>  	&am43xx_l4_ls__dss_rfbi,
> +	&am43xx_l3__vpfe0,
> +	&am43xx_l3__vpfe1,
> +	&am43xx_l4_ls__vpfe0,
> +	&am43xx_l4_ls__vpfe1,
>  	NULL,
>  };
>  
> diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
> index ad7b3e9..8aa4c2c 100644
> --- a/arch/arm/mach-omap2/prcm43xx.h
> +++ b/arch/arm/mach-omap2/prcm43xx.h
> @@ -143,5 +143,6 @@
>  #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET        0x0268
>  #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET	0x05C0
>  #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET		0x0a20
> -
> +#define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET		0x0068
> +#define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET		0x0070
>  #endif
> -- 
> 2.1.0
> 
--
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
Lad, Prabhakar Jan. 28, 2015, 9:01 p.m. UTC | #2
Hi Benoit,

On Wed, Jan 28, 2015 at 7:32 PM, Benoit Parrot <bparrot@ti.com> wrote:
> Suspend/resume is functional with this patch.
>
> Tested-by: Benoit Parrot <bparrot@ti.com>
>
Thanks for the test, I was facing issues with loading the pm firmware.

Cheers,
--Prabhakar Lad
--
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
Paul Walmsley Feb. 10, 2015, 11:10 p.m. UTC | #3
On Wed, 28 Jan 2015, Benoit Parrot wrote:

> Suspend/resume is functional with this patch.
> 
> Tested-by: Benoit Parrot <bparrot@ti.com>

Thanks folks, queued for v3.21.


- Paul
--
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
Lad, Prabhakar April 10, 2015, 10:34 p.m. UTC | #4
Hi Paul,

On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
> On Wed, 28 Jan 2015, Benoit Parrot wrote:
>
>> Suspend/resume is functional with this patch.
>>
>> Tested-by: Benoit Parrot <bparrot@ti.com>
>
> Thanks folks, queued for v3.21.
>
>
I see that this patch is not into linux-next yet.

Cheers,
--Prabhakar Lad
--
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
Paul Walmsley April 10, 2015, 10:51 p.m. UTC | #5
Hi Prabhakar

On Fri, 10 Apr 2015, Lad, Prabhakar wrote:

> Hi Paul,
> 
> On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
> > On Wed, 28 Jan 2015, Benoit Parrot wrote:
> >
> >> Suspend/resume is functional with this patch.
> >>
> >> Tested-by: Benoit Parrot <bparrot@ti.com>
> >
> > Thanks folks, queued for v3.21.
> >
> >
> I see that this patch is not into linux-next yet.

thanks for the ping.  This slipped through the cracks here due to the 
kernel version number change from 3.21 to 4.1 :-(  Sorry about that; I 
will requeue for either 4.1-rc or 4.2.

Unfortunately I don't have an AM43xx board.  Is suspend/resume broken 
without this patch?  If so, then v4.1-rc seems like the appropriate 
target.


- Paul
--
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
Lad, Prabhakar April 10, 2015, 10:57 p.m. UTC | #6
Hi Paul,

On Fri, Apr 10, 2015 at 11:51 PM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi Prabhakar
>
> On Fri, 10 Apr 2015, Lad, Prabhakar wrote:
>
>> Hi Paul,
>>
>> On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
>> > On Wed, 28 Jan 2015, Benoit Parrot wrote:
>> >
>> >> Suspend/resume is functional with this patch.
>> >>
>> >> Tested-by: Benoit Parrot <bparrot@ti.com>
>> >
>> > Thanks folks, queued for v3.21.
>> >
>> >
>> I see that this patch is not into linux-next yet.
>
> thanks for the ping.  This slipped through the cracks here due to the
> kernel version number change from 3.21 to 4.1 :-(  Sorry about that; I
> will requeue for either 4.1-rc or 4.2.
>
> Unfortunately I don't have an AM43xx board.  Is suspend/resume broken
> without this patch?  If so, then v4.1-rc seems like the appropriate
> target.
>
there is kernel soft crashes without this patch, so this needs to go
in for v4.1-rc.

Cheers,
--Prabhakar Lad
--
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
Paul Walmsley April 10, 2015, 11:03 p.m. UTC | #7
On Fri, 10 Apr 2015, Lad, Prabhakar wrote:

> On Fri, Apr 10, 2015 at 11:51 PM, Paul Walmsley <paul@pwsan.com> wrote:
> > Hi Prabhakar
> >
> > On Fri, 10 Apr 2015, Lad, Prabhakar wrote:
> >
> >> Hi Paul,
> >>
> >> On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
> >> > On Wed, 28 Jan 2015, Benoit Parrot wrote:
> >> >
> >> >> Suspend/resume is functional with this patch.
> >> >>
> >> >> Tested-by: Benoit Parrot <bparrot@ti.com>
> >> >
> >> > Thanks folks, queued for v3.21.
> >> >
> >> >
> >> I see that this patch is not into linux-next yet.
> >
> > thanks for the ping.  This slipped through the cracks here due to the
> > kernel version number change from 3.21 to 4.1 :-(  Sorry about that; I
> > will requeue for either 4.1-rc or 4.2.
> >
> > Unfortunately I don't have an AM43xx board.  Is suspend/resume broken
> > without this patch?  If so, then v4.1-rc seems like the appropriate
> > target.
> >
> there is kernel soft crashes without this patch, so this needs to go
> in for v4.1-rc.

Could you provide some further detail?  Does it crash during boot, or 
during suspend, or ... ?  Also could you describe what you mean by "soft 
crash" ?


- Paul
--
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
Lad, Prabhakar April 16, 2015, 2:44 p.m. UTC | #8
Hi Paul,

On Sat, Apr 11, 2015 at 10:19 AM, Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Sat, Apr 11, 2015 at 12:03 AM, Paul Walmsley <paul@pwsan.com> wrote:
>> On Fri, 10 Apr 2015, Lad, Prabhakar wrote:
>>
>>> On Fri, Apr 10, 2015 at 11:51 PM, Paul Walmsley <paul@pwsan.com> wrote:
>>> > Hi Prabhakar
>>> >
>>> > On Fri, 10 Apr 2015, Lad, Prabhakar wrote:
>>> >
>>> >> Hi Paul,
>>> >>
>>> >> On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
>>> >> > On Wed, 28 Jan 2015, Benoit Parrot wrote:
>>> >> >
>>> >> >> Suspend/resume is functional with this patch.
>>> >> >>
>>> >> >> Tested-by: Benoit Parrot <bparrot@ti.com>
>>> >> >
>>> >> > Thanks folks, queued for v3.21.
>>> >> >
>>> >> >
>>> >> I see that this patch is not into linux-next yet.
>>> >
>>> > thanks for the ping.  This slipped through the cracks here due to the
>>> > kernel version number change from 3.21 to 4.1 :-(  Sorry about that; I
>>> > will requeue for either 4.1-rc or 4.2.
>>> >
>>> > Unfortunately I don't have an AM43xx board.  Is suspend/resume broken
>>> > without this patch?  If so, then v4.1-rc seems like the appropriate
>>> > target.
>>> >
>>> there is kernel soft crashes without this patch, so this needs to go
>>> in for v4.1-rc.
>>
>> Could you provide some further detail?  Does it crash during boot, or
>> during suspend, or ... ?  Also could you describe what you mean by "soft
>> crash" ?
>>
> with patch [1] applied and VPFE being enabled and this patch missing
> (ARM: AM43xx: hwmod: add VPFE hwmod entries) I have attached the
> boot log.
> By soft crash I meant it doesn't get hung :)
>
> With the above patch (ARM: AM43xx: hwmod: add VPFE hwmod entries)
> applied all goes well.
>
>
> [1] https://lkml.org/lkml/2015/3/12/1001
>

Any update on this ?

Cheers,
--Prabhakar Lad
--
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
Lad, Prabhakar May 1, 2015, 9 a.m. UTC | #9
On Fri, Apr 10, 2015 at 11:51 PM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi Prabhakar
>
> On Fri, 10 Apr 2015, Lad, Prabhakar wrote:
>
>> Hi Paul,
>>
>> On Tue, Feb 10, 2015 at 11:10 PM, Paul Walmsley <paul@pwsan.com> wrote:
>> > On Wed, 28 Jan 2015, Benoit Parrot wrote:
>> >
>> >> Suspend/resume is functional with this patch.
>> >>
>> >> Tested-by: Benoit Parrot <bparrot@ti.com>
>> >
>> > Thanks folks, queued for v3.21.
>> >
>> >
>> I see that this patch is not into linux-next yet.
>
> thanks for the ping.  This slipped through the cracks here due to the
> kernel version number change from 3.21 to 4.1 :-(  Sorry about that; I
> will requeue for either 4.1-rc or 4.2.
>
> Unfortunately I don't have an AM43xx board.  Is suspend/resume broken
> without this patch?  If so, then v4.1-rc seems like the appropriate
> target.
>
>
Ping..

Cheers,
--Prabhakar Lad
--
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
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 5c6c841..8543f9f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -514,6 +514,44 @@  static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
 	},
 };
 
+static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
+	.rev_offs       = 0x0,
+	.sysc_offs      = 0x104,
+	.sysc_flags     = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
+	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+				MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
+	.sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
+	.name           = "vpfe",
+	.sysc           = &am43xx_vpfe_sysc,
+};
+
+static struct omap_hwmod am43xx_vpfe0_hwmod = {
+	.name           = "vpfe0",
+	.class          = &am43xx_vpfe_hwmod_class,
+	.clkdm_name     = "l3s_clkdm",
+	.prcm           = {
+		.omap4  = {
+			.modulemode     = MODULEMODE_SWCTRL,
+			.clkctrl_offs   = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
+		},
+	},
+};
+
+static struct omap_hwmod am43xx_vpfe1_hwmod = {
+	.name           = "vpfe1",
+	.class          = &am43xx_vpfe_hwmod_class,
+	.clkdm_name     = "l3s_clkdm",
+	.prcm           = {
+		.omap4  = {
+			.modulemode     = MODULEMODE_SWCTRL,
+			.clkctrl_offs   = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
+		},
+	},
+};
+
 /* Interfaces */
 static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
 	.master		= &am33xx_l3_main_hwmod,
@@ -788,6 +826,34 @@  static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
+	.master         = &am43xx_vpfe0_hwmod,
+	.slave          = &am33xx_l3_main_hwmod,
+	.clk            = "l3_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
+	.master         = &am43xx_vpfe1_hwmod,
+	.slave          = &am33xx_l3_main_hwmod,
+	.clk            = "l3_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = {
+	.master         = &am33xx_l4_ls_hwmod,
+	.slave          = &am43xx_vpfe0_hwmod,
+	.clk            = "l4ls_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
+	.master         = &am33xx_l4_ls_hwmod,
+	.slave          = &am43xx_vpfe1_hwmod,
+	.clk            = "l4ls_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l4_wkup__synctimer,
 	&am43xx_l4_ls__timer8,
@@ -887,6 +953,10 @@  static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am43xx_l4_ls__dss,
 	&am43xx_l4_ls__dss_dispc,
 	&am43xx_l4_ls__dss_rfbi,
+	&am43xx_l3__vpfe0,
+	&am43xx_l3__vpfe1,
+	&am43xx_l4_ls__vpfe0,
+	&am43xx_l4_ls__vpfe1,
 	NULL,
 };
 
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index ad7b3e9..8aa4c2c 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -143,5 +143,6 @@ 
 #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET        0x0268
 #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET	0x05C0
 #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET		0x0a20
-
+#define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET		0x0068
+#define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET		0x0070
 #endif