From: Santosh <santosh.shilimkar@ti.com>
To: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Cc: linux-omap@vger.kernel.org, khilman@ti.com, tony@atomide.com,
linux-arm-kernel@lists.infradead.org,
Thara Gopinath <thara@ti.com>
Subject: Re: [PATCH v14 REPOST 03/12] OMAP1: dmtimer: conversion to platform devices
Date: Fri, 26 Aug 2011 19:56:25 +0530 [thread overview]
Message-ID: <4E57AD11.7080406@ti.com> (raw)
In-Reply-To: <1310731501-13078-4-git-send-email-tarun.kanti@ti.com>
On Friday 15 July 2011 05:34 PM, Tarun Kanti DebBarma wrote:
> From: Thara Gopinath<thara@ti.com>
>
> Convert OMAP1 dmtimers into a platform devices and then registers with
> device model framework so that it can be bound to corresponding driver.
>
> 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>
> ---
> arch/arm/mach-omap1/Makefile | 2 +-
> arch/arm/mach-omap1/timer.c | 174 +++++++++++++++++++++++++++++
> arch/arm/plat-omap/dmtimer.c | 56 ++-------
> arch/arm/plat-omap/include/plat/dmtimer.h | 8 ++
> 4 files changed, 195 insertions(+), 45 deletions(-)
> create mode 100644 arch/arm/mach-omap1/timer.c
>
> diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
> index 5b114d1..11c85cd 100644
> --- a/arch/arm/mach-omap1/Makefile
> +++ b/arch/arm/mach-omap1/Makefile
> @@ -4,7 +4,7 @@
>
> # Common support
> obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
> -obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o
> +obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
>
> obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
>
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> new file mode 100644
> index 0000000..980b23b
> --- /dev/null
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -0,0 +1,174 @@
> +/**
> + * OMAP1 Dual-Mode Timers - platform device registration
> + *
> + * Contains first level initialization routines which internally
> + * generates timer device information and registers with linux
> + * device model. It also has low level function to chnage the timer
> + * input clock source.
> + *
> + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
/s/2010 /2011
> + * Tarun Kanti DebBarma<tarun.kanti@ti.com>
> + * 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.
> + */
> +
> +#include<linux/clk.h>
> +#include<linux/io.h>
> +#include<linux/err.h>
> +#include<linux/slab.h>
> +#include<linux/platform_device.h>
> +
> +#include<mach/irqs.h>
> +
> +#include<plat/dmtimer.h>
> +
> +#define OMAP1610_GPTIMER1_BASE 0xfffb1400
> +#define OMAP1610_GPTIMER2_BASE 0xfffb1c00
> +#define OMAP1610_GPTIMER3_BASE 0xfffb2400
> +#define OMAP1610_GPTIMER4_BASE 0xfffb2c00
> +#define OMAP1610_GPTIMER5_BASE 0xfffb3400
> +#define OMAP1610_GPTIMER6_BASE 0xfffb3c00
> +#define OMAP1610_GPTIMER7_BASE 0xfffb7400
> +#define OMAP1610_GPTIMER8_BASE 0xfffbd400
> +
> +#define OMAP1_DM_TIMER_COUNT 8
> +
> +static int omap1_dm_timer_set_src(struct platform_device *pdev,
> + int source)
> +{
> + int n = (pdev->id - 1)<< 1;
> + u32 l;
> +
> + l = omap_readl(MOD_CONF_CTRL_1)& ~(0x03<< n);
> + l |= source<< n;
> + omap_writel(l, MOD_CONF_CTRL_1);
Stop using omap_readl/omap_writel. Use standard readl/writel
rest looks ok to me.
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Regards
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v14 REPOST 03/12] OMAP1: dmtimer: conversion to platform devices
Date: Fri, 26 Aug 2011 19:56:25 +0530 [thread overview]
Message-ID: <4E57AD11.7080406@ti.com> (raw)
In-Reply-To: <1310731501-13078-4-git-send-email-tarun.kanti@ti.com>
On Friday 15 July 2011 05:34 PM, Tarun Kanti DebBarma wrote:
> From: Thara Gopinath<thara@ti.com>
>
> Convert OMAP1 dmtimers into a platform devices and then registers with
> device model framework so that it can be bound to corresponding driver.
>
> 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>
> ---
> arch/arm/mach-omap1/Makefile | 2 +-
> arch/arm/mach-omap1/timer.c | 174 +++++++++++++++++++++++++++++
> arch/arm/plat-omap/dmtimer.c | 56 ++-------
> arch/arm/plat-omap/include/plat/dmtimer.h | 8 ++
> 4 files changed, 195 insertions(+), 45 deletions(-)
> create mode 100644 arch/arm/mach-omap1/timer.c
>
> diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
> index 5b114d1..11c85cd 100644
> --- a/arch/arm/mach-omap1/Makefile
> +++ b/arch/arm/mach-omap1/Makefile
> @@ -4,7 +4,7 @@
>
> # Common support
> obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
> -obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o
> +obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
>
> obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
>
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> new file mode 100644
> index 0000000..980b23b
> --- /dev/null
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -0,0 +1,174 @@
> +/**
> + * OMAP1 Dual-Mode Timers - platform device registration
> + *
> + * Contains first level initialization routines which internally
> + * generates timer device information and registers with linux
> + * device model. It also has low level function to chnage the timer
> + * input clock source.
> + *
> + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
/s/2010 /2011
> + * Tarun Kanti DebBarma<tarun.kanti@ti.com>
> + * 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.
> + */
> +
> +#include<linux/clk.h>
> +#include<linux/io.h>
> +#include<linux/err.h>
> +#include<linux/slab.h>
> +#include<linux/platform_device.h>
> +
> +#include<mach/irqs.h>
> +
> +#include<plat/dmtimer.h>
> +
> +#define OMAP1610_GPTIMER1_BASE 0xfffb1400
> +#define OMAP1610_GPTIMER2_BASE 0xfffb1c00
> +#define OMAP1610_GPTIMER3_BASE 0xfffb2400
> +#define OMAP1610_GPTIMER4_BASE 0xfffb2c00
> +#define OMAP1610_GPTIMER5_BASE 0xfffb3400
> +#define OMAP1610_GPTIMER6_BASE 0xfffb3c00
> +#define OMAP1610_GPTIMER7_BASE 0xfffb7400
> +#define OMAP1610_GPTIMER8_BASE 0xfffbd400
> +
> +#define OMAP1_DM_TIMER_COUNT 8
> +
> +static int omap1_dm_timer_set_src(struct platform_device *pdev,
> + int source)
> +{
> + int n = (pdev->id - 1)<< 1;
> + u32 l;
> +
> + l = omap_readl(MOD_CONF_CTRL_1)& ~(0x03<< n);
> + l |= source<< n;
> + omap_writel(l, MOD_CONF_CTRL_1);
Stop using omap_readl/omap_writel. Use standard readl/writel
rest looks ok to me.
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Regards
Santosh
next prev parent reply other threads:[~2011-08-26 14:26 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 12:04 [PATCH v14 REPOST 00/12] dmtimer adaptation to platform_driver Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-07-15 12:04 ` [PATCH v14 REPOST 01/12] OMAP2+: dmtimer: add device names to flck nodes Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 14:15 ` Santosh
2011-08-26 14:15 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 02/12] OMAP4: hwmod data: add dmtimer version information Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:21 ` Santosh
2011-08-26 15:21 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 03/12] OMAP1: dmtimer: conversion to platform devices Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 14:26 ` Santosh [this message]
2011-08-26 14:26 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 04/12] OMAP2+: dmtimer: convert " Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 14:33 ` Santosh
2011-08-26 14:33 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 05/12] OMAP: dmtimer: platform driver Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 14:34 ` Santosh
2011-08-26 14:34 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 06/12] OMAP: dmtimer: switch-over to platform device driver Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:20 ` Santosh
2011-08-26 15:20 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 07/12] OMAP: dmtimer: pm_runtime support Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:27 ` Santosh
2011-08-26 15:27 ` Santosh
2011-08-26 16:23 ` Kevin Hilman
2011-08-26 16:23 ` Kevin Hilman
2011-08-26 16:34 ` Santosh
2011-08-26 16:34 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 08/12] OMAP: dmtimer: add timeout to low-level routines Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:30 ` Santosh
2011-08-26 15:30 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 09/12] OMAP: dmtimer: use mutex instead of spinlock Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:34 ` Santosh
2011-08-26 15:34 ` Santosh
2011-08-26 16:09 ` Santosh
2011-08-26 16:09 ` Santosh
2011-07-15 12:04 ` [PATCH v14 REPOST 10/12] OMAP: dmtimer: mark clocksource and clockevent timers reserved Tarun Kanti DebBarma
2011-07-15 12:04 ` Tarun Kanti DebBarma
2011-08-26 15:44 ` Santosh
2011-08-26 15:44 ` Santosh
2011-07-15 12:05 ` [PATCH v14 REPOST 11/12] OMAP: dmtimer: add context save/restore routines Tarun Kanti DebBarma
2011-07-15 12:05 ` Tarun Kanti DebBarma
2011-08-26 15:46 ` Santosh
2011-08-26 15:46 ` Santosh
2011-07-15 12:05 ` [PATCH v14 REPOST 12/12] OMAP: dmtimer: Off mode support Tarun Kanti DebBarma
2011-07-15 12:05 ` Tarun Kanti DebBarma
2011-08-26 16:04 ` Santosh
2011-08-26 16:04 ` Santosh
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=4E57AD11.7080406@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tarun.kanti@ti.com \
--cc=thara@ti.com \
--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.