All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-04-16 12:25 Tarun Kanti DebBarma
  2012-04-16 12:25 ` [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-16 12:25 UTC (permalink / raw)
  To: linux-omap
  Cc: tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak,
	Tarun Kanti DebBarma

The devm API usage in probe() simplifies error handling operation.
Since iclk is not used in the driver it is removed from wherever
not needed. The fclk naming is made uniform as per OMAP4 platform,
viz. "timer1_fck", "timer2_fck", ... in all relevant places which
include hwmod database. With this change there is no more need to
construct clock names using sprintf() to be used in clk_get()
during initialization. Instead we can use oh->main_clk directly.

Reference:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Commit: e816b57a337ea3b755de72bec38c10c864f23015 (Linux 3.4-rc3)

Series is available here for reference:
git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-dev dmtimer_cleanup_for_3.5

Tested on following platforms:
OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
Could not test on OMAP2420 due to unavailability of board.

Tarun Kanti DebBarma (3):
  ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
  ARM: OMAP2+: dmtimer: cleanup iclk usage
  ARM: OMAP2+: dmtimer: cleanup fclk usage

 arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock44xx_data.c       |   33 ++++--------
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
 arch/arm/mach-omap2/timer.c                |   10 +----
 arch/arm/plat-omap/dmtimer.c               |   51 +++++++------------
 arch/arm/plat-omap/include/plat/dmtimer.h  |    2 +-
 10 files changed, 176 insertions(+), 208 deletions(-)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
  2012-04-16 12:25 [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
@ 2012-04-16 12:25 ` Tarun Kanti DebBarma
  2012-04-16 15:02   ` Shubhrajyoti
  2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 25+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-16 12:25 UTC (permalink / raw)
  To: linux-omap
  Cc: tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak,
	Tarun Kanti DebBarma

Replace the regular kzalloc and ioremap with the devm_ equivalent
to simplify error handling. We don't need kree() anymore in
omap_dm_timer_remove().

Also added *dev* pointer to reference pdev->dev which makes the
usage shorter in code.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/plat-omap/dmtimer.c |   51 +++++++++++++++--------------------------
 1 files changed, 19 insertions(+), 32 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 652139c..549a811 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -37,7 +37,7 @@
 
 #include <linux/module.h>
 #include <linux/io.h>
-#include <linux/slab.h>
+#include <linux/device.h>
 #include <linux/err.h>
 #include <linux/pm_runtime.h>
 
@@ -628,49 +628,45 @@ EXPORT_SYMBOL_GPL(omap_dm_timers_active);
  */
 static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
 {
-	int ret;
 	unsigned long flags;
 	struct omap_dm_timer *timer;
-	struct resource *mem, *irq, *ioarea;
+	struct resource *mem, *irq;
+	struct device *dev = &pdev->dev;
 	struct dmtimer_platform_data *pdata = pdev->dev.platform_data;
 
 	if (!pdata) {
-		dev_err(&pdev->dev, "%s: no platform data.\n", __func__);
+		dev_err(dev, "%s: no platform data.\n", __func__);
 		return -ENODEV;
 	}
 
 	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (unlikely(!irq)) {
-		dev_err(&pdev->dev, "%s: no IRQ resource.\n", __func__);
+		dev_err(dev, "%s: no IRQ resource.\n", __func__);
 		return -ENODEV;
 	}
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (unlikely(!mem)) {
-		dev_err(&pdev->dev, "%s: no memory resource.\n", __func__);
+		dev_err(dev, "%s: no memory resource.\n", __func__);
 		return -ENODEV;
 	}
 
-	ioarea = request_mem_region(mem->start, resource_size(mem),
-			pdev->name);
-	if (!ioarea) {
-		dev_err(&pdev->dev, "%s: region already claimed.\n", __func__);
+	if (!devm_request_mem_region(dev, mem->start, resource_size(mem),
+					pdev->name)) {
+		dev_err(dev, "%s: region already claimed.\n", __func__);
 		return -EBUSY;
 	}
 
-	timer = kzalloc(sizeof(struct omap_dm_timer), GFP_KERNEL);
+	timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL);
 	if (!timer) {
-		dev_err(&pdev->dev, "%s: no memory for omap_dm_timer.\n",
-			__func__);
-		ret = -ENOMEM;
-		goto err_free_ioregion;
+		dev_err(dev, "%s: memory alloc failed!\n", __func__);
+		return  -ENOMEM;
 	}
 
-	timer->io_base = ioremap(mem->start, resource_size(mem));
+	timer->io_base = devm_ioremap(dev, mem->start, resource_size(mem));
 	if (!timer->io_base) {
-		dev_err(&pdev->dev, "%s: ioremap failed.\n", __func__);
-		ret = -ENOMEM;
-		goto err_free_mem;
+		dev_err(dev, "%s: ioremap failed.\n", __func__);
+		return -ENOMEM;
 	}
 
 	timer->id = pdev->id;
@@ -682,12 +678,12 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
 
 	/* Skip pm_runtime_enable for OMAP1 */
 	if (!pdata->needs_manual_reset) {
-		pm_runtime_enable(&pdev->dev);
-		pm_runtime_irq_safe(&pdev->dev);
+		pm_runtime_enable(dev);
+		pm_runtime_irq_safe(dev);
 	}
 
 	if (!timer->reserved) {
-		pm_runtime_get_sync(&pdev->dev);
+		pm_runtime_get_sync(dev);
 		__omap_dm_timer_init_regs(timer);
 		pm_runtime_put(&pdev->dev);
 	}
@@ -697,17 +693,9 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
 	list_add_tail(&timer->node, &omap_timer_list);
 	spin_unlock_irqrestore(&dm_timer_lock, flags);
 
-	dev_dbg(&pdev->dev, "Device Probed.\n");
+	dev_dbg(dev, "Device Probed.\n");
 
 	return 0;
-
-err_free_mem:
-	kfree(timer);
-
-err_free_ioregion:
-	release_mem_region(mem->start, resource_size(mem));
-
-	return ret;
 }
 
 /**
@@ -728,7 +716,6 @@ static int __devexit omap_dm_timer_remove(struct platform_device *pdev)
 	list_for_each_entry(timer, &omap_timer_list, node)
 		if (timer->pdev->id == pdev->id) {
 			list_del(&timer->node);
-			kfree(timer);
 			ret = 0;
 			break;
 		}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 12:25 [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
  2012-04-16 12:25 ` [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
@ 2012-04-16 12:25 ` Tarun Kanti DebBarma
  2012-04-16 15:03   ` Hiremath, Vaibhav
                     ` (2 more replies)
  2012-04-16 12:25 ` [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
  2012-04-16 14:53 ` [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Hiremath, Vaibhav
  3 siblings, 3 replies; 25+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-16 12:25 UTC (permalink / raw)
  To: linux-omap
  Cc: tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak,
	Tarun Kanti DebBarma

We do not use iclk anywhere in the dmtimer driver and so removing it.
Hence removing the timer iclk entries from OMAP4 clkdev table as well.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
 arch/arm/mach-omap2/timer.c               |    7 -------
 arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
 3 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index fa6ea65..2172f66 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3355,17 +3355,6 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"auxclk5_ck",			&auxclk5_ck,	CK_443X),
 	CLK(NULL,	"auxclkreq5_ck",		&auxclkreq5_ck,	CK_443X),
 	CLK(NULL,	"gpmc_ck",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt1_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt2_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt3_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt4_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt5_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt6_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt7_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt8_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt9_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt10_ick",			&dummy_ck,	CK_443X),
-	CLK(NULL,	"gpt11_ick",			&dummy_ck,	CK_443X),
 	CLK("omap_i2c.1",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap_i2c.2",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap_i2c.3",	"ick",				&dummy_ck,	CK_443X),
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index c512bac..5d7a0ee 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -169,13 +169,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
 	if (IS_ERR(timer->fclk))
 		return -ENODEV;
 
-	sprintf(name, "gpt%d_ick", gptimer_id);
-	timer->iclk = clk_get(NULL, name);
-	if (IS_ERR(timer->iclk)) {
-		clk_put(timer->fclk);
-		return -ENODEV;
-	}
-
 	omap_hwmod_enable(oh);
 
 	sys_timer_reserved |= (1 << (gptimer_id - 1));
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 9418f00..be2b8c4 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -259,7 +259,7 @@ struct omap_dm_timer {
 	unsigned long phys_base;
 	int id;
 	int irq;
-	struct clk *iclk, *fclk;
+	struct clk *fclk;
 
 	void __iomem	*io_base;
 	void __iomem	*sys_stat;	/* TISTAT timer status */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-16 12:25 [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
  2012-04-16 12:25 ` [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
  2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
@ 2012-04-16 12:25 ` Tarun Kanti DebBarma
  2012-04-16 16:40   ` Paul Walmsley
  2012-04-16 14:53 ` [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Hiremath, Vaibhav
  3 siblings, 1 reply; 25+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-16 12:25 UTC (permalink / raw)
  To: linux-omap
  Cc: tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak,
	Tarun Kanti DebBarma

Timer clock nodes have been re-named as "timer1_fck", "timer2_fck", ...
in place of "gpt1_fck", "gpt2_fck", ... This is in line with the names
present in OMAP4 gptimer hwmod database assigned to oh->main_clk.
Now we can get the fck name directly from oh->main_clk and pass the
same to clk_get() to extract the fclk and thus avoid construction
of fclk clock name.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
 arch/arm/mach-omap2/clock44xx_data.c       |   22 ++++----
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
 arch/arm/mach-omap2/timer.c                |    3 +-
 8 files changed, 156 insertions(+), 157 deletions(-)

diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index bace930..8d12e8e 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -847,8 +847,8 @@ static struct clk gpt1_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt1_fck = {
-	.name		= "gpt1_fck",
+static struct clk timer1_fck = {
+	.name		= "timer1_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -873,8 +873,8 @@ static struct clk gpt2_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt2_fck = {
-	.name		= "gpt2_fck",
+static struct clk timer2_fck = {
+	.name		= "timer2_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -897,8 +897,8 @@ static struct clk gpt3_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt3_fck = {
-	.name		= "gpt3_fck",
+static struct clk timer3_fck = {
+	.name		= "timer3_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -921,8 +921,8 @@ static struct clk gpt4_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt4_fck = {
-	.name		= "gpt4_fck",
+static struct clk timer4_fck = {
+	.name		= "timer4_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -945,8 +945,8 @@ static struct clk gpt5_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt5_fck = {
-	.name		= "gpt5_fck",
+static struct clk timer5_fck = {
+	.name		= "timer5_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -969,8 +969,8 @@ static struct clk gpt6_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt6_fck = {
-	.name		= "gpt6_fck",
+static struct clk timer6_fck = {
+	.name		= "timer6_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -993,8 +993,8 @@ static struct clk gpt7_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt7_fck = {
-	.name		= "gpt7_fck",
+static struct clk timer7_fck = {
+	.name		= "timer7_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1017,8 +1017,8 @@ static struct clk gpt8_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt8_fck = {
-	.name		= "gpt8_fck",
+static struct clk timer8_fck = {
+	.name		= "timer8_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1041,8 +1041,8 @@ static struct clk gpt9_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt9_fck = {
-	.name		= "gpt9_fck",
+static struct clk timer9_fck = {
+	.name		= "timer9_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1065,8 +1065,8 @@ static struct clk gpt10_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt10_fck = {
-	.name		= "gpt10_fck",
+static struct clk timer10_fck = {
+	.name		= "timer10_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1089,8 +1089,8 @@ static struct clk gpt11_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt11_fck = {
-	.name		= "gpt11_fck",
+static struct clk timer11_fck = {
+	.name		= "timer11_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1113,8 +1113,8 @@ static struct clk gpt12_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt12_fck = {
-	.name		= "gpt12_fck",
+static struct clk timer12_fck = {
+	.name		= "timer12_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &secure_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1823,29 +1823,29 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"virt_prcm_set", &virt_prcm_set, CK_242X),
 	/* general l4 interface ck, multi-parent functional clk */
 	CLK(NULL,	"gpt1_ick",	&gpt1_ick,	CK_242X),
-	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_242X),
+	CLK(NULL,	"timer1_fck",	&timer1_fck,	CK_242X),
 	CLK(NULL,	"gpt2_ick",	&gpt2_ick,	CK_242X),
-	CLK(NULL,	"gpt2_fck",	&gpt2_fck,	CK_242X),
+	CLK(NULL,	"timer2_fck",	&timer2_fck,	CK_242X),
 	CLK(NULL,	"gpt3_ick",	&gpt3_ick,	CK_242X),
-	CLK(NULL,	"gpt3_fck",	&gpt3_fck,	CK_242X),
+	CLK(NULL,	"timer3_fck",	&timer3_fck,	CK_242X),
 	CLK(NULL,	"gpt4_ick",	&gpt4_ick,	CK_242X),
-	CLK(NULL,	"gpt4_fck",	&gpt4_fck,	CK_242X),
+	CLK(NULL,	"timer4_fck",	&timer4_fck,	CK_242X),
 	CLK(NULL,	"gpt5_ick",	&gpt5_ick,	CK_242X),
-	CLK(NULL,	"gpt5_fck",	&gpt5_fck,	CK_242X),
+	CLK(NULL,	"timer5_fck",	&timer5_fck,	CK_242X),
 	CLK(NULL,	"gpt6_ick",	&gpt6_ick,	CK_242X),
-	CLK(NULL,	"gpt6_fck",	&gpt6_fck,	CK_242X),
+	CLK(NULL,	"timer6_fck",	&timer6_fck,	CK_242X),
 	CLK(NULL,	"gpt7_ick",	&gpt7_ick,	CK_242X),
-	CLK(NULL,	"gpt7_fck",	&gpt7_fck,	CK_242X),
+	CLK(NULL,	"timer7_fck",	&timer7_fck,	CK_242X),
 	CLK(NULL,	"gpt8_ick",	&gpt8_ick,	CK_242X),
-	CLK(NULL,	"gpt8_fck",	&gpt8_fck,	CK_242X),
+	CLK(NULL,	"timer8_fck",	&timer8_fck,	CK_242X),
 	CLK(NULL,	"gpt9_ick",	&gpt9_ick,	CK_242X),
-	CLK(NULL,	"gpt9_fck",	&gpt9_fck,	CK_242X),
+	CLK(NULL,	"timer9_fck",	&timer9_fck,	CK_242X),
 	CLK(NULL,	"gpt10_ick",	&gpt10_ick,	CK_242X),
-	CLK(NULL,	"gpt10_fck",	&gpt10_fck,	CK_242X),
+	CLK(NULL,	"timer10_fck",	&timer10_fck,	CK_242X),
 	CLK(NULL,	"gpt11_ick",	&gpt11_ick,	CK_242X),
-	CLK(NULL,	"gpt11_fck",	&gpt11_fck,	CK_242X),
+	CLK(NULL,	"timer11_fck",	&timer11_fck,	CK_242X),
 	CLK(NULL,	"gpt12_ick",	&gpt12_ick,	CK_242X),
-	CLK(NULL,	"gpt12_fck",	&gpt12_fck,	CK_242X),
+	CLK(NULL,	"timer12_fck",	&timer12_fck,	CK_242X),
 	CLK("omap-mcbsp.1", "ick",	&mcbsp1_ick,	CK_242X),
 	CLK(NULL,	"mcbsp1_fck",	&mcbsp1_fck,	CK_242X),
 	CLK("omap-mcbsp.2", "ick",	&mcbsp2_ick,	CK_242X),
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index 3b4d09a..bb56b75 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -834,8 +834,8 @@ static struct clk gpt1_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt1_fck = {
-	.name		= "gpt1_fck",
+static struct clk timer1_fck = {
+	.name		= "timer1_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -860,8 +860,8 @@ static struct clk gpt2_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt2_fck = {
-	.name		= "gpt2_fck",
+static struct clk timer2_fck = {
+	.name		= "timer2_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -884,8 +884,8 @@ static struct clk gpt3_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt3_fck = {
-	.name		= "gpt3_fck",
+static struct clk timer3_fck = {
+	.name		= "timer3_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -908,8 +908,8 @@ static struct clk gpt4_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt4_fck = {
-	.name		= "gpt4_fck",
+static struct clk timer4_fck = {
+	.name		= "timer4_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -932,8 +932,8 @@ static struct clk gpt5_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt5_fck = {
-	.name		= "gpt5_fck",
+static struct clk timer5_fck = {
+	.name		= "timer5_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -956,8 +956,8 @@ static struct clk gpt6_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt6_fck = {
-	.name		= "gpt6_fck",
+static struct clk timer6_fck = {
+	.name		= "timer6_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -980,8 +980,8 @@ static struct clk gpt7_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt7_fck = {
-	.name		= "gpt7_fck",
+static struct clk timer7_fck = {
+	.name		= "timer7_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1004,8 +1004,8 @@ static struct clk gpt8_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt8_fck = {
-	.name		= "gpt8_fck",
+static struct clk timer8_fck = {
+	.name		= "timer8_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1028,8 +1028,8 @@ static struct clk gpt9_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt9_fck = {
-	.name		= "gpt9_fck",
+static struct clk timer9_fck = {
+	.name		= "timer9_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1052,8 +1052,8 @@ static struct clk gpt10_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt10_fck = {
-	.name		= "gpt10_fck",
+static struct clk timer10_fck = {
+	.name		= "timer10_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1076,8 +1076,8 @@ static struct clk gpt11_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt11_fck = {
-	.name		= "gpt11_fck",
+static struct clk timer11_fck = {
+	.name		= "timer11_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &func_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1100,8 +1100,8 @@ static struct clk gpt12_ick = {
 	.recalc		= &followparent_recalc,
 };
 
-static struct clk gpt12_fck = {
-	.name		= "gpt12_fck",
+static struct clk timer12_fck = {
+	.name		= "timer12_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &secure_32k_ck,
 	.clkdm_name	= "core_l4_clkdm",
@@ -1912,29 +1912,29 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"virt_prcm_set", &virt_prcm_set, CK_243X),
 	/* general l4 interface ck, multi-parent functional clk */
 	CLK(NULL,	"gpt1_ick",	&gpt1_ick,	CK_243X),
-	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_243X),
+	CLK(NULL,	"timer1_fck",	&timer1_fck,	CK_243X),
 	CLK(NULL,	"gpt2_ick",	&gpt2_ick,	CK_243X),
-	CLK(NULL,	"gpt2_fck",	&gpt2_fck,	CK_243X),
+	CLK(NULL,	"timer2_fck",	&timer2_fck,	CK_243X),
 	CLK(NULL,	"gpt3_ick",	&gpt3_ick,	CK_243X),
-	CLK(NULL,	"gpt3_fck",	&gpt3_fck,	CK_243X),
+	CLK(NULL,	"timer3_fck",	&timer3_fck,	CK_243X),
 	CLK(NULL,	"gpt4_ick",	&gpt4_ick,	CK_243X),
-	CLK(NULL,	"gpt4_fck",	&gpt4_fck,	CK_243X),
+	CLK(NULL,	"timer4_fck",	&timer4_fck,	CK_243X),
 	CLK(NULL,	"gpt5_ick",	&gpt5_ick,	CK_243X),
-	CLK(NULL,	"gpt5_fck",	&gpt5_fck,	CK_243X),
+	CLK(NULL,	"timer5_fck",	&timer5_fck,	CK_243X),
 	CLK(NULL,	"gpt6_ick",	&gpt6_ick,	CK_243X),
-	CLK(NULL,	"gpt6_fck",	&gpt6_fck,	CK_243X),
+	CLK(NULL,	"timer6_fck",	&timer6_fck,	CK_243X),
 	CLK(NULL,	"gpt7_ick",	&gpt7_ick,	CK_243X),
-	CLK(NULL,	"gpt7_fck",	&gpt7_fck,	CK_243X),
+	CLK(NULL,	"timer7_fck",	&timer7_fck,	CK_243X),
 	CLK(NULL,	"gpt8_ick",	&gpt8_ick,	CK_243X),
-	CLK(NULL,	"gpt8_fck",	&gpt8_fck,	CK_243X),
+	CLK(NULL,	"timer8_fck",	&timer8_fck,	CK_243X),
 	CLK(NULL,	"gpt9_ick",	&gpt9_ick,	CK_243X),
-	CLK(NULL,	"gpt9_fck",	&gpt9_fck,	CK_243X),
+	CLK(NULL,	"timer9_fck",	&timer9_fck,	CK_243X),
 	CLK(NULL,	"gpt10_ick",	&gpt10_ick,	CK_243X),
-	CLK(NULL,	"gpt10_fck",	&gpt10_fck,	CK_243X),
+	CLK(NULL,	"timer10_fck",	&timer10_fck,	CK_243X),
 	CLK(NULL,	"gpt11_ick",	&gpt11_ick,	CK_243X),
-	CLK(NULL,	"gpt11_fck",	&gpt11_fck,	CK_243X),
+	CLK(NULL,	"timer11_fck",	&timer11_fck,	CK_243X),
 	CLK(NULL,	"gpt12_ick",	&gpt12_ick,	CK_243X),
-	CLK(NULL,	"gpt12_fck",	&gpt12_fck,	CK_243X),
+	CLK(NULL,	"timer12_fck",	&timer12_fck,	CK_243X),
 	CLK("omap-mcbsp.1", "ick",	&mcbsp1_ick,	CK_243X),
 	CLK(NULL,	"mcbsp1_fck",	&mcbsp1_fck,	CK_243X),
 	CLK("omap-mcbsp.2", "ick",	&mcbsp2_ick,	CK_243X),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index f4a626f..5912238 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -1362,8 +1362,8 @@ static const struct clksel omap343x_gpt_clksel[] = {
 	{ .parent = NULL}
 };
 
-static struct clk gpt10_fck = {
-	.name		= "gpt10_fck",
+static struct clk timer10_fck = {
+	.name		= "timer10_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &sys_ck,
 	.init		= &omap2_init_clksel_parent,
@@ -1376,8 +1376,8 @@ static struct clk gpt10_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt11_fck = {
-	.name		= "gpt11_fck",
+static struct clk timer11_fck = {
+	.name		= "timer11_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &sys_ck,
 	.init		= &omap2_init_clksel_parent,
@@ -2326,8 +2326,8 @@ static struct clk usim_fck = {
 };
 
 /* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
-static struct clk gpt1_fck = {
-	.name		= "gpt1_fck",
+static struct clk timer1_fck = {
+	.name		= "timer1_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
@@ -2498,8 +2498,8 @@ static struct clk uart4_fck_am35xx = {
 	.recalc         = &followparent_recalc,
 };
 
-static struct clk gpt2_fck = {
-	.name		= "gpt2_fck",
+static struct clk timer2_fck = {
+	.name		= "timer2_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2511,8 +2511,8 @@ static struct clk gpt2_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt3_fck = {
-	.name		= "gpt3_fck",
+static struct clk timer3_fck = {
+	.name		= "timer3_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2524,8 +2524,8 @@ static struct clk gpt3_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt4_fck = {
-	.name		= "gpt4_fck",
+static struct clk timer4_fck = {
+	.name		= "timer4_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2537,8 +2537,8 @@ static struct clk gpt4_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt5_fck = {
-	.name		= "gpt5_fck",
+static struct clk timer5_fck = {
+	.name		= "timer5_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2550,8 +2550,8 @@ static struct clk gpt5_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt6_fck = {
-	.name		= "gpt6_fck",
+static struct clk timer6_fck = {
+	.name		= "timer6_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2563,8 +2563,8 @@ static struct clk gpt6_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt7_fck = {
-	.name		= "gpt7_fck",
+static struct clk timer7_fck = {
+	.name		= "timer7_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2576,8 +2576,8 @@ static struct clk gpt7_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt8_fck = {
-	.name		= "gpt8_fck",
+static struct clk timer8_fck = {
+	.name		= "timer8_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -2589,8 +2589,8 @@ static struct clk gpt8_fck = {
 	.recalc		= &omap2_clksel_recalc,
 };
 
-static struct clk gpt9_fck = {
-	.name		= "gpt9_fck",
+static struct clk timer9_fck = {
+	.name		= "timer9_fck",
 	.ops		= &clkops_omap2_dflt_wait,
 	.init		= &omap2_init_clksel_parent,
 	.enable_reg	= OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
@@ -3092,8 +3092,8 @@ static struct clk sr_l4_ick = {
 
 /* SECURE_32K_FCK clocks */
 
-static struct clk gpt12_fck = {
-	.name		= "gpt12_fck",
+static struct clk timer12_fck = {
+	.name		= "timer12_fck",
 	.ops		= &clkops_null,
 	.parent		= &secure_32k_fck,
 	.clkdm_name	= "wkup_clkdm",
@@ -3300,8 +3300,8 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"modem_fck",	&modem_fck,	CK_34XX | CK_36XX),
 	CLK(NULL,	"sad2d_ick",	&sad2d_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"mad2d_ick",	&mad2d_ick,	CK_34XX | CK_36XX),
-	CLK(NULL,	"gpt10_fck",	&gpt10_fck,	CK_3XXX),
-	CLK(NULL,	"gpt11_fck",	&gpt11_fck,	CK_3XXX),
+	CLK(NULL,	"timer10_fck",	&timer10_fck,	CK_3XXX),
+	CLK(NULL,	"timer11_fck",	&timer11_fck,	CK_3XXX),
 	CLK(NULL,	"cpefuse_fck",	&cpefuse_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"ts_fck",	&ts_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"usbtll_fck",	&usbtll_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
@@ -3400,7 +3400,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("usbhs_omap",	"usb_tll_hs_usb_ch1_clk",	&dummy_ck,	CK_3XXX),
 	CLK("usbhs_omap",	"init_60m_fclk",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"usim_fck",	&usim_fck,	CK_3430ES2PLUS | CK_36XX),
-	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_3XXX),
+	CLK(NULL,	"timer1_fck",	&timer1_fck,	CK_3XXX),
 	CLK(NULL,	"wkup_32k_fck",	&wkup_32k_fck,	CK_3XXX),
 	CLK(NULL,	"gpio1_dbck",	&gpio1_dbck,	CK_3XXX),
 	CLK(NULL,	"wdt2_fck",		&wdt2_fck,	CK_3XXX),
@@ -3420,14 +3420,14 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"uart3_fck",	&uart3_fck,	CK_3XXX),
 	CLK(NULL,	"uart4_fck",	&uart4_fck,	CK_36XX),
 	CLK(NULL,	"uart4_fck",	&uart4_fck_am35xx, CK_3505 | CK_3517),
-	CLK(NULL,	"gpt2_fck",	&gpt2_fck,	CK_3XXX),
-	CLK(NULL,	"gpt3_fck",	&gpt3_fck,	CK_3XXX),
-	CLK(NULL,	"gpt4_fck",	&gpt4_fck,	CK_3XXX),
-	CLK(NULL,	"gpt5_fck",	&gpt5_fck,	CK_3XXX),
-	CLK(NULL,	"gpt6_fck",	&gpt6_fck,	CK_3XXX),
-	CLK(NULL,	"gpt7_fck",	&gpt7_fck,	CK_3XXX),
-	CLK(NULL,	"gpt8_fck",	&gpt8_fck,	CK_3XXX),
-	CLK(NULL,	"gpt9_fck",	&gpt9_fck,	CK_3XXX),
+	CLK(NULL,	"timer2_fck",	&timer2_fck,	CK_3XXX),
+	CLK(NULL,	"timer3_fck",	&timer3_fck,	CK_3XXX),
+	CLK(NULL,	"timer4_fck",	&timer4_fck,	CK_3XXX),
+	CLK(NULL,	"timer5_fck",	&timer5_fck,	CK_3XXX),
+	CLK(NULL,	"timer6_fck",	&timer6_fck,	CK_3XXX),
+	CLK(NULL,	"timer7_fck",	&timer7_fck,	CK_3XXX),
+	CLK(NULL,	"timer8_fck",	&timer8_fck,	CK_3XXX),
+	CLK(NULL,	"timer9_fck",	&timer9_fck,	CK_3XXX),
 	CLK(NULL,	"per_32k_alwon_fck", &per_32k_alwon_fck, CK_3XXX),
 	CLK(NULL,	"gpio6_dbck",	&gpio6_dbck,	CK_3XXX),
 	CLK(NULL,	"gpio5_dbck",	&gpio5_dbck,	CK_3XXX),
@@ -3468,7 +3468,7 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"sr2_fck",	&sr2_fck,	CK_34XX | CK_36XX),
 	CLK(NULL,	"sr_l4_ick",	&sr_l4_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"secure_32k_fck", &secure_32k_fck, CK_3XXX),
-	CLK(NULL,	"gpt12_fck",	&gpt12_fck,	CK_3XXX),
+	CLK(NULL,	"timer12_fck",	&timer12_fck,	CK_3XXX),
 	CLK(NULL,	"wdt1_fck",	&wdt1_fck,	CK_3XXX),
 	CLK(NULL,	"ipss_ick",	&ipss_ick,	CK_AM35XX),
 	CLK(NULL,	"rmii_ck",	&rmii_ck,	CK_AM35XX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 2172f66..17f3bcd 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3294,17 +3294,17 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"smartreflex_core_fck",		&smartreflex_core_fck,	CK_443X),
 	CLK(NULL,	"smartreflex_iva_fck",		&smartreflex_iva_fck,	CK_443X),
 	CLK(NULL,	"smartreflex_mpu_fck",		&smartreflex_mpu_fck,	CK_443X),
-	CLK(NULL,	"gpt1_fck",			&timer1_fck,	CK_443X),
-	CLK(NULL,	"gpt10_fck",			&timer10_fck,	CK_443X),
-	CLK(NULL,	"gpt11_fck",			&timer11_fck,	CK_443X),
-	CLK(NULL,	"gpt2_fck",			&timer2_fck,	CK_443X),
-	CLK(NULL,	"gpt3_fck",			&timer3_fck,	CK_443X),
-	CLK(NULL,	"gpt4_fck",			&timer4_fck,	CK_443X),
-	CLK(NULL,	"gpt5_fck",			&timer5_fck,	CK_443X),
-	CLK(NULL,	"gpt6_fck",			&timer6_fck,	CK_443X),
-	CLK(NULL,	"gpt7_fck",			&timer7_fck,	CK_443X),
-	CLK(NULL,	"gpt8_fck",			&timer8_fck,	CK_443X),
-	CLK(NULL,	"gpt9_fck",			&timer9_fck,	CK_443X),
+	CLK(NULL,	"timer1_fck",			&timer1_fck,	CK_443X),
+	CLK(NULL,	"timer10_fck",			&timer10_fck,	CK_443X),
+	CLK(NULL,	"timer11_fck",			&timer11_fck,	CK_443X),
+	CLK(NULL,	"timer2_fck",			&timer2_fck,	CK_443X),
+	CLK(NULL,	"timer3_fck",			&timer3_fck,	CK_443X),
+	CLK(NULL,	"timer4_fck",			&timer4_fck,	CK_443X),
+	CLK(NULL,	"timer5_fck",			&timer5_fck,	CK_443X),
+	CLK(NULL,	"timer6_fck",			&timer6_fck,	CK_443X),
+	CLK(NULL,	"timer7_fck",			&timer7_fck,	CK_443X),
+	CLK(NULL,	"timer8_fck",			&timer8_fck,	CK_443X),
+	CLK(NULL,	"timer9_fck",			&timer9_fck,	CK_443X),
 	CLK(NULL,	"uart1_fck",			&uart1_fck,	CK_443X),
 	CLK(NULL,	"uart2_fck",			&uart2_fck,	CK_443X),
 	CLK(NULL,	"uart3_fck",			&uart3_fck,	CK_443X),
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a5409ce..37d2fc8 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -309,7 +309,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
 static struct omap_hwmod omap2420_timer1_hwmod = {
 	.name		= "timer1",
 	.mpu_irqs	= omap2_timer1_mpu_irqs,
-	.main_clk	= "gpt1_fck",
+	.main_clk	= "timer1_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -346,7 +346,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
 static struct omap_hwmod omap2420_timer2_hwmod = {
 	.name		= "timer2",
 	.mpu_irqs	= omap2_timer2_mpu_irqs,
-	.main_clk	= "gpt2_fck",
+	.main_clk	= "timer2_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -383,7 +383,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
 static struct omap_hwmod omap2420_timer3_hwmod = {
 	.name		= "timer3",
 	.mpu_irqs	= omap2_timer3_mpu_irqs,
-	.main_clk	= "gpt3_fck",
+	.main_clk	= "timer3_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -420,7 +420,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
 static struct omap_hwmod omap2420_timer4_hwmod = {
 	.name		= "timer4",
 	.mpu_irqs	= omap2_timer4_mpu_irqs,
-	.main_clk	= "gpt4_fck",
+	.main_clk	= "timer4_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -457,7 +457,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
 static struct omap_hwmod omap2420_timer5_hwmod = {
 	.name		= "timer5",
 	.mpu_irqs	= omap2_timer5_mpu_irqs,
-	.main_clk	= "gpt5_fck",
+	.main_clk	= "timer5_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -495,7 +495,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
 static struct omap_hwmod omap2420_timer6_hwmod = {
 	.name		= "timer6",
 	.mpu_irqs	= omap2_timer6_mpu_irqs,
-	.main_clk	= "gpt6_fck",
+	.main_clk	= "timer6_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -532,7 +532,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
 static struct omap_hwmod omap2420_timer7_hwmod = {
 	.name		= "timer7",
 	.mpu_irqs	= omap2_timer7_mpu_irqs,
-	.main_clk	= "gpt7_fck",
+	.main_clk	= "timer7_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -569,7 +569,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
 static struct omap_hwmod omap2420_timer8_hwmod = {
 	.name		= "timer8",
 	.mpu_irqs	= omap2_timer8_mpu_irqs,
-	.main_clk	= "gpt8_fck",
+	.main_clk	= "timer8_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -606,7 +606,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
 static struct omap_hwmod omap2420_timer9_hwmod = {
 	.name		= "timer9",
 	.mpu_irqs	= omap2_timer9_mpu_irqs,
-	.main_clk	= "gpt9_fck",
+	.main_clk	= "timer9_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -643,7 +643,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
 static struct omap_hwmod omap2420_timer10_hwmod = {
 	.name		= "timer10",
 	.mpu_irqs	= omap2_timer10_mpu_irqs,
-	.main_clk	= "gpt10_fck",
+	.main_clk	= "timer10_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -680,7 +680,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
 static struct omap_hwmod omap2420_timer11_hwmod = {
 	.name		= "timer11",
 	.mpu_irqs	= omap2_timer11_mpu_irqs,
-	.main_clk	= "gpt11_fck",
+	.main_clk	= "timer11_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -717,7 +717,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
 static struct omap_hwmod omap2420_timer12_hwmod = {
 	.name		= "timer12",
 	.mpu_irqs	= omap2xxx_timer12_mpu_irqs,
-	.main_clk	= "gpt12_fck",
+	.main_clk	= "timer12_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index c4f56cb..bd70a40 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -383,7 +383,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
 static struct omap_hwmod omap2430_timer1_hwmod = {
 	.name		= "timer1",
 	.mpu_irqs	= omap2_timer1_mpu_irqs,
-	.main_clk	= "gpt1_fck",
+	.main_clk	= "timer1_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -420,7 +420,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
 static struct omap_hwmod omap2430_timer2_hwmod = {
 	.name		= "timer2",
 	.mpu_irqs	= omap2_timer2_mpu_irqs,
-	.main_clk	= "gpt2_fck",
+	.main_clk	= "timer2_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -457,7 +457,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
 static struct omap_hwmod omap2430_timer3_hwmod = {
 	.name		= "timer3",
 	.mpu_irqs	= omap2_timer3_mpu_irqs,
-	.main_clk	= "gpt3_fck",
+	.main_clk	= "timer3_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -494,7 +494,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
 static struct omap_hwmod omap2430_timer4_hwmod = {
 	.name		= "timer4",
 	.mpu_irqs	= omap2_timer4_mpu_irqs,
-	.main_clk	= "gpt4_fck",
+	.main_clk	= "timer4_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -531,7 +531,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
 static struct omap_hwmod omap2430_timer5_hwmod = {
 	.name		= "timer5",
 	.mpu_irqs	= omap2_timer5_mpu_irqs,
-	.main_clk	= "gpt5_fck",
+	.main_clk	= "timer5_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -568,7 +568,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
 static struct omap_hwmod omap2430_timer6_hwmod = {
 	.name		= "timer6",
 	.mpu_irqs	= omap2_timer6_mpu_irqs,
-	.main_clk	= "gpt6_fck",
+	.main_clk	= "timer6_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -605,7 +605,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
 static struct omap_hwmod omap2430_timer7_hwmod = {
 	.name		= "timer7",
 	.mpu_irqs	= omap2_timer7_mpu_irqs,
-	.main_clk	= "gpt7_fck",
+	.main_clk	= "timer7_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -642,7 +642,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
 static struct omap_hwmod omap2430_timer8_hwmod = {
 	.name		= "timer8",
 	.mpu_irqs	= omap2_timer8_mpu_irqs,
-	.main_clk	= "gpt8_fck",
+	.main_clk	= "timer8_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -679,7 +679,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
 static struct omap_hwmod omap2430_timer9_hwmod = {
 	.name		= "timer9",
 	.mpu_irqs	= omap2_timer9_mpu_irqs,
-	.main_clk	= "gpt9_fck",
+	.main_clk	= "timer9_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -716,7 +716,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
 static struct omap_hwmod omap2430_timer10_hwmod = {
 	.name		= "timer10",
 	.mpu_irqs	= omap2_timer10_mpu_irqs,
-	.main_clk	= "gpt10_fck",
+	.main_clk	= "timer10_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -753,7 +753,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
 static struct omap_hwmod omap2430_timer11_hwmod = {
 	.name		= "timer11",
 	.mpu_irqs	= omap2_timer11_mpu_irqs,
-	.main_clk	= "gpt11_fck",
+	.main_clk	= "timer11_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -790,7 +790,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
 static struct omap_hwmod omap2430_timer12_hwmod = {
 	.name		= "timer12",
 	.mpu_irqs	= omap2xxx_timer12_mpu_irqs,
-	.main_clk	= "gpt12_fck",
+	.main_clk	= "timer12_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 34b9766..595b4cd 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -640,7 +640,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
 static struct omap_hwmod omap3xxx_timer1_hwmod = {
 	.name		= "timer1",
 	.mpu_irqs	= omap2_timer1_mpu_irqs,
-	.main_clk	= "gpt1_fck",
+	.main_clk	= "timer1_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -686,7 +686,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
 static struct omap_hwmod omap3xxx_timer2_hwmod = {
 	.name		= "timer2",
 	.mpu_irqs	= omap2_timer2_mpu_irqs,
-	.main_clk	= "gpt2_fck",
+	.main_clk	= "timer2_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -732,7 +732,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
 static struct omap_hwmod omap3xxx_timer3_hwmod = {
 	.name		= "timer3",
 	.mpu_irqs	= omap2_timer3_mpu_irqs,
-	.main_clk	= "gpt3_fck",
+	.main_clk	= "timer3_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -778,7 +778,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
 static struct omap_hwmod omap3xxx_timer4_hwmod = {
 	.name		= "timer4",
 	.mpu_irqs	= omap2_timer4_mpu_irqs,
-	.main_clk	= "gpt4_fck",
+	.main_clk	= "timer4_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -824,7 +824,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
 static struct omap_hwmod omap3xxx_timer5_hwmod = {
 	.name		= "timer5",
 	.mpu_irqs	= omap2_timer5_mpu_irqs,
-	.main_clk	= "gpt5_fck",
+	.main_clk	= "timer5_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -870,7 +870,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
 static struct omap_hwmod omap3xxx_timer6_hwmod = {
 	.name		= "timer6",
 	.mpu_irqs	= omap2_timer6_mpu_irqs,
-	.main_clk	= "gpt6_fck",
+	.main_clk	= "timer6_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -916,7 +916,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
 static struct omap_hwmod omap3xxx_timer7_hwmod = {
 	.name		= "timer7",
 	.mpu_irqs	= omap2_timer7_mpu_irqs,
-	.main_clk	= "gpt7_fck",
+	.main_clk	= "timer7_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -962,7 +962,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
 static struct omap_hwmod omap3xxx_timer8_hwmod = {
 	.name		= "timer8",
 	.mpu_irqs	= omap2_timer8_mpu_irqs,
-	.main_clk	= "gpt8_fck",
+	.main_clk	= "timer8_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -1008,7 +1008,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
 static struct omap_hwmod omap3xxx_timer9_hwmod = {
 	.name		= "timer9",
 	.mpu_irqs	= omap2_timer9_mpu_irqs,
-	.main_clk	= "gpt9_fck",
+	.main_clk	= "timer9_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -1045,7 +1045,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
 static struct omap_hwmod omap3xxx_timer10_hwmod = {
 	.name		= "timer10",
 	.mpu_irqs	= omap2_timer10_mpu_irqs,
-	.main_clk	= "gpt10_fck",
+	.main_clk	= "timer10_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -1082,7 +1082,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
 static struct omap_hwmod omap3xxx_timer11_hwmod = {
 	.name		= "timer11",
 	.mpu_irqs	= omap2_timer11_mpu_irqs,
-	.main_clk	= "gpt11_fck",
+	.main_clk	= "timer11_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
@@ -1132,7 +1132,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
 static struct omap_hwmod omap3xxx_timer12_hwmod = {
 	.name		= "timer12",
 	.mpu_irqs	= omap3xxx_timer12_mpu_irqs,
-	.main_clk	= "gpt12_fck",
+	.main_clk	= "timer12_fck",
 	.prcm		= {
 		.omap2 = {
 			.prcm_reg_id = 1,
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 5d7a0ee..9459d70 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -164,8 +164,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
 		return -ENXIO;
 
 	/* After the dmtimer is using hwmod these clocks won't be needed */
-	sprintf(name, "gpt%d_fck", gptimer_id);
-	timer->fclk = clk_get(NULL, name);
+	timer->fclk = clk_get(NULL, oh->main_clk);
 	if (IS_ERR(timer->fclk))
 		return -ENODEV;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* RE: [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-04-16 12:25 [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
                   ` (2 preceding siblings ...)
  2012-04-16 12:25 ` [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
@ 2012-04-16 14:53 ` Hiremath, Vaibhav
  2012-04-16 19:50   ` DebBarma, Tarun Kanti
  3 siblings, 1 reply; 25+ messages in thread
From: Hiremath, Vaibhav @ 2012-04-16 14:53 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti, linux-omap
  Cc: tony, Hilman, Kevin, paul, Cousson, Benoit, Shilimkar, Santosh,
	Nayak, Rajendra

On Mon, Apr 16, 2012 at 17:55:22, DebBarma, Tarun Kanti wrote:
> The devm API usage in probe() simplifies error handling operation.
> Since iclk is not used in the driver it is removed from wherever
> not needed. The fclk naming is made uniform as per OMAP4 platform,
> viz. "timer1_fck", "timer2_fck", ... in all relevant places which
> include hwmod database. With this change there is no more need to
> construct clock names using sprintf() to be used in clk_get()
> during initialization. Instead we can use oh->main_clk directly.
> 
Correct me if I am wrong here, I believe there is no relation between 
naming of clock and sprintf; with the existing code you can still use
oh>main_clk, isn't it?

Below code alone should work right, so that driver code is becomes 
independent of clock name.

-	sprintf(name, "gpt%d_fck", gptimer_id);
-	timer->fclk = clk_get(NULL, name);
+	timer->fclk = clk_get(NULL, oh->main_clk);


Thanks,
Vaibhav

> Reference:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> Commit: e816b57a337ea3b755de72bec38c10c864f23015 (Linux 3.4-rc3)
> 
> Series is available here for reference:
> git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-dev dmtimer_cleanup_for_3.5
> 
> Tested on following platforms:
> OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
> Could not test on OMAP2420 due to unavailability of board.
> 
> Tarun Kanti DebBarma (3):
>   ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
>   ARM: OMAP2+: dmtimer: cleanup iclk usage
>   ARM: OMAP2+: dmtimer: cleanup fclk usage
> 
>  arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock44xx_data.c       |   33 ++++--------
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
>  arch/arm/mach-omap2/timer.c                |   10 +----
>  arch/arm/plat-omap/dmtimer.c               |   51 +++++++------------
>  arch/arm/plat-omap/include/plat/dmtimer.h  |    2 +-
>  10 files changed, 176 insertions(+), 208 deletions(-)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
  2012-04-16 12:25 ` [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
@ 2012-04-16 15:02   ` Shubhrajyoti
  2012-04-17  5:01     ` DebBarma, Tarun Kanti
  0 siblings, 1 reply; 25+ messages in thread
From: Shubhrajyoti @ 2012-04-16 15:02 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak

On Monday 16 April 2012 05:55 PM, Tarun Kanti DebBarma wrote:
> Replace the regular kzalloc and ioremap with the devm_ equivalent
> to simplify error handling. We don't need kree() anymore in
> omap_dm_timer_remove().
>
> Also added *dev* pointer to reference pdev->dev which makes the
> usage shorter in code.
>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> ---
>
<snip>
> -	timer->io_base = ioremap(mem->start, resource_size(mem));
> +	timer->io_base = devm_ioremap(dev, mem->start, resource_size(mem));
>  	if (!timer->io_base) {
Could we use  devm_request_and_ioremap here?


^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
@ 2012-04-16 15:03   ` Hiremath, Vaibhav
  2012-04-16 19:12     ` DebBarma, Tarun Kanti
  2012-04-16 19:27     ` Paul Walmsley
  2012-04-16 16:45   ` Paul Walmsley
  2012-04-16 16:50   ` Paul Walmsley
  2 siblings, 2 replies; 25+ messages in thread
From: Hiremath, Vaibhav @ 2012-04-16 15:03 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti, linux-omap
  Cc: tony, Hilman, Kevin, paul, Cousson, Benoit, Shilimkar, Santosh,
	Nayak, Rajendra

On Mon, Apr 16, 2012 at 17:55:24, DebBarma, Tarun Kanti wrote:
> We do not use iclk anywhere in the dmtimer driver and so removing it.
> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> ---
>  arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
>  arch/arm/mach-omap2/timer.c               |    7 -------
>  arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
>  3 files changed, 1 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
> index fa6ea65..2172f66 100644
> --- a/arch/arm/mach-omap2/clock44xx_data.c
> +++ b/arch/arm/mach-omap2/clock44xx_data.c
> @@ -3355,17 +3355,6 @@ static struct omap_clk omap44xx_clks[] = {
>  	CLK(NULL,	"auxclk5_ck",			&auxclk5_ck,	CK_443X),
>  	CLK(NULL,	"auxclkreq5_ck",		&auxclkreq5_ck,	CK_443X),
>  	CLK(NULL,	"gpmc_ck",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt1_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt2_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt3_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt4_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt5_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt6_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt7_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt8_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt9_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt10_ick",			&dummy_ck,	CK_443X),
> -	CLK(NULL,	"gpt11_ick",			&dummy_ck,	CK_443X),
>  	CLK("omap_i2c.1",	"ick",				&dummy_ck,	CK_443X),
>  	CLK("omap_i2c.2",	"ick",				&dummy_ck,	CK_443X),
>  	CLK("omap_i2c.3",	"ick",				&dummy_ck,	CK_443X),
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index c512bac..5d7a0ee 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -169,13 +169,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>  	if (IS_ERR(timer->fclk))
>  		return -ENODEV;
>  
> -	sprintf(name, "gpt%d_ick", gptimer_id);
> -	timer->iclk = clk_get(NULL, name);
> -	if (IS_ERR(timer->iclk)) {
> -		clk_put(timer->fclk);
> -		return -ENODEV;
> -	}
> -

Doesn't this impact OMAP3x family?
The interface clocks will be enabled in omap_hwmod_enable(), 
only if you set OCPIF_SWSUP_IDLE flag.

Thanks,
Vaibhav

>  	omap_hwmod_enable(oh);


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-16 12:25 ` [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
@ 2012-04-16 16:40   ` Paul Walmsley
  2012-04-16 20:51     ` Cousson, Benoit
  0 siblings, 1 reply; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 16:40 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

Hi

a few comments

On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:

> Timer clock nodes have been re-named as "timer1_fck", "timer2_fck", ...
> in place of "gpt1_fck", "gpt2_fck", ... This is in line with the names
> present in OMAP4 gptimer hwmod database assigned to oh->main_clk.
> Now we can get the fck name directly from oh->main_clk and pass the
> same to clk_get() to extract the fclk and thus avoid construction
> of fclk clock name.
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> ---
>  arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
>  arch/arm/mach-omap2/clock44xx_data.c       |   22 ++++----
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
>  arch/arm/mach-omap2/timer.c                |    3 +-
>  8 files changed, 156 insertions(+), 157 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
> index bace930..8d12e8e 100644
> --- a/arch/arm/mach-omap2/clock2420_data.c
> +++ b/arch/arm/mach-omap2/clock2420_data.c
> @@ -847,8 +847,8 @@ static struct clk gpt1_ick = {
>  	.recalc		= &followparent_recalc,
>  };
>  
> -static struct clk gpt1_fck = {
> -	.name		= "gpt1_fck",
> +static struct clk timer1_fck = {
> +	.name		= "timer1_fck",

So if you look at the OMAP242x TRM, you can see that the actual name for 
these clocks should be WU_GPT1_CLK and CORE_GPT*_CLK.  That's definitely 
closer to our existing "gpt*_fck" naming scheme, so I don't see the point 
in renaming the existing clock names.  It shouldn't affect the drivers or 
integration code in any way...

> @@ -1823,29 +1823,29 @@ static struct omap_clk omap2420_clks[] = {
>  	CLK(NULL,	"virt_prcm_set", &virt_prcm_set, CK_242X),
>  	/* general l4 interface ck, multi-parent functional clk */
>  	CLK(NULL,	"gpt1_ick",	&gpt1_ick,	CK_242X),
> -	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_242X),
> +	CLK(NULL,	"timer1_fck",	&timer1_fck,	CK_242X),

And these changes can be dropped too.  The only reason that these lines 
need to be kept around at all is because we're still using the clkdev code 
to register clocks (not just provide aliases).

> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index 5d7a0ee..9459d70 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -164,8 +164,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>  		return -ENXIO;
>  
>  	/* After the dmtimer is using hwmod these clocks won't be needed */
> -	sprintf(name, "gpt%d_fck", gptimer_id);
> -	timer->fclk = clk_get(NULL, name);
> +	timer->fclk = clk_get(NULL, oh->main_clk);
>  	if (IS_ERR(timer->fclk))
>  		return -ENODEV;

If you find yourself accessing struct omap_hwmod structure fields 
directly, something is almost certainly wrong; and this case is not an
exception.  Since the omap_device code is defining an "fck" alias to the 
main_clk, all you should need to do is:

-     sprintf(name, "gpt%d_fck", gptimer_id);
-     timer->fclk = clk_get(NULL, name);  
+     timer->fclk = clk_get(NULL, "fck");


- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
  2012-04-16 15:03   ` Hiremath, Vaibhav
@ 2012-04-16 16:45   ` Paul Walmsley
  2012-04-16 16:50   ` Paul Walmsley
  2 siblings, 0 replies; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 16:45 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:

> We do not use iclk anywhere in the dmtimer driver and so removing it.
> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>

Thanks, queued for 3.5.

- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
  2012-04-16 15:03   ` Hiremath, Vaibhav
  2012-04-16 16:45   ` Paul Walmsley
@ 2012-04-16 16:50   ` Paul Walmsley
  2012-04-16 19:26     ` DebBarma, Tarun Kanti
  2 siblings, 1 reply; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 16:50 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

Hi Tarun,

by the way,

On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:

> We do not use iclk anywhere in the dmtimer driver and so removing it.
> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> ---
>  arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
>  arch/arm/mach-omap2/timer.c               |    7 -------
>  arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
>  3 files changed, 1 insertions(+), 19 deletions(-)
> 

...

> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
> index 9418f00..be2b8c4 100644
> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
> @@ -259,7 +259,7 @@ struct omap_dm_timer {
>  	unsigned long phys_base;
>  	int id;
>  	int irq;
> -	struct clk *iclk, *fclk;
> +	struct clk *fclk;
>  
>  	void __iomem	*io_base;
>  	void __iomem	*sys_stat;	/* TISTAT timer status */

Am dropping this stray change, it seems unrelated to the rest of the 
patch.


- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 15:03   ` Hiremath, Vaibhav
@ 2012-04-16 19:12     ` DebBarma, Tarun Kanti
  2012-04-16 19:17       ` Hiremath, Vaibhav
  2012-04-16 19:27     ` Paul Walmsley
  1 sibling, 1 reply; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-16 19:12 UTC (permalink / raw)
  To: Hiremath, Vaibhav
  Cc: linux-omap, tony, Hilman, Kevin, paul, Cousson, Benoit,
	Shilimkar, Santosh, Nayak, Rajendra

On Mon, Apr 16, 2012 at 8:33 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> On Mon, Apr 16, 2012 at 17:55:24, DebBarma, Tarun Kanti wrote:
>> We do not use iclk anywhere in the dmtimer driver and so removing it.
>> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
>>
>> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>> ---
>>  arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
>>  arch/arm/mach-omap2/timer.c               |    7 -------
>>  arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
>>  3 files changed, 1 insertions(+), 19 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
>> index fa6ea65..2172f66 100644
>> --- a/arch/arm/mach-omap2/clock44xx_data.c
>> +++ b/arch/arm/mach-omap2/clock44xx_data.c
>> @@ -3355,17 +3355,6 @@ static struct omap_clk omap44xx_clks[] = {
>>       CLK(NULL,       "auxclk5_ck",                   &auxclk5_ck,    CK_443X),
>>       CLK(NULL,       "auxclkreq5_ck",                &auxclkreq5_ck, CK_443X),
>>       CLK(NULL,       "gpmc_ck",                      &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt1_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt2_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt3_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt4_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt5_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt6_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt7_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt8_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt9_ick",                     &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt10_ick",                    &dummy_ck,      CK_443X),
>> -     CLK(NULL,       "gpt11_ick",                    &dummy_ck,      CK_443X),
>>       CLK("omap_i2c.1",       "ick",                          &dummy_ck,      CK_443X),
>>       CLK("omap_i2c.2",       "ick",                          &dummy_ck,      CK_443X),
>>       CLK("omap_i2c.3",       "ick",                          &dummy_ck,      CK_443X),
>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>> index c512bac..5d7a0ee 100644
>> --- a/arch/arm/mach-omap2/timer.c
>> +++ b/arch/arm/mach-omap2/timer.c
>> @@ -169,13 +169,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>>       if (IS_ERR(timer->fclk))
>>               return -ENODEV;
>>
>> -     sprintf(name, "gpt%d_ick", gptimer_id);
>> -     timer->iclk = clk_get(NULL, name);
>> -     if (IS_ERR(timer->iclk)) {
>> -             clk_put(timer->fclk);
>> -             return -ENODEV;
>> -     }
>> -
>
> Doesn't this impact OMAP3x family?
> The interface clocks will be enabled in omap_hwmod_enable(),
> only if you set OCPIF_SWSUP_IDLE flag.
Please note that gptX_ick definitions are still intact in
clock3xxx_data.c and omap_hwmod_3xxx_data.c.
At least I have not observed impact of removing this on OMAP3430SDP testing.
--
Tarun
>
> Thanks,
> Vaibhav
>
>>       omap_hwmod_enable(oh);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 19:12     ` DebBarma, Tarun Kanti
@ 2012-04-16 19:17       ` Hiremath, Vaibhav
  0 siblings, 0 replies; 25+ messages in thread
From: Hiremath, Vaibhav @ 2012-04-16 19:17 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: linux-omap, tony, Hilman, Kevin, paul, Cousson, Benoit,
	Shilimkar, Santosh, Nayak, Rajendra

On Tue, Apr 17, 2012 at 00:42:06, DebBarma, Tarun Kanti wrote:
> On Mon, Apr 16, 2012 at 8:33 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> > On Mon, Apr 16, 2012 at 17:55:24, DebBarma, Tarun Kanti wrote:
> >> We do not use iclk anywhere in the dmtimer driver and so removing it.
> >> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
> >>
> >> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> >> ---
> >>  arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
> >>  arch/arm/mach-omap2/timer.c               |    7 -------
> >>  arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
> >>  3 files changed, 1 insertions(+), 19 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
> >> index fa6ea65..2172f66 100644
> >> --- a/arch/arm/mach-omap2/clock44xx_data.c
> >> +++ b/arch/arm/mach-omap2/clock44xx_data.c
> >> @@ -3355,17 +3355,6 @@ static struct omap_clk omap44xx_clks[] = {
<snip>
> >>       CLK("omap_i2c.3",       "ick",                          &dummy_ck,      CK_443X),
> >> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> >> index c512bac..5d7a0ee 100644
> >> --- a/arch/arm/mach-omap2/timer.c
> >> +++ b/arch/arm/mach-omap2/timer.c
> >> @@ -169,13 +169,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> >>       if (IS_ERR(timer->fclk))
> >>               return -ENODEV;
> >>
> >> -     sprintf(name, "gpt%d_ick", gptimer_id);
> >> -     timer->iclk = clk_get(NULL, name);
> >> -     if (IS_ERR(timer->iclk)) {
> >> -             clk_put(timer->fclk);
> >> -             return -ENODEV;
> >> -     }
> >> -
> >
> > Doesn't this impact OMAP3x family?
> > The interface clocks will be enabled in omap_hwmod_enable(),
> > only if you set OCPIF_SWSUP_IDLE flag.
> Please note that gptX_ick definitions are still intact in
> clock3xxx_data.c and omap_hwmod_3xxx_data.c.
> At least I have not observed impact of removing this on OMAP3430SDP 
> testing.

I guess that could be because, you are not using gptimer for clocksource
and in case of clockevent, the clock must be already enabled by u-boot.

Thanks,
Vaibhav
> --
> Tarun
> >
> > Thanks,
> > Vaibhav
> >
> >>       omap_hwmod_enable(oh);
> >
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 16:50   ` Paul Walmsley
@ 2012-04-16 19:26     ` DebBarma, Tarun Kanti
  2012-04-16 19:29       ` Paul Walmsley
  2012-04-16 19:30       ` Paul Walmsley
  0 siblings, 2 replies; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-16 19:26 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

On Mon, Apr 16, 2012 at 10:20 PM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi Tarun,
>
> by the way,
>
> On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:
>
>> We do not use iclk anywhere in the dmtimer driver and so removing it.
>> Hence removing the timer iclk entries from OMAP4 clkdev table as well.
>>
>> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>> ---
>>  arch/arm/mach-omap2/clock44xx_data.c      |   11 -----------
>>  arch/arm/mach-omap2/timer.c               |    7 -------
>>  arch/arm/plat-omap/include/plat/dmtimer.h |    2 +-
>>  3 files changed, 1 insertions(+), 19 deletions(-)
>>
>
> ...
>
>> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
>> index 9418f00..be2b8c4 100644
>> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
>> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
>> @@ -259,7 +259,7 @@ struct omap_dm_timer {
>>       unsigned long phys_base;
>>       int id;
>>       int irq;
>> -     struct clk *iclk, *fclk;
>> +     struct clk *fclk;
>>
>>       void __iomem    *io_base;
>>       void __iomem    *sys_stat;      /* TISTAT timer status */
>
> Am dropping this stray change, it seems unrelated to the rest of the
> patch.
Since the only usage of timer->iclk is removed from mach-omap2/timer.c
 there is no
point in keeping this field in struct omap_dm_timer {}.
Unless you are suggesting that both the above should be separated into
a separate patch?
--
Tarun

>
>
> - Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 15:03   ` Hiremath, Vaibhav
  2012-04-16 19:12     ` DebBarma, Tarun Kanti
@ 2012-04-16 19:27     ` Paul Walmsley
  2012-04-16 19:50       ` Hiremath, Vaibhav
  1 sibling, 1 reply; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 19:27 UTC (permalink / raw)
  To: Hiremath, Vaibhav
  Cc: DebBarma, Tarun Kanti, linux-omap, tony, Hilman, Kevin, Cousson,
	Benoit, Shilimkar, Santosh, Nayak, Rajendra

On Mon, 16 Apr 2012, Hiremath, Vaibhav wrote:

> Doesn't this impact OMAP3x family?
> The interface clocks will be enabled in omap_hwmod_enable(), 
> only if you set OCPIF_SWSUP_IDLE flag.

In the autoidle case, the interface clock should be enabled by the call to 
omap_hwmod_setup_one() earlier in the same function.



- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 19:26     ` DebBarma, Tarun Kanti
@ 2012-04-16 19:29       ` Paul Walmsley
  2012-04-16 19:30       ` Paul Walmsley
  1 sibling, 0 replies; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 19:29 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1096 bytes --]

On Tue, 17 Apr 2012, DebBarma, Tarun Kanti wrote:

> On Mon, Apr 16, 2012 at 10:20 PM, Paul Walmsley <paul@pwsan.com> wrote:
> >
> >> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
> >> index 9418f00..be2b8c4 100644
> >> --- a/arch/arm/plat-omap/include/plat/dmtimer.h
> >> +++ b/arch/arm/plat-omap/include/plat/dmtimer.h
> >> @@ -259,7 +259,7 @@ struct omap_dm_timer {
> >>       unsigned long phys_base;
> >>       int id;
> >>       int irq;
> >> -     struct clk *iclk, *fclk;
> >> +     struct clk *fclk;
> >>
> >>       void __iomem    *io_base;
> >>       void __iomem    *sys_stat;      /* TISTAT timer status */
> >
> > Am dropping this stray change, it seems unrelated to the rest of the
> > patch.
> Since the only usage of timer->iclk is removed from mach-omap2/timer.c
>  there is no
> point in keeping this field in struct omap_dm_timer {}.
> Unless you are suggesting that both the above should be separated into
> a separate patch?

Ah, I just missed the first removal line.  Never mind ...


- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 19:26     ` DebBarma, Tarun Kanti
  2012-04-16 19:29       ` Paul Walmsley
@ 2012-04-16 19:30       ` Paul Walmsley
  2012-04-16 19:34         ` DebBarma, Tarun Kanti
  1 sibling, 1 reply; 25+ messages in thread
From: Paul Walmsley @ 2012-04-16 19:30 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak


By the way, could you please send these patches to the linux-arm-kernel 
mailing list?  Also please do that for any future OMAP patches.


- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 19:30       ` Paul Walmsley
@ 2012-04-16 19:34         ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-16 19:34 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-omap, tony, khilman, b-cousson, santosh.shilimkar, rnayak

On Tue, Apr 17, 2012 at 1:00 AM, Paul Walmsley <paul@pwsan.com> wrote:
>
> By the way, could you please send these patches to the linux-arm-kernel
> mailing list?  Also please do that for any future OMAP patches.
Sure, thanks.
--
Tarun
>
>
> - Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-16 19:27     ` Paul Walmsley
@ 2012-04-16 19:50       ` Hiremath, Vaibhav
  0 siblings, 0 replies; 25+ messages in thread
From: Hiremath, Vaibhav @ 2012-04-16 19:50 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: DebBarma, Tarun Kanti, linux-omap, tony, Hilman, Kevin, Cousson,
	Benoit, Shilimkar, Santosh, Nayak, Rajendra

On Tue, Apr 17, 2012 at 00:57:40, Paul Walmsley wrote:
> On Mon, 16 Apr 2012, Hiremath, Vaibhav wrote:
> 
> > Doesn't this impact OMAP3x family?
> > The interface clocks will be enabled in omap_hwmod_enable(), 
> > only if you set OCPIF_SWSUP_IDLE flag.
> 
> In the autoidle case, the interface clock should be enabled by the call to 
> omap_hwmod_setup_one() earlier in the same function.
> 

You are right Paul, iclk is getting enabled in omap_hwmod_setup_one() -

static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
{
	...
		if (os->flags & OCPIF_SWSUP_IDLE) {
			/* XXX omap_iclk_deny_idle(c); */
		} else {
			/* XXX omap_iclk_allow_idle(c); */
			clk_enable(os->_clk);
		}
	...
}

Thanks,
Vaibhav

> 
> 
> - Paul
> 


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-04-16 14:53 ` [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Hiremath, Vaibhav
@ 2012-04-16 19:50   ` DebBarma, Tarun Kanti
  2012-04-16 19:53     ` Hiremath, Vaibhav
  0 siblings, 1 reply; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-16 19:50 UTC (permalink / raw)
  To: Hiremath, Vaibhav
  Cc: linux-omap, tony, Hilman, Kevin, paul, Cousson, Benoit,
	Shilimkar, Santosh, Nayak, Rajendra

On Mon, Apr 16, 2012 at 8:23 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> On Mon, Apr 16, 2012 at 17:55:22, DebBarma, Tarun Kanti wrote:
>> The devm API usage in probe() simplifies error handling operation.
>> Since iclk is not used in the driver it is removed from wherever
>> not needed. The fclk naming is made uniform as per OMAP4 platform,
>> viz. "timer1_fck", "timer2_fck", ... in all relevant places which
>> include hwmod database. With this change there is no more need to
>> construct clock names using sprintf() to be used in clk_get()
>> during initialization. Instead we can use oh->main_clk directly.
>>
> Correct me if I am wrong here, I believe there is no relation between
> naming of clock and sprintf; with the existing code you can still use
> oh>main_clk, isn't it?
Right. The only thing is we don't that anymore.

>
> Below code alone should work right, so that driver code is becomes
> independent of clock name.
>
> -       sprintf(name, "gpt%d_fck", gptimer_id);
> -       timer->fclk = clk_get(NULL, name);
> +       timer->fclk = clk_get(NULL, oh->main_clk);
Yes. Of course, Paul has given alternate suggestion to using oh->main_clk.
--
Tarun
>
>
> Thanks,
> Vaibhav
>
>> Reference:
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>> Commit: e816b57a337ea3b755de72bec38c10c864f23015 (Linux 3.4-rc3)
>>
>> Series is available here for reference:
>> git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-dev dmtimer_cleanup_for_3.5
>>
>> Tested on following platforms:
>> OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
>> Could not test on OMAP2420 due to unavailability of board.
>>
>> Tarun Kanti DebBarma (3):
>>   ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
>>   ARM: OMAP2+: dmtimer: cleanup iclk usage
>>   ARM: OMAP2+: dmtimer: cleanup fclk usage
>>
>>  arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
>>  arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
>>  arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
>>  arch/arm/mach-omap2/clock44xx_data.c       |   33 ++++--------
>>  arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
>>  arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
>>  arch/arm/mach-omap2/timer.c                |   10 +----
>>  arch/arm/plat-omap/dmtimer.c               |   51 +++++++------------
>>  arch/arm/plat-omap/include/plat/dmtimer.h  |    2 +-
>>  10 files changed, 176 insertions(+), 208 deletions(-)
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-04-16 19:50   ` DebBarma, Tarun Kanti
@ 2012-04-16 19:53     ` Hiremath, Vaibhav
  0 siblings, 0 replies; 25+ messages in thread
From: Hiremath, Vaibhav @ 2012-04-16 19:53 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: linux-omap, tony, Hilman, Kevin, paul, Cousson, Benoit,
	Shilimkar, Santosh, Nayak, Rajendra

On Tue, Apr 17, 2012 at 01:20:49, DebBarma, Tarun Kanti wrote:
> On Mon, Apr 16, 2012 at 8:23 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> > On Mon, Apr 16, 2012 at 17:55:22, DebBarma, Tarun Kanti wrote:
> >> The devm API usage in probe() simplifies error handling operation.
> >> Since iclk is not used in the driver it is removed from wherever
> >> not needed. The fclk naming is made uniform as per OMAP4 platform,
> >> viz. "timer1_fck", "timer2_fck", ... in all relevant places which
> >> include hwmod database. With this change there is no more need to
> >> construct clock names using sprintf() to be used in clk_get()
> >> during initialization. Instead we can use oh->main_clk directly.
> >>
> > Correct me if I am wrong here, I believe there is no relation between
> > naming of clock and sprintf; with the existing code you can still use
> > oh>main_clk, isn't it?
> Right. The only thing is we don't that anymore.
> 
> >
> > Below code alone should work right, so that driver code is becomes
> > independent of clock name.
> >
> > -       sprintf(name, "gpt%d_fck", gptimer_id);
> > -       timer->fclk = clk_get(NULL, name);
> > +       timer->fclk = clk_get(NULL, oh->main_clk);
> Yes. Of course, Paul has given alternate suggestion to using oh->main_clk.

Yeah, I just saw it. I agree that, that's better option.

Thanks,
Vaibhav


> --
> Tarun
> >
> >
> > Thanks,
> > Vaibhav
> >
> >> Reference:
> >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >> Commit: e816b57a337ea3b755de72bec38c10c864f23015 (Linux 3.4-rc3)
> >>
> >> Series is available here for reference:
> >> git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-dev dmtimer_cleanup_for_3.5
> >>
> >> Tested on following platforms:
> >> OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
> >> Could not test on OMAP2420 due to unavailability of board.
> >>
> >> Tarun Kanti DebBarma (3):
> >>   ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
> >>   ARM: OMAP2+: dmtimer: cleanup iclk usage
> >>   ARM: OMAP2+: dmtimer: cleanup fclk usage
> >>
> >>  arch/arm/mach-omap2/clock2420_data.c       |   72 ++++++++++++++--------------
> >>  arch/arm/mach-omap2/clock2430_data.c       |   72 ++++++++++++++--------------
> >>  arch/arm/mach-omap2/clock3xxx_data.c       |   72 ++++++++++++++--------------
> >>  arch/arm/mach-omap2/clock44xx_data.c       |   33 ++++--------
> >>  arch/arm/mach-omap2/omap_hwmod_2420_data.c |   24 +++++-----
> >>  arch/arm/mach-omap2/omap_hwmod_2430_data.c |   24 +++++-----
> >>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   24 +++++-----
> >>  arch/arm/mach-omap2/timer.c                |   10 +----
> >>  arch/arm/plat-omap/dmtimer.c               |   51 +++++++------------
> >>  arch/arm/plat-omap/include/plat/dmtimer.h  |    2 +-
> >>  10 files changed, 176 insertions(+), 208 deletions(-)
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> >
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-16 16:40   ` Paul Walmsley
@ 2012-04-16 20:51     ` Cousson, Benoit
  2012-04-18  5:00       ` DebBarma, Tarun Kanti
  0 siblings, 1 reply; 25+ messages in thread
From: Cousson, Benoit @ 2012-04-16 20:51 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Tarun Kanti DebBarma, linux-omap, tony, khilman,
	santosh.shilimkar, rnayak

On 4/16/2012 6:40 PM, Paul Walmsley wrote:
> Hi
>
> a few comments
>
> On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:

...

>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>> index 5d7a0ee..9459d70 100644
>> --- a/arch/arm/mach-omap2/timer.c
>> +++ b/arch/arm/mach-omap2/timer.c
>> @@ -164,8 +164,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>>   		return -ENXIO;
>>
>>   	/* After the dmtimer is using hwmod these clocks won't be needed */
>> -	sprintf(name, "gpt%d_fck", gptimer_id);
>> -	timer->fclk = clk_get(NULL, name);
>> +	timer->fclk = clk_get(NULL, oh->main_clk);
>>   	if (IS_ERR(timer->fclk))
>>   		return -ENODEV;
>
> If you find yourself accessing struct omap_hwmod structure fields
> directly, something is almost certainly wrong; and this case is not an
> exception.  Since the omap_device code is defining an "fck" alias to the
> main_clk, all you should need to do is:
>
> -     sprintf(name, "gpt%d_fck", gptimer_id);
> -     timer->fclk = clk_get(NULL, name);
> +     timer->fclk = clk_get(NULL, "fck");

Are you sure that's the same in that case?
"timer1_fck" is an unique entry in the clkdev table whereas there are a 
bunch of clock nodes with the "fck" alias local to a device.
Without the proper dev_id, there is no way to guaranty we will get the 
timer fck clock alias.

Since that code is executed pretty early before there is any device, 
accessing directly the hwmod entry seems to be the only method to get 
the proper clock without having to provide again the full clock name.

AFAIR, the "fck" alias is created during the omap_device creation, so I 
guess it is too early here to have it.

To be honest I'm always a little bit confused with that early code, but 
it looks like there is no device at all in that early part of the code.

Regards,
Benoit

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe()
  2012-04-16 15:02   ` Shubhrajyoti
@ 2012-04-17  5:01     ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-17  5:01 UTC (permalink / raw)
  To: Shubhrajyoti
  Cc: linux-omap, tony, khilman, paul, b-cousson, santosh.shilimkar, rnayak

On Mon, Apr 16, 2012 at 8:32 PM, Shubhrajyoti <shubhrajyoti@ti.com> wrote:
> On Monday 16 April 2012 05:55 PM, Tarun Kanti DebBarma wrote:
>> Replace the regular kzalloc and ioremap with the devm_ equivalent
>> to simplify error handling. We don't need kree() anymore in
>> omap_dm_timer_remove().
>>
>> Also added *dev* pointer to reference pdev->dev which makes the
>> usage shorter in code.
>>
>> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>> ---
>>
> <snip>
>> -     timer->io_base = ioremap(mem->start, resource_size(mem));
>> +     timer->io_base = devm_ioremap(dev, mem->start, resource_size(mem));
>>       if (!timer->io_base) {
> Could we use  devm_request_and_ioremap here?
>
Yes, I will change. Thanks.
--
Tarun
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-16 20:51     ` Cousson, Benoit
@ 2012-04-18  5:00       ` DebBarma, Tarun Kanti
  2012-04-18  8:15         ` Paul Walmsley
  0 siblings, 1 reply; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-18  5:00 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: Paul Walmsley, linux-omap, tony, khilman, santosh.shilimkar, rnayak

Hi Paul,

On Tue, Apr 17, 2012 at 2:21 AM, Cousson, Benoit <b-cousson@ti.com> wrote:
> On 4/16/2012 6:40 PM, Paul Walmsley wrote:
>>
>> Hi
>>
>> a few comments
>>
>> On Mon, 16 Apr 2012, Tarun Kanti DebBarma wrote:
>
>
> ...
>
>
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index 5d7a0ee..9459d70 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -164,8 +164,7 @@ static int __init omap_dm_timer_init_one(struct
>>> omap_dm_timer *timer,
>>>                return -ENXIO;
>>>
>>>        /* After the dmtimer is using hwmod these clocks won't be needed
>>> */
>>> -       sprintf(name, "gpt%d_fck", gptimer_id);
>>> -       timer->fclk = clk_get(NULL, name);
>>> +       timer->fclk = clk_get(NULL, oh->main_clk);
>>>        if (IS_ERR(timer->fclk))
>>>                return -ENODEV;
>>
>>
>> If you find yourself accessing struct omap_hwmod structure fields
>> directly, something is almost certainly wrong; and this case is not an
>> exception.  Since the omap_device code is defining an "fck" alias to the
>> main_clk, all you should need to do is:
>>
>> -     sprintf(name, "gpt%d_fck", gptimer_id);
>> -     timer->fclk = clk_get(NULL, name);
>> +     timer->fclk = clk_get(NULL, "fck");
>
>
> Are you sure that's the same in that case?
> "timer1_fck" is an unique entry in the clkdev table whereas there are a
> bunch of clock nodes with the "fck" alias local to a device.
> Without the proper dev_id, there is no way to guaranty we will get the timer
> fck clock alias.
That' right, I confirmed that clk_get(NULL, "fck") does not work.
For this to work we need the dev pointer in place of NULL.
What is your alternate suggestion? Thanks.
--
Tarun

>
> Since that code is executed pretty early before there is any device,
> accessing directly the hwmod entry seems to be the only method to get the
> proper clock without having to provide again the full clock name.
>
> AFAIR, the "fck" alias is created during the omap_device creation, so I
> guess it is too early here to have it.
>
> To be honest I'm always a little bit confused with that early code, but it
> looks like there is no device at all in that early part of the code.
>
> Regards,
> Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-18  5:00       ` DebBarma, Tarun Kanti
@ 2012-04-18  8:15         ` Paul Walmsley
  2012-04-18  8:19           ` DebBarma, Tarun Kanti
  0 siblings, 1 reply; 25+ messages in thread
From: Paul Walmsley @ 2012-04-18  8:15 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: Cousson, Benoit, linux-omap, tony, khilman, santosh.shilimkar, rnayak

[-- Attachment #1: Type: TEXT/PLAIN, Size: 557 bytes --]

Hi Tarun

On Wed, 18 Apr 2012, DebBarma, Tarun Kanti wrote:

> That' right, I confirmed that clk_get(NULL, "fck") does not work.

Yes, you and Benoît are right, I should have looked more closely at what 
was being patched.

> For this to work we need the dev pointer in place of NULL.
> What is your alternate suggestion? Thanks.

Rather than accessing the struct omap_hwmod field directly, 
please, in a separate patch against omap_hwmod.c, create a function to 
return the main clock.  Something like "omap_hwmod_get_main_clk()".


- Paul

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-18  8:15         ` Paul Walmsley
@ 2012-04-18  8:19           ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 25+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-18  8:19 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Cousson, Benoit, linux-omap, tony, khilman, santosh.shilimkar, rnayak

On Wed, Apr 18, 2012 at 1:45 PM, Paul Walmsley <paul@pwsan.com> wrote:
> Hi Tarun
>
> On Wed, 18 Apr 2012, DebBarma, Tarun Kanti wrote:
>
>> That' right, I confirmed that clk_get(NULL, "fck") does not work.
>
> Yes, you and Benoît are right, I should have looked more closely at what
> was being patched.
>
>> For this to work we need the dev pointer in place of NULL.
>> What is your alternate suggestion? Thanks.
>
> Rather than accessing the struct omap_hwmod field directly,
> please, in a separate patch against omap_hwmod.c, create a function to
> return the main clock.  Something like "omap_hwmod_get_main_clk()".
Sure. Thanks you.
--
Tarun
>
>
> - Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2012-04-18  8:19 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16 12:25 [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
2012-04-16 12:25 ` [PATCH 1/3] ARM: OMAP: dmtimer: Use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
2012-04-16 15:02   ` Shubhrajyoti
2012-04-17  5:01     ` DebBarma, Tarun Kanti
2012-04-16 12:25 ` [PATCH 2/3] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
2012-04-16 15:03   ` Hiremath, Vaibhav
2012-04-16 19:12     ` DebBarma, Tarun Kanti
2012-04-16 19:17       ` Hiremath, Vaibhav
2012-04-16 19:27     ` Paul Walmsley
2012-04-16 19:50       ` Hiremath, Vaibhav
2012-04-16 16:45   ` Paul Walmsley
2012-04-16 16:50   ` Paul Walmsley
2012-04-16 19:26     ` DebBarma, Tarun Kanti
2012-04-16 19:29       ` Paul Walmsley
2012-04-16 19:30       ` Paul Walmsley
2012-04-16 19:34         ` DebBarma, Tarun Kanti
2012-04-16 12:25 ` [PATCH 3/3] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
2012-04-16 16:40   ` Paul Walmsley
2012-04-16 20:51     ` Cousson, Benoit
2012-04-18  5:00       ` DebBarma, Tarun Kanti
2012-04-18  8:15         ` Paul Walmsley
2012-04-18  8:19           ` DebBarma, Tarun Kanti
2012-04-16 14:53 ` [PATCH 0/3] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Hiremath, Vaibhav
2012-04-16 19:50   ` DebBarma, Tarun Kanti
2012-04-16 19:53     ` Hiremath, Vaibhav

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.