AM33XX PRCM architecture is different that any OMAP family
of devices, so it is required to have separate implementation
to handle AM33XX module enable/disable, reset assert/deassert
functionality.
This patch adds wrapper api's in omap_hwmod framework to
access prm/cm for AM33XX family of devices.
Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 180 ++++++++++++++++++++++++++++++++++++++
1 files changed, 180 insertions(+), 0 deletions(-)
@@ -2481,6 +2560,33 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)}/**+*_am33xx_wait_target_ready-waitforamoduletoleaveslaveidle+*@oh:structomap_hwmod*+*+*Waitforamodule@ohtoleaveslaveidle.Returns0ifthemodule+*doesnothaveanIDLESTbitorifthemodulesuccessfullyleaves+*slaveidle;otherwise,passalongthereturnvalueofthe+*appropriate*_cm*_wait_module_ready()function.+*/+staticint_am33xx_wait_target_ready(structomap_hwmod*oh)+{+if(!oh||!oh->clkdm)+return-EINVAL;++if(oh->flags&HWMOD_NO_IDLEST)+return0;++if(!_find_mpu_rt_port(oh))+return0;++/* XXX check module SIDLEMODE, hardreset status */++returnam33xx_cm_wait_module_ready(oh->clkdm->cm_inst,+oh->clkdm->clkdm_offs,+oh->prcm.omap4.clkctrl_offs);+}++/***_omap2_assert_hardreset-callOMAP2PRMhardresetfnwithhwmodargs*@oh:structomap_hwmod*toasserthardreset*@ohri:hardresetlinedata
@@ -2611,6 +2717,72 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,oh->prcm.omap4.rstctrl_offs);}+/**+*_am33xx_assert_hardreset-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*toasserthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_assert_hardreset()withparametersextracted+*fromthehwmod@ohandthehardresetlinedata@ohri.Only+*intendedforuseasansoc_opsfunctionpointer.Passesalongthe+*returnvaluefromam33xx_prminst_assert_hardreset().XXXThis+*functionisscheduledforremovalwhenthePRMcodeismovedinto+*drivers/.+*/+staticint_am33xx_assert_hardreset(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)++{+returnam33xx_prm_assert_hardreset(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs);+}++/**+*_am33xx_deassert_hardreset-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*todeasserthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_deassert_hardreset()withparametersextracted+*fromthehwmod@ohandthehardresetlinedata@ohri.Only+*intendedforuseasansoc_opsfunctionpointer.Passesalongthe+*returnvaluefromam33xx_prminst_deassert_hardreset().XXXThis+*functionisscheduledforremovalwhenthePRMcodeismovedinto+*drivers/.+*/+staticint_am33xx_deassert_hardreset(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)+{+if(ohri->st_shift)+pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",+oh->name,ohri->name);++returnam33xx_prm_deassert_hardreset(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs,+oh->prcm.omap4.rstst_offs);+}++/**+*_am33xx_is_hardreset_asserted-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*totesthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_is_hardreset_asserted()withparameters+*extractedfromthehwmod@ohandthehardresetlinedata@ohri.+*Onlyintendedforuseasansoc_opsfunctionpointer.Passesalong+*thereturnvaluefromam33xx_prminst_is_hardreset_asserted().XXX+*ThisfunctionisscheduledforremovalwhenthePRMcodeismoved+*intodrivers/.+*/+staticint_am33xx_is_hardreset_asserted(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)+{+returnam33xx_prm_is_hardreset_asserted(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs);+}+/* Public functions */u32omap_hwmod_read(structomap_hwmod*oh,u16reg_offs)
On Thu, Jun 28, 2012 at 21:14:16, Hiremath, Vaibhav wrote:
AM33XX PRCM architecture is different that any OMAP family
of devices, so it is required to have separate implementation
to handle AM33XX module enable/disable, reset assert/deassert
functionality.
This patch adds wrapper api's in omap_hwmod framework to
access prm/cm for AM33XX family of devices.
Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
Cc: Tony Lindgren <tony@atomide.com>
---
@@ -2481,6 +2560,33 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)}/**+*_am33xx_wait_target_ready-waitforamoduletoleaveslaveidle+*@oh:structomap_hwmod*+*+*Waitforamodule@ohtoleaveslaveidle.Returns0ifthemodule+*doesnothaveanIDLESTbitorifthemodulesuccessfullyleaves+*slaveidle;otherwise,passalongthereturnvalueofthe+*appropriate*_cm*_wait_module_ready()function.+*/+staticint_am33xx_wait_target_ready(structomap_hwmod*oh)+{+if(!oh||!oh->clkdm)+return-EINVAL;++if(oh->flags&HWMOD_NO_IDLEST)+return0;++if(!_find_mpu_rt_port(oh))+return0;++/* XXX check module SIDLEMODE, hardreset status */++returnam33xx_cm_wait_module_ready(oh->clkdm->cm_inst,+oh->clkdm->clkdm_offs,+oh->prcm.omap4.clkctrl_offs);+}++/***_omap2_assert_hardreset-callOMAP2PRMhardresetfnwithhwmodargs*@oh:structomap_hwmod*toasserthardreset*@ohri:hardresetlinedata
@@ -2611,6 +2717,72 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,oh->prcm.omap4.rstctrl_offs);}+/**+*_am33xx_assert_hardreset-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*toasserthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_assert_hardreset()withparametersextracted+*fromthehwmod@ohandthehardresetlinedata@ohri.Only+*intendedforuseasansoc_opsfunctionpointer.Passesalongthe+*returnvaluefromam33xx_prminst_assert_hardreset().XXXThis+*functionisscheduledforremovalwhenthePRMcodeismovedinto+*drivers/.+*/+staticint_am33xx_assert_hardreset(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)++{+returnam33xx_prm_assert_hardreset(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs);+}++/**+*_am33xx_deassert_hardreset-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*todeasserthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_deassert_hardreset()withparametersextracted+*fromthehwmod@ohandthehardresetlinedata@ohri.Only+*intendedforuseasansoc_opsfunctionpointer.Passesalongthe+*returnvaluefromam33xx_prminst_deassert_hardreset().XXXThis+*functionisscheduledforremovalwhenthePRMcodeismovedinto+*drivers/.+*/+staticint_am33xx_deassert_hardreset(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)+{+if(ohri->st_shift)+pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",+oh->name,ohri->name);++returnam33xx_prm_deassert_hardreset(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs,+oh->prcm.omap4.rstst_offs);+}++/**+*_am33xx_is_hardreset_asserted-callAM33XXPRMhardresetfnwithhwmodargs+*@oh:structomap_hwmod*totesthardreset+*@ohri:hardresetlinedata+*+*Callam33xx_prminst_is_hardreset_asserted()withparameters+*extractedfromthehwmod@ohandthehardresetlinedata@ohri.+*Onlyintendedforuseasansoc_opsfunctionpointer.Passesalong+*thereturnvaluefromam33xx_prminst_is_hardreset_asserted().XXX+*ThisfunctionisscheduledforremovalwhenthePRMcodeismoved+*intodrivers/.+*/+staticint_am33xx_is_hardreset_asserted(structomap_hwmod*oh,+structomap_hwmod_rst_info*ohri)+{+returnam33xx_prm_is_hardreset_asserted(ohri->rst_shift,+oh->clkdm->pwrdm.ptr->prcm_offs,+oh->prcm.omap4.rstctrl_offs);+}+/* Public functions */u32omap_hwmod_read(structomap_hwmod*oh,u16reg_offs)
On Thu, Jun 28, 2012 at 21:14:16, Hiremath, Vaibhav wrote:
quoted
AM33XX PRCM architecture is different that any OMAP family
of devices, so it is required to have separate implementation
to handle AM33XX module enable/disable, reset assert/deassert
functionality.
This patch adds wrapper api's in omap_hwmod framework to
access prm/cm for AM33XX family of devices.
Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
Cc: Tony Lindgren <tony@atomide.com>
---
On Wed, Jul 04, 2012 at 14:43:15, Paul Walmsley wrote:
On Tue, 3 Jul 2012, Hiremath, Vaibhav wrote:
quoted
On Thu, Jun 28, 2012 at 21:14:16, Hiremath, Vaibhav wrote:
quoted
AM33XX PRCM architecture is different that any OMAP family
of devices, so it is required to have separate implementation
to handle AM33XX module enable/disable, reset assert/deassert
functionality.
This patch adds wrapper api's in omap_hwmod framework to
access prm/cm for AM33XX family of devices.
Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
Cc: Tony Lindgren <tony@atomide.com>
---
On Wed, Jul 04, 2012 at 14:43:15, Paul Walmsley wrote:
On Tue, 3 Jul 2012, Hiremath, Vaibhav wrote:
quoted
On Thu, Jun 28, 2012 at 21:14:16, Hiremath, Vaibhav wrote:
quoted
AM33XX PRCM architecture is different that any OMAP family
of devices, so it is required to have separate implementation
to handle AM33XX module enable/disable, reset assert/deassert
functionality.
This patch adds wrapper api's in omap_hwmod framework to
access prm/cm for AM33XX family of devices.
Signed-off-by: Vaibhav Hiremath <redacted>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
Cc: Tony Lindgren <tony@atomide.com>
---
Paul,
Two more patches got missed last time,
ARM: OMAP2+: hwmod: Add new sysc_type3 into omap_hwmod required for am33xx
ARM: OMAP3/4: omap_hwmod: Add rstst_off field to struct omap_hwmod_omap4_prcm
Can this also be merged into your pull request?
Thanks,
Vaibhav
ARM: OMAP2+: hwmod: Add new sysc_type3 into omap_hwmod required for am33xx
ARM: OMAP3/4: omap_hwmod: Add rstst_off field to struct omap_hwmod_omap4_prcm
Can this also be merged into your pull request?
Agreed, but would it make sense to include in v3.6 merge window?
Barring force majeure, I'm pretty much done with patches for the v3.6
merge window. Am working on this patch and the AM33xx hwmod data for
v3.7.
- Paul