Re: [PATCH 12/12] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and DSP

2012-04-19 Thread Paul Walmsley
Hi

On Wed, 7 Mar 2012, Paul Walmsley wrote:

 N800 logs this message on boot:
 
 [0.182281] omap_hwmod: iva: cannot be enabled for reset (3)
 
 Fix by creating basic IVA1 and DSP hwmods for OMAP2420, and a basic IVA2
 hwmod for OMAP2430.  There is still more information to be added, but
 this should resolve the immediate issue.
 
 Signed-off-by: Paul Walmsley p...@pwsan.com

Tony tested this on his 2430SDP while my board was down and discovered 
that it didn't boot on that platform.  Turns out that one of the hwmods 
was using an incorrect clock name.  Fixed in the updated patch, below.


- Paul

From: Paul Walmsley p...@pwsan.com
Date: Thu, 19 Apr 2012 03:00:02 -0600
Subject: [PATCH] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and
 DSP

N800 logs this message on boot:

[0.182281] omap_hwmod: iva: cannot be enabled for reset (3)

Fix by creating basic IVA1 and DSP hwmods for OMAP2420, and a basic IVA2
hwmod for OMAP2430.  There is still more information to be added, but
this should resolve the immediate issue.

Signed-off-by: Paul Walmsley p...@pwsan.com
---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |   46 ++--
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |   11 ++-
 2 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index b01b66a..2c087ff 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -43,10 +43,41 @@
  * IP blocks
  */
 
-/* IVA2 (IVA2) */
+/* IVA1 (IVA1) */
+static struct omap_hwmod_class iva1_hwmod_class = {
+   .name   = iva1,
+};
+
+static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
+   { .name = iva, .rst_shift = 8 },
+};
+
 static struct omap_hwmod omap2420_iva_hwmod = {
.name   = iva,
-   .class  = iva_hwmod_class,
+   .class  = iva1_hwmod_class,
+   .clkdm_name = iva1_clkdm,
+   .rst_lines  = omap2420_iva_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2420_iva_resets),
+   .main_clk   = iva1_ifck,
+};
+
+/* DSP */
+static struct omap_hwmod_class dsp_hwmod_class = {
+   .name   = dsp,
+};
+
+static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
+   { .name = logic, .rst_shift = 0 },
+   { .name = mmu, .rst_shift = 1 },
+};
+
+static struct omap_hwmod omap2420_dsp_hwmod = {
+   .name   = dsp,
+   .class  = dsp_hwmod_class,
+   .clkdm_name = dsp_clkdm,
+   .rst_lines  = omap2420_dsp_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2420_dsp_resets),
+   .main_clk   = dsp_fck,
 };
 
 /* I2C common */
@@ -234,7 +265,15 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
 static struct omap_hwmod_ocp_if omap2420_l3__iva = {
.master = omap2xxx_l3_main_hwmod,
.slave  = omap2420_iva_hwmod,
-   .clk= iva1_ifck,
+   .clk= core_l3_ck,
+   .user   = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* DSP - L3 interface */
+static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
+   .master = omap2xxx_l3_main_hwmod,
+   .slave  = omap2420_dsp_hwmod,
+   .clk= dsp_ick,
.user   = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -402,6 +441,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] 
__initdata = {
omap2420_l4_core__i2c1,
omap2420_l4_core__i2c2,
omap2420_l3__iva,
+   omap2420_l3__dsp,
omap2420_l4_wkup__timer1,
omap2xxx_l4_core__timer2,
omap2xxx_l4_core__timer3,
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 23ca551..71d9f88 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -45,9 +45,18 @@
  */
 
 /* IVA2 (IVA2) */
+static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
+   { .name = logic, .rst_shift = 0 },
+   { .name = mmu, .rst_shift = 1 },
+};
+
 static struct omap_hwmod omap2430_iva_hwmod = {
.name   = iva,
.class  = iva_hwmod_class,
+   .clkdm_name = dsp_clkdm,
+   .rst_lines  = omap2430_iva_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2430_iva_resets),
+   .main_clk   = dsp_fck,
 };
 
 /* I2C common */
@@ -599,7 +608,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
.master = omap2xxx_l3_main_hwmod,
.slave  = omap2430_iva_hwmod,
-   .clk= dsp_fck,
+   .clk= core_l3_ck,
.user   = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-- 
1.7.10

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


Re: [PATCH 12/12] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and DSP

2012-04-19 Thread Russell King - ARM Linux
On Thu, Apr 19, 2012 at 03:18:27AM -0600, Paul Walmsley wrote:
 N800 logs this message on boot:
 
 [0.182281] omap_hwmod: iva: cannot be enabled for reset (3)
 
 Fix by creating basic IVA1 and DSP hwmods for OMAP2420, and a basic IVA2
 hwmod for OMAP2430.  There is still more information to be added, but
 this should resolve the immediate issue.

FYI, I'm also seeing omap_hwmod errors on boot:

3430ldp: 
http://www.arm.linux.org.uk/developer/build/result.php?type=bootidx=133
omap_hwmod: i2c1: softreset failed (waited 1 usec)
omap_hwmod: i2c2: softreset failed (waited 1 usec)
omap_hwmod: i2c3: softreset failed (waited 1 usec)

4430sdp: 
http://www.arm.linux.org.uk/developer/build/result.php?type=bootidx=134
omap_hwmod: i2c1: softreset failed (waited 1 usec)
omap_hwmod: i2c2: softreset failed (waited 1 usec)
omap_hwmod: i2c3: softreset failed (waited 1 usec)
omap_hwmod: i2c4: softreset failed (waited 1 usec)
omap_hwmod: ipu: failed to hardreset
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/12] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and DSP

2012-04-19 Thread Paul Walmsley
On Thu, 19 Apr 2012, Russell King - ARM Linux wrote:

 FYI, I'm also seeing omap_hwmod errors on boot:
 
 3430ldp: 
 http://www.arm.linux.org.uk/developer/build/result.php?type=bootidx=133
 omap_hwmod: i2c1: softreset failed (waited 1 usec)
 omap_hwmod: i2c2: softreset failed (waited 1 usec)
 omap_hwmod: i2c3: softreset failed (waited 1 usec)
 
 4430sdp: 
 http://www.arm.linux.org.uk/developer/build/result.php?type=bootidx=134
 omap_hwmod: i2c1: softreset failed (waited 1 usec)
 omap_hwmod: i2c2: softreset failed (waited 1 usec)
 omap_hwmod: i2c3: softreset failed (waited 1 usec)
 omap_hwmod: i2c4: softreset failed (waited 1 usec)
 omap_hwmod: ipu: failed to hardreset

Thanks for the report.  Those should be resolved by:

ARM: OMAP2+: hwmod: Revert ARM: OMAP2+: hwmod: Make omap_hwmod_softreset 
wait for reset status

which was sent upstream to Tony as part of

http://git.kernel.org/?p=linux/kernel/git/pjw/omap-pending.git;a=commit;h=3c55c1baffa5f719eb2ae9729088bc867f972f53

Hopefully it will go into the next v3.4-rc kernel.


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


Re: [PATCH 12/12] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and DSP

2012-04-19 Thread Paul Walmsley
On Thu, 19 Apr 2012, Paul Walmsley wrote:

 Thanks for the report.  Those should be resolved by:
 
 ARM: OMAP2+: hwmod: Revert ARM: OMAP2+: hwmod: Make omap_hwmod_softreset 
 wait for reset status
 
 which was sent upstream to Tony as part of
 
 http://git.kernel.org/?p=linux/kernel/git/pjw/omap-pending.git;a=commit;h=3c55c1baffa5f719eb2ae9729088bc867f972f53

Sorry about that, meant to send a link to the tag:

http://git.kernel.org/?p=linux/kernel/git/pjw/omap-pending.git;a=tag;h=bb3fbe167596650383f423e0a495971086e5c069


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


[PATCH 12/12] ARM: OMAP2xxx: hwmod data: start to fix the IVA1, IVA2 and DSP

2012-03-07 Thread Paul Walmsley
N800 logs this message on boot:

[0.182281] omap_hwmod: iva: cannot be enabled for reset (3)

Fix by creating basic IVA1 and DSP hwmods for OMAP2420, and a basic IVA2
hwmod for OMAP2430.  There is still more information to be added, but
this should resolve the immediate issue.

Signed-off-by: Paul Walmsley p...@pwsan.com
---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |   46 ++--
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |   11 ++-
 2 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index b01b66a..2c087ff 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -43,10 +43,41 @@
  * IP blocks
  */
 
-/* IVA2 (IVA2) */
+/* IVA1 (IVA1) */
+static struct omap_hwmod_class iva1_hwmod_class = {
+   .name   = iva1,
+};
+
+static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
+   { .name = iva, .rst_shift = 8 },
+};
+
 static struct omap_hwmod omap2420_iva_hwmod = {
.name   = iva,
-   .class  = iva_hwmod_class,
+   .class  = iva1_hwmod_class,
+   .clkdm_name = iva1_clkdm,
+   .rst_lines  = omap2420_iva_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2420_iva_resets),
+   .main_clk   = iva1_ifck,
+};
+
+/* DSP */
+static struct omap_hwmod_class dsp_hwmod_class = {
+   .name   = dsp,
+};
+
+static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
+   { .name = logic, .rst_shift = 0 },
+   { .name = mmu, .rst_shift = 1 },
+};
+
+static struct omap_hwmod omap2420_dsp_hwmod = {
+   .name   = dsp,
+   .class  = dsp_hwmod_class,
+   .clkdm_name = dsp_clkdm,
+   .rst_lines  = omap2420_dsp_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2420_dsp_resets),
+   .main_clk   = dsp_fck,
 };
 
 /* I2C common */
@@ -234,7 +265,15 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
 static struct omap_hwmod_ocp_if omap2420_l3__iva = {
.master = omap2xxx_l3_main_hwmod,
.slave  = omap2420_iva_hwmod,
-   .clk= iva1_ifck,
+   .clk= core_l3_ck,
+   .user   = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* DSP - L3 interface */
+static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
+   .master = omap2xxx_l3_main_hwmod,
+   .slave  = omap2420_dsp_hwmod,
+   .clk= dsp_ick,
.user   = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -402,6 +441,7 @@ static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] 
__initdata = {
omap2420_l4_core__i2c1,
omap2420_l4_core__i2c2,
omap2420_l3__iva,
+   omap2420_l3__dsp,
omap2420_l4_wkup__timer1,
omap2xxx_l4_core__timer2,
omap2xxx_l4_core__timer3,
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 23ca551..b359bfb 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -45,9 +45,18 @@
  */
 
 /* IVA2 (IVA2) */
+static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
+   { .name = logic, .rst_shift = 0 },
+   { .name = mmu, .rst_shift = 1 },
+};
+
 static struct omap_hwmod omap2430_iva_hwmod = {
.name   = iva,
.class  = iva_hwmod_class,
+   .clkdm_name = dsp_clkdm,
+   .rst_lines  = omap2430_iva_resets,
+   .rst_lines_cnt  = ARRAY_SIZE(omap2430_iva_resets),
+   .main_clk   = dsp_fck,
 };
 
 /* I2C common */
@@ -599,7 +608,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
.master = omap2xxx_l3_main_hwmod,
.slave  = omap2430_iva_hwmod,
-   .clk= dsp_fck,
+   .clk= core_l3_ick,
.user   = OCP_USER_MPU | OCP_USER_SDMA,
 };
 


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