* [PATCH 0/3] ARM: OMAP4: Enable AESS IP.
@ 2013-01-04 13:02 Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init Sebastien Guiriec
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 13:02 UTC (permalink / raw)
To: linux-arm-kernel
This patch serie extends the the hwmod HWMOD_EXT_OPT_MAIN_CLK flag for the
AESS IP. This IP has additional register for Auto Gatting configuration. As
it is used only for Audio the driver is not always loaded. We can reuse the
same flag as McPDM to work around the HW problem due to bad reset value of
AESS Auto gatting configuration register.
If we try to setup and reset AESS during boot time without this serie the
next clocks will still remain enable.
omapconf abe cfg:
|--------------------------------------------------------------|
| ABE Clock Domain Configuration |
|--------------------------------|-----------------------------|
| Clock State Transition control | HW-Auto |
| Clock State | |
| ABE_24M_FCLK | GATED |
| ABE_ALWON_32K_CLK | GATED |
| ABE_SYSCLK | GATED |
| 24M_FCLK | GATED |
| ABE_ICLK2 | RUNNING |
| DPLL_ABE_X2_CLK | RUNNING |
| PAD_CLKS | GATED |
| SLIMBUS_CLK | GATED |
| OPP Divider | ABE_CLK = DPLL_ABE_X2_CLK/1 |
|--------------------------------------------------------------|
Sebastien Guiriec (3):
ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching
IP block during init
ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel
init
OMAP4: hwmod data: Enable AESS hwmod device
arch/arm/mach-omap2/omap_hwmod.c | 2 +-
arch/arm/mach-omap2/omap_hwmod.h | 10 ++++++++--
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 16 ++++++++++++----
3 files changed, 21 insertions(+), 7 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init
2013-01-04 13:02 [PATCH 0/3] ARM: OMAP4: Enable AESS IP Sebastien Guiriec
@ 2013-01-04 13:02 ` Sebastien Guiriec
2013-01-04 18:19 ` Paul Walmsley
2013-01-04 13:02 ` [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 3/3] OMAP4: hwmod data: Enable AESS hwmod device Sebastien Guiriec
2 siblings, 1 reply; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 13:02 UTC (permalink / raw)
To: linux-arm-kernel
Rename HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
dependent on an off-chip functional clock that is not guaranteed to
be present during initialization. Same flag can be use for IP with
additional HW registers to control Auto IDLE mode.
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 2 +-
arch/arm/mach-omap2/omap_hwmod.h | 10 ++++++++--
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4653efb..640c179 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2447,7 +2447,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
if (oh->_state != _HWMOD_STATE_INITIALIZED)
return -EINVAL;
- if (oh->flags & HWMOD_EXT_OPT_MAIN_CLK)
+ if (oh->flags & HWMOD_NO_SETUP_RESET)
return -EPERM;
if (oh->rst_lines_cnt == 0) {
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 3ae852a..ce4bed4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -446,11 +446,17 @@ struct omap_hwmod_omap4_prcm {
* in order to complete the reset. Optional clocks will be disabled
* again after the reset.
* HWMOD_16BIT_REG: Module has 16bit registers
- * HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for
+ * HWMOD_NO_SETUP_RESET: This flag can be used for 2 problems:
+ * 1) The only main functional clock source for
* this IP block comes from an off-chip source and is not always
* enabled. This prevents the hwmod code from being able to
* enable and reset the IP block early. XXX Eventually it should
* be possible to query the clock framework for this information.
+ * 2) IP with additional registers for auto gatting control like AESS
+ * For some IPs we need to set AUTO_GATTING_ENABLE bit. This bit is set
+ * only when the associated driver is probed. If hwmod is enabling and
+ * reseting the IP early without setting auto idle bit then clocks are
+ * not gated.
*/
#define HWMOD_SWSUP_SIDLE (1 << 0)
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -461,7 +467,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_NO_IDLEST (1 << 6)
#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)
#define HWMOD_16BIT_REG (1 << 8)
-#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)
+#define HWMOD_NO_SETUP_RESET (1 << 9)
/*
* omap_hwmod._int_flags definitions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 129d508..b340a4e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2133,7 +2133,7 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
* available, so it doesn't seem that we have any choice in
* the kernel other than to avoid resetting it.
*/
- .flags = HWMOD_EXT_OPT_MAIN_CLK,
+ .flags = HWMOD_NO_SETUP_RESET,
.mpu_irqs = omap44xx_mcpdm_irqs,
.sdma_reqs = omap44xx_mcpdm_sdma_reqs,
.main_clk = "mcpdm_fck",
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init
2013-01-04 13:02 [PATCH 0/3] ARM: OMAP4: Enable AESS IP Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init Sebastien Guiriec
@ 2013-01-04 13:02 ` Sebastien Guiriec
2013-01-04 18:35 ` Paul Walmsley
2013-01-04 13:02 ` [PATCH 3/3] OMAP4: hwmod data: Enable AESS hwmod device Sebastien Guiriec
2 siblings, 1 reply; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 13:02 UTC (permalink / raw)
To: linux-arm-kernel
The AESS on OMAP4 has additional register on top of SYS_CONFIG for
auto gatting configuration. In order to avoid running clock after
boot up we should avoid to enable and reset the module during boot up.
Audio driver will be in charge of configuring the addition register.
At its core, this patch is a workaround for an OMAP hardware problem.
It should be possible to configure the OMAP with good default reset
configuration of AESS IP for auto gatting mode.
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index b340a4e..26d6cde 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -346,6 +346,14 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
.name = "aess",
.class = &omap44xx_aess_hwmod_class,
.clkdm_name = "abe_clkdm",
+ /*
+ * AESS has an internal register on top of SYS_CONFIG for
+ * AUTO GATTING mode. Unfortunately the reset value of this
+ * register is not set correctly. So until AESS driver is not
+ * probe we should not try to control the module during boot up.
+ * Audio driver will handle the additional register configuration.
+ */
+ .flags = HWMOD_NO_SETUP_RESET,
.mpu_irqs = omap44xx_aess_irqs,
.sdma_reqs = omap44xx_aess_sdma_reqs,
.main_clk = "aess_fck",
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] OMAP4: hwmod data: Enable AESS hwmod device
2013-01-04 13:02 [PATCH 0/3] ARM: OMAP4: Enable AESS IP Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init Sebastien Guiriec
@ 2013-01-04 13:02 ` Sebastien Guiriec
2 siblings, 0 replies; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 13:02 UTC (permalink / raw)
To: linux-arm-kernel
Enable AESS data in hwmod in order to be able to probe
audio driver.
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 26d6cde..dd60e52 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -6286,7 +6286,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
&omap44xx_l3_main_1__l3_main_3,
&omap44xx_l3_main_2__l3_main_3,
&omap44xx_l4_cfg__l3_main_3,
- /* &omap44xx_aess__l4_abe, */
+ &omap44xx_aess__l4_abe,
&omap44xx_dsp__l4_abe,
&omap44xx_l3_main_1__l4_abe,
&omap44xx_mpu__l4_abe,
@@ -6295,8 +6295,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
&omap44xx_l4_cfg__l4_wkup,
&omap44xx_mpu__mpu_private,
&omap44xx_l4_cfg__ocp_wp_noc,
- /* &omap44xx_l4_abe__aess, */
- /* &omap44xx_l4_abe__aess_dma, */
+ &omap44xx_l4_abe__aess,
+ &omap44xx_l4_abe__aess_dma,
&omap44xx_l3_main_2__c2c,
&omap44xx_l4_wkup__counter_32k,
&omap44xx_l4_cfg__ctrl_module_core,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init
2013-01-04 13:02 ` [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init Sebastien Guiriec
@ 2013-01-04 18:19 ` Paul Walmsley
2013-01-04 20:52 ` Sebastien Guiriec
0 siblings, 1 reply; 9+ messages in thread
From: Paul Walmsley @ 2013-01-04 18:19 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sebastien
On Fri, 4 Jan 2013, Sebastien Guiriec wrote:
> Rename HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
> dependent on an off-chip functional clock that is not guaranteed to
> be present during initialization. Same flag can be use for IP with
> additional HW registers to control Auto IDLE mode.
>
> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
We already have the HWMOD_NO_INIT_RESET flag. Wouldn't that accomplish
the same goal?
Also I think we can reset the AESS during init. I posted a patch for this
a few months ago, but looks like it got lost. Will reply to one of your
other patches with more details.
- Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init
2013-01-04 13:02 ` [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init Sebastien Guiriec
@ 2013-01-04 18:35 ` Paul Walmsley
2013-01-04 20:27 ` Sebastien Guiriec
0 siblings, 1 reply; 9+ messages in thread
From: Paul Walmsley @ 2013-01-04 18:35 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sebastien
On Fri, 4 Jan 2013, Sebastien Guiriec wrote:
> The AESS on OMAP4 has additional register on top of SYS_CONFIG for
> auto gatting configuration. In order to avoid running clock after
> boot up we should avoid to enable and reset the module during boot up.
>
> Audio driver will be in charge of configuring the addition register.
>
> At its core, this patch is a workaround for an OMAP hardware problem.
> It should be possible to configure the OMAP with good default reset
> configuration of AESS IP for auto gatting mode.
>
> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
What do you think about a slightly modified and updated version of:
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg69853.html
? That way we can reset the IP block at startup, like most of our other
IP blocks, to avoid previous OS and bootloader dependencies.
- Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init
2013-01-04 18:35 ` Paul Walmsley
@ 2013-01-04 20:27 ` Sebastien Guiriec
2013-01-07 8:12 ` Paul Walmsley
0 siblings, 1 reply; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 20:27 UTC (permalink / raw)
To: linux-arm-kernel
On 01/04/2013 07:35 PM, Paul Walmsley wrote:
> Hi Sebastien
>
> On Fri, 4 Jan 2013, Sebastien Guiriec wrote:
>
>> The AESS on OMAP4 has additional register on top of SYS_CONFIG for
>> auto gatting configuration. In order to avoid running clock after
>> boot up we should avoid to enable and reset the module during boot up.
>>
>> Audio driver will be in charge of configuring the addition register.
>>
>> At its core, this patch is a workaround for an OMAP hardware problem.
>> It should be possible to configure the OMAP with good default reset
>> configuration of AESS IP for auto gatting mode.
>>
>> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
>
> What do you think about a slightly modified and updated version of:
>
> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg69853.html
This solution is the better. I was thinking that Tony reject this
callback (but I realize that I miss the second series long time back).
Paul,
Do you want me to rebase this version and update the serie or are you
handle it?
>
> ? That way we can reset the IP block at startup, like most of our other
> IP blocks, to avoid previous OS and bootloader dependencies.
Yes can be useful.
>
>
> - Paul
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init
2013-01-04 18:19 ` Paul Walmsley
@ 2013-01-04 20:52 ` Sebastien Guiriec
0 siblings, 0 replies; 9+ messages in thread
From: Sebastien Guiriec @ 2013-01-04 20:52 UTC (permalink / raw)
To: linux-arm-kernel
On 01/04/2013 07:19 PM, Paul Walmsley wrote:
> Hi Sebastien
>
> On Fri, 4 Jan 2013, Sebastien Guiriec wrote:
>
>> Rename HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
>> dependent on an off-chip functional clock that is not guaranteed to
>> be present during initialization. Same flag can be use for IP with
>> additional HW registers to control Auto IDLE mode.
>>
>> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
>
> We already have the HWMOD_NO_INIT_RESET flag. Wouldn't that accomplish
> the same goal?
I am assuming that it was HWMOD_INIT_NO_RESET flag. This is not solving
the issue. After boot with this mode some of same clocks are still not
gated.
>
> Also I think we can reset the AESS during init. I posted a patch for this
> a few months ago, but looks like it got lost. Will reply to one of your
> other patches with more details.
>
>
> - Paul
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init
2013-01-04 20:27 ` Sebastien Guiriec
@ 2013-01-07 8:12 ` Paul Walmsley
0 siblings, 0 replies; 9+ messages in thread
From: Paul Walmsley @ 2013-01-07 8:12 UTC (permalink / raw)
To: linux-arm-kernel
Hi
On Fri, 4 Jan 2013, Sebastien Guiriec wrote:
> Paul,
> Do you want me to rebase this version and update the serie or are you handle
> it?
Sure, it would be great if you could take this over and test it and
repost.
You might find the 'aess_reset_devel_3.9' branch at
git://git.pwsan.com/linux-2.6 useful. It's a forward port of some of the
3.5-rc work. It's only compile-tested, so you might need to tweak it to
get it to work.
- Paul
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-07 8:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 13:02 [PATCH 0/3] ARM: OMAP4: Enable AESS IP Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init Sebastien Guiriec
2013-01-04 18:19 ` Paul Walmsley
2013-01-04 20:52 ` Sebastien Guiriec
2013-01-04 13:02 ` [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init Sebastien Guiriec
2013-01-04 18:35 ` Paul Walmsley
2013-01-04 20:27 ` Sebastien Guiriec
2013-01-07 8:12 ` Paul Walmsley
2013-01-04 13:02 ` [PATCH 3/3] OMAP4: hwmod data: Enable AESS hwmod device Sebastien Guiriec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).