Re: [PATCH v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-17 Thread Tony Lindgren
* Ramirez Luna, Omar omar.rami...@ti.com [110215 16:11]:
 
  If you have to do several platform_get_irq_byname to get this one, I'd
  prefer to get rid of that name for OMAP4. It will make mailbox irq
  consistent with the other hwmods.
 
 I was thinking to standardize the names to be mbox0..mboxN across all
 the platforms, reason being that the mailbox also has capabilities to
 be used not only by dsp or iva, by using a polling method.
 
 So even if the mailbox in OMAP3 is called dsp, it has 4 more queues
 apart from the 2 used for messaging between arm and dsp, that could be
 used even if tidspbridge wasn't there.

So what's the status of this series? Can the rest of the patches
now be applied on top of the current omap-for-linus or do the names
still need fixing?

Tony
--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-17 Thread Ramirez Luna, Omar
Hi Tony,

On Thu, Feb 17, 2011 at 5:39 PM, Tony Lindgren t...@atomide.com wrote:
 * Ramirez Luna, Omar omar.rami...@ti.com [110215 16:11]:

  If you have to do several platform_get_irq_byname to get this one, I'd
  prefer to get rid of that name for OMAP4. It will make mailbox irq
  consistent with the other hwmods.

 I was thinking to standardize the names to be mbox0..mboxN across all
 the platforms, reason being that the mailbox also has capabilities to
 be used not only by dsp or iva, by using a polling method.

 So even if the mailbox in OMAP3 is called dsp, it has 4 more queues
 apart from the 2 used for messaging between arm and dsp, that could be
 used even if tidspbridge wasn't there.

 So what's the status of this series? Can the rest of the patches
 now be applied on top of the current omap-for-linus or do the names
 still need fixing?

I'm going to remove the names for the hwmods with a single irq. And
change the interface clock to be the main_clk, so it can be disabled
when runtime pm is disabled.

I won't resend the patch for OMAP4 hwmod data, as this was send
earlier by Benoit.

Regards,

Omar
--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-15 Thread Ramirez Luna, Omar
Hi Benoit,

On Mon, Feb 14, 2011 at 9:00 AM, Cousson, Benoit b-cous...@ti.com wrote:
 +static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
 +       { .name = mbox, .irq = 26 + OMAP44XX_IRQ_GIC_START, },

 The original entry was unnamed since it is an unique entry and thus does not
 need to be differentiate on this platform.

        { .irq = 26 + OMAP44XX_IRQ_GIC_START },

 Do you really need to have a name here? The strategy being to provide a name
 only if more than one entry exist.
 It is perfectibility doable, I'm just trying to understand your rational.

It is this way instead of plain platform_get_irq because omap2420 has
two interrupt sources to MPU and mailbox driver uses
platform_get_irq_byname to get the irq number.

Regards,

Omar
--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-15 Thread Cousson, Benoit

Hi Omar,

On 2/15/2011 10:55 PM, Ramirez Luna, Omar wrote:

Hi Benoit,

On Mon, Feb 14, 2011 at 9:00 AM, Cousson, Benoitb-cous...@ti.com  wrote:

+static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
+   { .name = mbox, .irq = 26 + OMAP44XX_IRQ_GIC_START, },


The original entry was unnamed since it is an unique entry and thus does not
need to be differentiate on this platform.

{ .irq = 26 + OMAP44XX_IRQ_GIC_START },

Do you really need to have a name here? The strategy being to provide a name
only if more than one entry exist.
It is perfectibility doable, I'm just trying to understand your rational.


It is this way instead of plain platform_get_irq because omap2420 has
two interrupt sources to MPU and mailbox driver uses
platform_get_irq_byname to get the irq number.


This is what I was thinking, except that on OMAP2420 the names are:
+   { .name = dsp, .irq = 26, },
+   { .name = iva, .irq = 34, },

and on OMAP2430 and OMAP3
+   { .name = dsp, .irq = 26, },

so why is it named mbox on OMAP4?

If you have to do several platform_get_irq_byname to get this one, I'd 
prefer to get rid of that name for OMAP4. It will make mailbox irq 
consistent with the other hwmods.


Thanks,
Benoit

--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-15 Thread Ramirez Luna, Omar
Hi,

On Tue, Feb 15, 2011 at 4:05 PM, Cousson, Benoit b-cous...@ti.com wrote:
 It is this way instead of plain platform_get_irq because omap2420 has
 two interrupt sources to MPU and mailbox driver uses
 platform_get_irq_byname to get the irq number.

 This is what I was thinking, except that on OMAP2420 the names are:
 +       { .name = dsp, .irq = 26, },
 +       { .name = iva, .irq = 34, },

 and on OMAP2430 and OMAP3
 +       { .name = dsp, .irq = 26, },

 so why is it named mbox on OMAP4?

I'm not very familiar with OMAP4 terminology... but IMHO, I guess
naming it dsp, would imply that this is a mailbox for the dsp, when
the interrupt can be generated by either the M3, dsp, I think even the
IVA can write into it.

 If you have to do several platform_get_irq_byname to get this one, I'd
 prefer to get rid of that name for OMAP4. It will make mailbox irq
 consistent with the other hwmods.

I was thinking to standardize the names to be mbox0..mboxN across all
the platforms, reason being that the mailbox also has capabilities to
be used not only by dsp or iva, by using a polling method.

So even if the mailbox in OMAP3 is called dsp, it has 4 more queues
apart from the 2 used for messaging between arm and dsp, that could be
used even if tidspbridge wasn't there.

Did I get you correctly?

Regards,

Omar
--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-14 Thread Cousson, Benoit

Hi Omar,

I found one minor change wrt to the original that I'd like to understand 
better.


On 2/2/2011 8:27 PM, Ramirez Luna, Omar wrote:

From: Benoit Coussonb-cous...@ti.com

Mailbox hwmod data for omap4.

Signed-off-by: Benoit Coussonb-cous...@ti.com
Signed-off-by: Omar Ramirez Lunaomar.rami...@ti.com
---
  arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   67 
  1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index c2806bd..c495669 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2001,6 +2001,70 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
.omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
  };

+/*
+ * 'mailbox' class
+ * mailbox module allowing communication between the on-chip processors
+ * using a queued mailbox-interrupt mechanism.
+ */
+
+static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
+   .rev_offs   = 0x,
+   .sysc_offs  = 0x0010,
+   .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
+  SYSC_HAS_SOFTRESET),
+   .idlemodes  = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+   .sysc_fields=omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
+   .name = mailbox,
+   .sysc =omap44xx_mailbox_sysc,
+};
+
+/* mailbox */
+static struct omap_hwmod omap44xx_mailbox_hwmod;
+static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
+   { .name = mbox, .irq = 26 + OMAP44XX_IRQ_GIC_START, },


The original entry was unnamed since it is an unique entry and thus does 
not need to be differentiate on this platform.


{ .irq = 26 + OMAP44XX_IRQ_GIC_START },

Do you really need to have a name here? The strategy being to provide a 
name only if more than one entry exist.

It is perfectibility doable, I'm just trying to understand your rational.

Thanks,
Benoit
--
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 v5 3/5] OMAP4: hwmod data: add mailbox data

2011-02-02 Thread Omar Ramirez Luna
From: Benoit Cousson b-cous...@ti.com

Mailbox hwmod data for omap4.

Signed-off-by: Benoit Cousson b-cous...@ti.com
Signed-off-by: Omar Ramirez Luna omar.rami...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   67 
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index c2806bd..c495669 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2001,6 +2001,70 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
.omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
 };
 
+/*
+ * 'mailbox' class
+ * mailbox module allowing communication between the on-chip processors
+ * using a queued mailbox-interrupt mechanism.
+ */
+
+static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
+   .rev_offs   = 0x,
+   .sysc_offs  = 0x0010,
+   .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
+  SYSC_HAS_SOFTRESET),
+   .idlemodes  = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+   .sysc_fields= omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
+   .name = mailbox,
+   .sysc = omap44xx_mailbox_sysc,
+};
+
+/* mailbox */
+static struct omap_hwmod omap44xx_mailbox_hwmod;
+static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
+   { .name = mbox, .irq = 26 + OMAP44XX_IRQ_GIC_START, },
+};
+
+static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
+   {
+   .pa_start   = 0x4a0f4000,
+   .pa_end = 0x4a0f41ff,
+   .flags  = ADDR_TYPE_RT,
+   },
+};
+
+/* l4_cfg - mailbox */
+static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
+   .master = omap44xx_l4_cfg_hwmod,
+   .slave  = omap44xx_mailbox_hwmod,
+   .clk= l4_div_ck,
+   .addr   = omap44xx_mailbox_addrs,
+   .addr_cnt   = ARRAY_SIZE(omap44xx_mailbox_addrs),
+   .user   = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* mailbox slave ports */
+static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
+   omap44xx_l4_cfg__mailbox,
+};
+
+static struct omap_hwmod omap44xx_mailbox_hwmod = {
+   .name   = mailbox,
+   .class  = omap44xx_mailbox_hwmod_class,
+   .mpu_irqs   = omap44xx_mailbox_irqs,
+   .mpu_irqs_cnt   = ARRAY_SIZE(omap44xx_mailbox_irqs),
+   .prcm   = {
+   .omap4 = {
+   .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL,
+   },
+   },
+   .slaves = omap44xx_mailbox_slaves,
+   .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
+   .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
+};
+
 static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
 
/* dmm class */
@@ -2068,6 +2132,9 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
omap44xx_wd_timer2_hwmod,
omap44xx_wd_timer3_hwmod,
 
+   /* mailbox class */
+   omap44xx_mailbox_hwmod,
+
NULL,
 };
 
-- 
1.7.1

--
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