public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "G, Manjunath Kondaiah" <manjugk@ti.com>
To: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Cc: linux-omap@vger.kernel.org, Thara Gopinath <thara@ti.com>
Subject: Re: [PATCH v5 2/12] OMAP2420: hwmod data: add dmtimer
Date: Mon, 6 Dec 2010 22:27:26 +0530	[thread overview]
Message-ID: <20101206165726.GB4924@manju-desktop> (raw)
In-Reply-To: <1291679059-13419-3-git-send-email-tarun.kanti@ti.com>

On Tue, Dec 07, 2010 at 05:14:09AM +0530, Tarun Kanti DebBarma wrote:
> From: Thara Gopinath <thara@ti.com>
> 
> Add dmtimer data.
> 
> Signed-off-by: Thara Gopinath <thara@ti.com>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> Acked-by: Cousson, Benoit <b-cousson@ti.com>
> Reviewed-by: Varadarajan, Charulatha <charu@ti.com>
> ---
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c |  635 ++++++++++++++++++++++++++++
>  1 files changed, 635 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> index adf6e36..6d2e527 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> @@ -16,6 +16,7 @@
>  #include <plat/cpu.h>
>  #include <plat/dma.h>
>  #include <plat/serial.h>
> +#include <plat/dmtimer.h>
>  
>  #include "omap_hwmod_common_data.h"
>  
> @@ -228,6 +229,626 @@ static struct omap_hwmod omap2420_iva_hwmod = {
>  	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
>  };
>  
> +/* Timer Common */
> +static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
> +	.rev_offs	= 0x0000,
> +	.sysc_offs	= 0x0010,
> +	.syss_offs	= 0x0014,
> +	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
> +			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> +			   SYSC_HAS_AUTOIDLE),
> +	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> +	.clockact       = 0x2,
> +	.sysc_fields    = &omap_hwmod_sysc_type1,
> +};
> +
> +static struct omap_hwmod_class omap2420_timer_hwmod_class = {
> +	.name = "timer",
> +	.sysc = &omap2420_timer_sysc,
> +	.rev = OMAP_TIMER_IP_VERSION_1,

You are using this macro here and defined the same in v5-6-12*
This will break build. Define this macro in the same patch.

> +};
> +
> +/* timer1 */
> +static struct omap_hwmod omap2420_timer1_hwmod;
> +static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = {
> +	{ .irq = INT_24XX_GPTIMER1, },

For a given platform, irq numbers are constants. You can replace this
assignment as:

{.irq = xx, }, /* INT_24XX_GPTIMER1 */

GPIO has followed the same convention. I2C and UART needs cleanup for
this.


> +};
> +
> +static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
> +	{
> +		.pa_start	= 0x48028000,
> +		.pa_end		= 0x48028000 + SZ_1K - 1,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_wkup -> timer1 */
> +static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
> +	.master		= &omap2420_l4_wkup_hwmod,
> +	.slave		= &omap2420_timer1_hwmod,
> +	.clk		= "gpt1_ick",
> +	.addr		= omap2420_timer1_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_timer1_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* timer1 slave port */
> +static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
> +	&omap2420_l4_wkup__timer1,
> +};
> +
> +/* timer1 hwmod */
> +static struct omap_hwmod omap2420_timer1_hwmod = {
> +	.name		= "timer1",
> +	.mpu_irqs	= omap2420_timer1_mpu_irqs,
> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap2420_timer1_mpu_irqs),
> +	.main_clk	= "gpt1_fck",
> +	.prcm		= {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT1_SHIFT,
> +			.module_offs = WKUP_MOD,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_timer1_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_timer1_slaves),
> +	.class		= &omap2420_timer_hwmod_class,
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
> +};
> +
> +/* timer2 */
> +static struct omap_hwmod omap2420_timer2_hwmod;
> +static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = {
> +	{ .irq = INT_24XX_GPTIMER2, },
> +};
> +
> +static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = {
> +	{
> +		.pa_start	= 0x4802a000,
> +		.pa_end		= 0x4802a000 + SZ_1K - 1,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_core -> timer2 */
> +static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
> +	.master		= &omap2420_l4_core_hwmod,
> +	.slave		= &omap2420_timer2_hwmod,
> +	.clk		= "gpt2_ick",
> +	.addr		= omap2420_timer2_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_timer2_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* timer2 slave port */
> +static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
> +	&omap2420_l4_core__timer2,
> +};
> +
> +/* timer2 hwmod */
> +static struct omap_hwmod omap2420_timer2_hwmod = {
> +	.name		= "timer2",
> +	.mpu_irqs	= omap2420_timer2_mpu_irqs,
> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap2420_timer2_mpu_irqs),
> +	.main_clk	= "gpt2_fck",
> +	.prcm		= {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT2_SHIFT,
> +			.module_offs = CORE_MOD,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_timer2_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_timer2_slaves),
> +	.class		= &omap2420_timer_hwmod_class,
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
> +};
> +
> +/* timer3 */
> +static struct omap_hwmod omap2420_timer3_hwmod;
> +static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = {
> +	{ .irq = INT_24XX_GPTIMER3, },
> +};
> +
> +static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = {
> +	{
> +		.pa_start	= 0x48078000,
> +		.pa_end		= 0x48078000 + SZ_1K - 1,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_core -> timer3 */
> +static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
> +	.master		= &omap2420_l4_core_hwmod,
> +	.slave		= &omap2420_timer3_hwmod,
> +	.clk		= "gpt3_ick",
> +	.addr		= omap2420_timer3_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_timer3_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* timer3 slave port */
> +static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
> +	&omap2420_l4_core__timer3,
> +};
> +
> +/* timer3 hwmod */
> +static struct omap_hwmod omap2420_timer3_hwmod = {
> +	.name		= "timer3",
> +	.mpu_irqs	= omap2420_timer3_mpu_irqs,
> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap2420_timer3_mpu_irqs),
> +	.main_clk	= "gpt3_fck",
> +	.prcm		= {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT3_SHIFT,
> +			.module_offs = CORE_MOD,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_timer3_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_timer3_slaves),
> +	.class		= &omap2420_timer_hwmod_class,
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
> +};
> +
> +/* timer4 */
> +static struct omap_hwmod omap2420_timer4_hwmod;
> +static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = {
> +	{ .irq = INT_24XX_GPTIMER4, },
> +};
> +
> +static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = {
> +	{
> +		.pa_start	= 0x4807a000,
> +		.pa_end		= 0x4807a000 + SZ_1K - 1,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_core -> timer4 */
> +static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
> +	.master		= &omap2420_l4_core_hwmod,
> +	.slave		= &omap2420_timer4_hwmod,
> +	.clk		= "gpt4_ick",
> +	.addr		= omap2420_timer4_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_timer4_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* timer4 slave port */
> +static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
> +	&omap2420_l4_core__timer4,
> +};
> +
> +/* timer4 hwmod */
> +static struct omap_hwmod omap2420_timer4_hwmod = {
> +	.name		= "timer4",
> +	.mpu_irqs	= omap2420_timer4_mpu_irqs,
> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap2420_timer4_mpu_irqs),
> +	.main_clk	= "gpt4_fck",
> +	.prcm		= {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT4_SHIFT,
> +			.module_offs = CORE_MOD,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_timer4_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_timer4_slaves),
> +	.class		= &omap2420_timer_hwmod_class,
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
> +};
> +
> +/* timer5 */
> +static struct omap_hwmod omap2420_timer5_hwmod;
> +static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = {
> +	{ .irq = INT_24XX_GPTIMER5, },
> +};
> +
> +static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = {
> +	{
> +		.pa_start	= 0x4807c000,
> +		.pa_end		= 0x4807c000 + SZ_1K - 1,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_core -> timer5 */
> +static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
> +	.master		= &omap2420_l4_core_hwmod,
> +	.slave		= &omap2420_timer5_hwmod,
> +	.clk		= "gpt5_ick",
> +	.addr		= omap2420_timer5_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_timer5_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* timer5 slave port */
> +static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
> +	&omap2420_l4_core__timer5,
> +};
> +
> +/* timer5 hwmod */
> +static struct omap_hwmod omap2420_timer5_hwmod = {
> +	.name		= "timer5",
> +	.mpu_irqs	= omap2420_timer5_mpu_irqs,
> +	.mpu_irqs_cnt	= ARRAY_SIZE(omap2420_timer5_mpu_irqs),
> +	.main_clk	= "gpt5_fck",
> +	.prcm		= {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT5_SHIFT,
> +			.module_offs = CORE_MOD,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_timer5_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_timer5_slaves),
> +	.class		= &omap2420_timer_hwmod_class,
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
> +};
> +
> +

extra line.

-Manjunath

  reply	other threads:[~2010-12-06 16:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 23:44 [PATCH v5 0/12] dmtimer adaptation to platform_driver Tarun Kanti DebBarma
2010-12-06 16:28 ` G, Manjunath Kondaiah
2010-12-07  4:59   ` DebBarma, Tarun Kanti
2010-12-14  2:09     ` Kevin Hilman
2010-12-06 23:44 ` [PATCH v5 1/12] OMAP2+: dmtimer: add device names to flck nodes Tarun Kanti DebBarma
2010-12-06 23:44 ` [PATCH v5 2/12] OMAP2420: hwmod data: add dmtimer Tarun Kanti DebBarma
2010-12-06 16:57   ` G, Manjunath Kondaiah [this message]
2010-12-06 23:44 ` [PATCH v5 3/12] OMAP2430: " Tarun Kanti DebBarma
2010-12-06 23:44 ` [PATCH v5 4/12] OMAP3: " Tarun Kanti DebBarma
2010-12-06 23:44 ` [PATCH v5 5/12] OMAP4: " Tarun Kanti DebBarma
2010-12-06 23:44 ` [PATCH v5 6/12] OMAP: dmtimer: infrastructure to support hwmod Tarun Kanti DebBarma
2010-12-06 17:09   ` G, Manjunath Kondaiah
2010-12-07  4:50     ` DebBarma, Tarun Kanti
2010-12-06 23:44 ` [PATCH v5 7/12] OMAP1: dmtimer: conversion to platform devices Tarun Kanti DebBarma
2010-12-06 17:56   ` G, Manjunath Kondaiah
2010-12-07  5:17     ` DebBarma, Tarun Kanti
2010-12-06 23:44 ` [PATCH v5 8/12] OMAP2+: dmtimer: convert " Tarun Kanti DebBarma
2010-12-06 18:26   ` G, Manjunath Kondaiah
2010-12-07  5:21     ` DebBarma, Tarun Kanti
2010-12-07  5:46   ` Varadarajan, Charulatha
2010-12-07  5:50     ` DebBarma, Tarun Kanti
2010-12-06 23:44 ` [PATCH v5 9/12] OMAP: dmtimer: platform driver Tarun Kanti DebBarma
2010-12-06 19:10   ` G, Manjunath Kondaiah
2010-12-07  5:32     ` DebBarma, Tarun Kanti
2010-12-07  5:47       ` G, Manjunath Kondaiah
2010-12-07  6:14         ` DebBarma, Tarun Kanti
2010-12-06 23:44 ` [PATCH v5 10/12] OMAP: dmtimer: switch-over to platform device driver Tarun Kanti DebBarma
2010-12-07  5:27   ` Varadarajan, Charulatha
2010-12-07  5:49     ` DebBarma, Tarun Kanti
2010-12-13 15:07   ` Cousson, Benoit
2010-12-06 23:44 ` [PATCH v5 11/12] OMAP: dmtimer: pm_runtime support Tarun Kanti DebBarma
2010-12-06 23:44 ` [PATCH v5 12/12] OMAP: dmtimer: add timeout to low-level routines Tarun Kanti DebBarma
2010-12-14  6:45 ` [PATCH v5 0/12] dmtimer adaptation to platform_driver Paul Walmsley
2010-12-15  2:06 ` Kevin Hilman
2010-12-15  4:59   ` DebBarma, Tarun Kanti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101206165726.GB4924@manju-desktop \
    --to=manjugk@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tarun.kanti@ti.com \
    --cc=thara@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox