Message ID | 1418919854-16164-2-git-send-email-prabhakar.csengg@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* Lad, Prabhakar <prabhakar.csengg@gmail.com> [141218 08:27]: > 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> Paul probably wants to queue this, I'll pick the dts changes. Regards, Tony > --- > arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 56 ++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/prcm43xx.h | 3 +- > 2 files changed, 58 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 fea01aa..bd9067e 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > @@ -483,6 +483,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, > @@ -750,6 +788,22 @@ 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 = &am33xx_l3_main_hwmod, > + .slave = &am43xx_vpfe0_hwmod, > + .clk = "l3_gclk", > + .flags = OCPIF_SWSUP_IDLE, > + .user = OCP_USER_MPU, > +}; > + > +static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = { > + .master = &am33xx_l3_main_hwmod, > + .slave = &am43xx_vpfe1_hwmod, > + .clk = "l3_gclk", > + .flags = OCPIF_SWSUP_IDLE, > + .user = OCP_USER_MPU, > +}; > + > static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { > &am33xx_l4_wkup__synctimer, > &am43xx_l4_ls__timer8, > @@ -848,6 +902,8 @@ 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, > 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 > -- > 1.9.1 > -- 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
Hi On Thu, 18 Dec 2014, Lad, Prabhakar wrote: > 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> ... > --- > arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 56 ++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/prcm43xx.h | 3 +- > 2 files changed, 58 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 fea01aa..bd9067e 100644 > --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c > +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c ... > @@ -750,6 +788,22 @@ 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 = &am33xx_l3_main_hwmod, > + .slave = &am43xx_vpfe0_hwmod, > + .clk = "l3_gclk", > + .flags = OCPIF_SWSUP_IDLE, > + .user = OCP_USER_MPU, > +}; > + > +static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = { > + .master = &am33xx_l3_main_hwmod, > + .slave = &am43xx_vpfe1_hwmod, > + .clk = "l3_gclk", > + .flags = OCPIF_SWSUP_IDLE, > + .user = OCP_USER_MPU, > +}; > + > static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { > &am33xx_l4_wkup__synctimer, > &am43xx_l4_ls__timer8, > @@ -848,6 +902,8 @@ 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, > NULL, > }; According to SPRUHL7 Figure 14-1 "VPFE Integration" and Table 14-2 "VPFE Connectivity Attributes", a VPFE has two interconnect ports per instance: one L4-Per port as a register target, and one L3 port as a DMA initiator. It's unclear to me whether the L3 port can also serve as a register target, but Section 2.1 "ARM Cortex-A9 Memory Map", Table 4-1 "L3 Master-Slave Connectivity", and Figure 4-2 "L4 Topology" suggest that it cannot. So if that's correct, there should be two more struct omap_hwmod_ocp_if records added in this patch for the register target ports that are connected to the L4. DSS is a good example: see am43xx_dss__l3_main and am43xx_l4_ls__dss in this same file. - 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
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index fea01aa..bd9067e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -483,6 +483,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, @@ -750,6 +788,22 @@ 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 = &am33xx_l3_main_hwmod, + .slave = &am43xx_vpfe0_hwmod, + .clk = "l3_gclk", + .flags = OCPIF_SWSUP_IDLE, + .user = OCP_USER_MPU, +}; + +static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = { + .master = &am33xx_l3_main_hwmod, + .slave = &am43xx_vpfe1_hwmod, + .clk = "l3_gclk", + .flags = OCPIF_SWSUP_IDLE, + .user = OCP_USER_MPU, +}; + static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l4_wkup__synctimer, &am43xx_l4_ls__timer8, @@ -848,6 +902,8 @@ 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, 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