public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Gopinath, Thara" <thara@ti.com>
Subject: Re: [PATCHv4 2/14] OMAP: dmtimer: infrastructure to support hwmod
Date: Tue, 23 Nov 2010 15:48:52 +0100	[thread overview]
Message-ID: <4CEBD454.8070003@ti.com> (raw)
In-Reply-To: <1290220778-22244-3-git-send-email-tarun.kanti@ti.com>

On 11/20/2010 3:39 AM, DebBarma, Tarun Kanti wrote:
> (1) Add new fields and data structures to support dmtimer conversion
> to platform driver.
> (2) Constants to identify IP revision so that Highlander IP in OMAP 4
> can be distinguished.
> (3) field to identify OMAP4 abe timers.
> (4) Interface function to support early boot.
>
> Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>
> Signed-off-by: Thara Gopinath<thara@ti.com>
> ---
>   arch/arm/mach-omap2/dmtimer.h             |   32 +++++++++++++++++++++++++++++
>   arch/arm/plat-omap/dmtimer.c              |    8 +++++++
>   arch/arm/plat-omap/include/plat/dmtimer.h |   19 +++++++++++++++++
>   3 files changed, 59 insertions(+), 0 deletions(-)
>   create mode 100644 arch/arm/mach-omap2/dmtimer.h
>
> diff --git a/arch/arm/mach-omap2/dmtimer.h b/arch/arm/mach-omap2/dmtimer.h
> new file mode 100644
> index 0000000..4d4493b
> --- /dev/null
> +++ b/arch/arm/mach-omap2/dmtimer.h
> @@ -0,0 +1,32 @@
> +/**
> + * OMAP Dual-Mode Timers - early initialization interface
> + *
> + * function interface called first to start dmtimer early initialization.
> + *
> + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
> + * Tarun Kanti DebBarma<tarun.kanti@ti.com>
> + *
> + * Copyright (C) 2010 Texas Instruments Incorporated
> + * Thara Gopinath<thara@ti.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
> + * kind, whether express or implied; without even the implied warranty
> + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +#ifndef __ASM_ARCH_DMTIMER_H
> +#define __ASM_ARCH_DMTIMER_H
> +
> +/*
> + * dmtimer is required during early part of boot sequence even before
> + * device model and pm_runtime if fully up and running. this function
> + * provides hook to omap2_init_common_hw() which is triggered from
> + * start_kernel()->init_irq() of kernel initialization sequence.
> + */
> +void __init omap2_dm_timer_early_init(void);
> +
> +#endif
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 1d706cf..10daa9d 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -3,6 +3,12 @@
>    *
>    * OMAP Dual-Mode Timers
>    *
> + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
> + * Tarun Kanti DebBarma<tarun.kanti@ti.com>
> + *
> + * Copyright (C) 2010 Texas Instruments Incorporated
> + * Thara Gopinath<thara@ti.com>

You can remove the copyright and put Thara's name below yours.
It should be the case for other field as well.

> + *
>    * Copyright (C) 2005 Nokia Corporation
>    * OMAP2 support by Juha Yrjola
>    * API improvements and OMAP2 clock framework support by Timo Teras
> @@ -151,6 +157,7 @@
>   		(_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR<<  WPSHIFT))
>
>   struct omap_dm_timer {
> +	int id;
>   	unsigned long phys_base;
>   	int irq;
>   #ifdef CONFIG_ARCH_OMAP2PLUS
> @@ -160,6 +167,7 @@ struct omap_dm_timer {
>   	unsigned reserved:1;
>   	unsigned enabled:1;
>   	unsigned posted:1;
> +	struct platform_device *pdev;
>   };

What that structure is used for? Is it some legacy structure that will 
be removed in next patches? It seems to be a wrapper on top of the 
device that should not be used anymore after platform_driver migration.

>
>   static int dm_timer_count;
> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
> index dfa3aff..2bb837e 100644
> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
> @@ -3,6 +3,11 @@
>    *
>    * OMAP Dual-Mode Timers
>    *
> + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
> + * Tarun Kanti DebBarma<tarun.kanti@ti.com>
> + * Thara Gopinath<thara@ti.com>

Add a blank line here.

> + * Platform device conversion and hwmod support.
> + *
>    * Copyright (C) 2005 Nokia Corporation
>    * Author: Lauri Leukkunen<lauri.leukkunen@nokia.com>
>    * PWM and clock framwork support by Timo Teras.
> @@ -29,6 +34,8 @@
>   #ifndef __ASM_ARCH_DMTIMER_H
>   #define __ASM_ARCH_DMTIMER_H
>
> +#include<linux/platform_device.h>
> +
>   /* clock sources */
>   #define OMAP_TIMER_SRC_SYS_CLK			0x00
>   #define OMAP_TIMER_SRC_32_KHZ			0x01
> @@ -44,11 +51,23 @@
>   #define OMAP_TIMER_TRIGGER_OVERFLOW		0x01
>   #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPAR	0x02
>
> +/* timer ip constants */

Maybe you should have a better comment here?
Something closer to your changelog: IP revision identifier so that 
Highlander IP in OMAP 4 can be distinguished.

> +#define OMAP_TIMER_IP_VERSION_1			0x1
> +#define OMAP_TIMER_IP_VERSION_2			0x2
> +
>   struct omap_dm_timer;
>   extern struct omap_dm_timer *gptimer_wakeup;
>   extern struct sys_timer omap_timer;
>   struct clk;
>
> +struct dmtimer_platform_data {
> +	int (*set_timer_src) (struct platform_device *pdev, int source);
> +	int timer_ip_type;
> +	u8 func_offst;
> +	u8 intr_offst;

You can probably keep "offset" since you save only one character...

Regards,
Benoit

> +	u32 is_early_init:1;
> +};
> +
>   int omap_dm_timer_init(void);
>
>   struct omap_dm_timer *omap_dm_timer_request(void);


  parent reply	other threads:[~2010-11-23 14:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20  2:39 [PATCHv4 0/14] dmtimer adaptation to platform_driver Tarun Kanti DebBarma
2010-11-20  2:39 ` [PATCHv4 1/14] OMAP2+: dmtimer: add device names to flck nodes Tarun Kanti DebBarma
2010-11-20  2:39   ` [PATCHv4 2/14] OMAP: dmtimer: infrastructure to support hwmod Tarun Kanti DebBarma
2010-11-20  2:39     ` [PATCHv4 3/14] OMAP2420: dmtimer: add hwmod database Tarun Kanti DebBarma
2010-11-20  2:39       ` [PATCHv4 4/14] OMAP2430: " Tarun Kanti DebBarma
2010-11-20  2:39         ` [PATCHv4 5/14] OMAP3: " Tarun Kanti DebBarma
2010-11-20  2:39           ` [PATCHv4 6/14] OMAP4: " Tarun Kanti DebBarma
2010-11-20  2:39             ` [PATCHv4 7/14] OMAP: dmtimer: use list instead of static array Tarun Kanti DebBarma
2010-11-20  2:39               ` [PATCHv4 8/14] OMAP: dmtimer: platform driver Tarun Kanti DebBarma
2010-11-20  2:39                 ` [PATCHv4 9/14] OMAP1: dmtimer: conversion to platform devices Tarun Kanti DebBarma
2010-11-20  2:39                   ` [PATCHv4 10/14] OMAP: dmtimer: access routines to interrupt registers Tarun Kanti DebBarma
2010-11-20  2:39                     ` [PATCHv4 11/14] OMAP2+: dmtimer: convert to platform devices Tarun Kanti DebBarma
2010-11-20  2:39                       ` [PATCHv4 12/14] OMAP: dmtimer: switch-over to platform device driver Tarun Kanti DebBarma
2010-11-20  2:39                         ` [PATCHv4 13/14] OMAP: dmtimer: remove reset function Tarun Kanti DebBarma
2010-11-20  2:39                           ` [PATCHv4 14/14] OMAP: dmtimer: pm_runtime support Tarun Kanti DebBarma
2010-11-22  7:04                             ` Varadarajan, Charulatha
2010-11-22  7:07                               ` DebBarma, Tarun Kanti
2010-11-22  6:44                         ` [PATCHv4 12/14] OMAP: dmtimer: switch-over to platform device driver Varadarajan, Charulatha
2010-11-22  9:14                           ` DebBarma, Tarun Kanti
2010-11-22 12:00                             ` Varadarajan, Charulatha
2010-11-22 12:08                               ` DebBarma, Tarun Kanti
2010-11-22 12:35                                 ` Varadarajan, Charulatha
2010-11-22 12:55                                   ` DebBarma, Tarun Kanti
2010-11-22  6:33                       ` [PATCHv4 11/14] OMAP2+: dmtimer: convert to platform devices Varadarajan, Charulatha
2010-11-22  7:24                         ` DebBarma, Tarun Kanti
2010-11-22  8:24                       ` Varadarajan, Charulatha
2010-11-22  9:00                         ` DebBarma, Tarun Kanti
2010-11-22  9:03                           ` Varadarajan, Charulatha
2010-11-23 17:51                       ` Cousson, Benoit
2010-11-24  7:30                         ` DebBarma, Tarun Kanti
2010-11-22  7:13                 ` [PATCHv4 8/14] OMAP: dmtimer: platform driver Varadarajan, Charulatha
2010-11-22  7:26                   ` DebBarma, Tarun Kanti
2010-11-23 15:22               ` [PATCHv4 7/14] OMAP: dmtimer: use list instead of static array Cousson, Benoit
2010-11-24  7:01                 ` DebBarma, Tarun Kanti
2010-11-22  6:02             ` [PATCHv4 6/14] OMAP4: dmtimer: add hwmod database Varadarajan, Charulatha
2010-11-22  6:11               ` DebBarma, Tarun Kanti
2010-11-23 14:48     ` Cousson, Benoit [this message]
2010-11-24  6:53       ` [PATCHv4 2/14] OMAP: dmtimer: infrastructure to support hwmod DebBarma, Tarun Kanti
2010-11-22 17:32   ` [PATCHv4 1/14] OMAP2+: dmtimer: add device names to flck nodes Cousson, Benoit
2010-11-23  8:36     ` DebBarma, Tarun Kanti
2010-11-23  8:40       ` Cousson, Benoit
2010-11-23  8:43         ` 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=4CEBD454.8070003@ti.com \
    --to=b-cousson@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