All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Balbi, Felipe" <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 4/5] arm: omap: introduce 32k timer hwmod for omap2/3/4
Date: Wed, 20 Oct 2010 23:32:04 +0200	[thread overview]
Message-ID: <4CBF5FD4.6010000@ti.com> (raw)
In-Reply-To: <1287480136-2046-5-git-send-email-balbi@ti.com>

On 10/19/2010 11:22 AM, Balbi, Felipe wrote:
> Add 32k timer hwmod to the database.
>
> Signed-off-by: Felipe Balbi<balbi@ti.com>
Could you add my sign-off as well on this one for the OMAP4 part?

Thanks,
Benoit

> ---
>   arch/arm/mach-omap2/omap_hwmod_2420_data.c |   52 +++++++++++++++++++++++
>   arch/arm/mach-omap2/omap_hwmod_2430_data.c |   52 +++++++++++++++++++++++
>   arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   51 +++++++++++++++++++++++
>   arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   61 ++++++++++++++++++++++++++++
>   4 files changed, 216 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 a1a3dd6..05b9d2a 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> @@ -557,6 +557,57 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
>   	.flags		= HWMOD_16BIT_REG,
>   };
>
> +/*
> + * 'counter' class
> + * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
> + */
> +
> +static struct omap_hwmod_class omap2420_counter_hwmod_class = {
> +	.name = "counter",
> +};
> +
> +/* counter_32k */
> +static struct omap_hwmod omap2420_counter_32k_hwmod;
> +static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = {
> +	{
> +		.pa_start	= 0x48004000,
> +		.pa_end		= 0x48000fff,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_wkup ->  counter_32k */
> +static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
> +	.master		=&omap2420_l4_wkup_hwmod,
> +	.slave		=&omap2420_counter_32k_hwmod,
> +	.clk		= "l4_ck",
> +	.addr		= omap2420_counter_32k_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2420_counter_32k_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* counter_32k slave ports */
> +static struct omap_hwmod_ocp_if *omap2420_counter_32k_slaves[] = {
> +	&omap2420_l4_wkup__counter_32k,
> +};
> +
> +static struct omap_hwmod omap2420_counter_32k_hwmod = {
> +	.name		= "counter_32k",
> +	.class		=&omap2420_counter_hwmod_class,
> +	.main_clk	= "sync_32k_ick",
> +	.prcm = {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT1_SHIFT,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2420_counter_32k_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2420_counter_32k_slaves),
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
> +};
> +
>   static __initdata struct omap_hwmod *omap2420_hwmods[] = {
>   	&omap2420_l3_main_hwmod,
>   	&omap2420_l4_core_hwmod,
> @@ -569,6 +620,7 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = {
>   	&omap2420_uart3_hwmod,
>   	&omap2420_i2c1_hwmod,
>   	&omap2420_i2c2_hwmod,
> +	&omap2420_counter_32k_hwmod,
>   	NULL,
>   };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> index 7cf0d3a..96e9b12 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> @@ -569,6 +569,57 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
>   	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
>   };
>
> +/*
> + * 'counter' class
> + * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
> + */
> +
> +static struct omap_hwmod_class omap2430_counter_hwmod_class = {
> +	.name = "counter",
> +};
> +
> +/* counter_32k */
> +static struct omap_hwmod omap2430_counter_32k_hwmod;
> +static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = {
> +	{
> +		.pa_start	= 0x48004000,
> +		.pa_end		= 0x48000fff,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_wkup ->  counter_32k */
> +static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
> +	.master		=&omap2430_l4_wkup_hwmod,
> +	.slave		=&omap2430_counter_32k_hwmod,
> +	.clk		= "l4_ck",
> +	.addr		= omap2430_counter_32k_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap2430_counter_32k_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* counter_32k slave ports */
> +static struct omap_hwmod_ocp_if *omap2430_counter_32k_slaves[] = {
> +	&omap2430_l4_wkup__counter_32k,
> +};
> +
> +static struct omap_hwmod omap2430_counter_32k_hwmod = {
> +	.name		= "counter_32k",
> +	.class		=&omap2430_counter_hwmod_class,
> +	.main_clk	= "sync_32k_ick",
> +	.prcm = {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP24XX_EN_GPT1_SHIFT,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
> +		},
> +	},
> +	.slaves		= omap2430_counter_32k_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap2430_counter_32k_slaves),
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
> +};
> +
>   static __initdata struct omap_hwmod *omap2430_hwmods[] = {
>   	&omap2430_l3_main_hwmod,
>   	&omap2430_l4_core_hwmod,
> @@ -581,6 +632,7 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
>   	&omap2430_uart3_hwmod,
>   	&omap2430_i2c1_hwmod,
>   	&omap2430_i2c2_hwmod,
> +	&omap2430_counter_32k_hwmod,
>   	NULL,
>   };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index ed6bf4a..8e8fae4 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -736,6 +736,56 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
>   	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
>   };
>
> +/*
> + * 'counter' class
> + * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
> + */
> +static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
> +	.name = "counter",
> +};
> +
> +/* counter_32k */
> +static struct omap_hwmod omap3xxx_counter_32k_hwmod;
> +static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
> +	{
> +		.pa_start	= 0x48324000,
> +		.pa_end		= 0x48320fff,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_wkup ->  counter_32k */
> +static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
> +	.master		=&omap3xxx_l4_wkup_hwmod,
> +	.slave		=&omap3xxx_counter_32k_hwmod,
> +	.clk		= "wkup_l4_ick",
> +	.addr		= omap3xxx_counter_32k_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap3xxx_counter_32k_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* counter_32k slave ports */
> +static struct omap_hwmod_ocp_if *omap3xxx_counter_32k_slaves[] = {
> +	&omap3xxx_l4_wkup__counter_32k,
> +};
> +
> +static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
> +	.name		= "counter_32k",
> +	.class		=&omap3xxx_counter_hwmod_class,
> +	.main_clk	= "omap_32ksync_ick",
> +	.prcm = {
> +		.omap2 = {
> +			.prcm_reg_id = 1,
> +			.module_bit = OMAP3430_EN_GPT1_SHIFT,
> +			.idlest_reg_id = 1,
> +			.idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
> +		},
> +	},
> +	.slaves		= omap3xxx_counter_32k_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap3xxx_counter_32k_slaves),
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
> +};
> +
>   static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
>   	&omap3xxx_l3_main_hwmod,
>   	&omap3xxx_l4_core_hwmod,
> @@ -751,6 +801,7 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
>   	&omap3xxx_i2c1_hwmod,
>   	&omap3xxx_i2c2_hwmod,
>   	&omap3xxx_i2c3_hwmod,
> +	&omap3xxx_counter_32k_hwmod,
>   	NULL,
>   };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> index 0d5c6eb..e86dc11 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> @@ -383,6 +383,63 @@ static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
>   };
>
>   /*
> + * 'counter' class
> + * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
> + */
> +
> +static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
> +	.rev_offs	= 0x0000,
> +	.sysc_offs	= 0x0004,
> +	.sysc_flags	= SYSC_HAS_SIDLEMODE,
> +	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> +	.sysc_fields	=&omap_hwmod_sysc_type1,
> +};
> +
> +static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
> +	.name = "counter",
> +	.sysc =&omap44xx_counter_sysc,
> +};
> +
> +/* counter_32k */
> +static struct omap_hwmod omap44xx_counter_32k_hwmod;
> +static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
> +	{
> +		.pa_start	= 0x4a304000,
> +		.pa_end		= 0x4a30401f,
> +		.flags		= ADDR_TYPE_RT
> +	},
> +};
> +
> +/* l4_wkup ->  counter_32k */
> +static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
> +	.master		=&omap44xx_l4_wkup_hwmod,
> +	.slave		=&omap44xx_counter_32k_hwmod,
> +	.clk		= "l4_wkup_clk_mux_ck",
> +	.addr		= omap44xx_counter_32k_addrs,
> +	.addr_cnt	= ARRAY_SIZE(omap44xx_counter_32k_addrs),
> +	.user		= OCP_USER_MPU | OCP_USER_SDMA,
> +};
> +
> +/* counter_32k slave ports */
> +static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
> +	&omap44xx_l4_wkup__counter_32k,
> +};
> +
> +static struct omap_hwmod omap44xx_counter_32k_hwmod = {
> +	.name		= "counter_32k",
> +	.class		=&omap44xx_counter_hwmod_class,
> +	.main_clk	= "sys_32k_ck",
> +	.prcm = {
> +		.omap4 = {
> +			.clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL,
> +		},
> +	},
> +	.slaves		= omap44xx_counter_32k_slaves,
> +	.slaves_cnt	= ARRAY_SIZE(omap44xx_counter_32k_slaves),
> +	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
> +};
> +
> +/*
>    * 'i2c' class
>    * multimaster high-speed i2c controller
>    */
> @@ -1058,6 +1115,10 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
>   	&omap44xx_l4_cfg_hwmod,
>   	&omap44xx_l4_per_hwmod,
>   	&omap44xx_l4_wkup_hwmod,
> +
> +	/* counter class */
> +	&omap44xx_counter_32k_hwmod,
> +
>   	/* i2c class */
>   	&omap44xx_i2c1_hwmod,
>   	&omap44xx_i2c2_hwmod,


  reply	other threads:[~2010-10-20 21:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19  9:22 [PATCH 0/5] 32k sync timer meets hwmod Felipe Balbi
2010-10-19  9:22 ` [PATCH 1/5] arm: omap1/2/3/4: convert 32k-sync driver to a platform_driver Felipe Balbi
2010-10-19  9:22 ` [PATCH 2/5] arm: omap: counter-32k: convert to pm_runtime API Felipe Balbi
2010-10-21 17:46   ` Kevin Hilman
2010-10-21 19:06     ` Felipe Balbi
2010-10-21 20:17       ` Kevin Hilman
2010-10-22  6:31         ` Felipe Balbi
2010-10-19  9:22 ` [PATCH 3/5] clocksource: move omap 32k timer to drivers/clocksource Felipe Balbi
2010-10-19  9:22 ` [PATCH 4/5] arm: omap: introduce 32k timer hwmod for omap2/3/4 Felipe Balbi
2010-10-20 21:32   ` Cousson, Benoit [this message]
2010-10-21  5:30     ` Felipe Balbi
2010-10-21 17:57   ` Kevin Hilman
2010-10-21 19:08     ` Felipe Balbi
2010-10-21 20:20       ` Kevin Hilman
2010-10-21 20:29   ` Kevin Hilman
2010-10-19  9:22 ` [PATCH 5/5] arm: omap: 32k: move to omap_device_build Felipe Balbi
2010-10-19  9:23 ` [PATCH 0/5] 32k sync timer meets hwmod Felipe Balbi
2010-10-20 21:29 ` Cousson, Benoit
2010-10-21  5:04   ` DebBarma, Tarun Kanti
2010-10-21 18:00 ` Kevin Hilman
2010-10-21 19:09   ` Felipe Balbi
2010-10-22 19:01     ` green
2010-10-25  7:45       ` Felipe Balbi

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=4CBF5FD4.6010000@ti.com \
    --to=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.