All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-04-20 12:39 ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

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.
Corrected the timer fck name mis-match between clock44xx_data.c and
omap_hwmod_44xx_data.c.
Added omap_hwmod_get_main_clk() API. There is no more need to construct
clock names using sprintf() to be used in clk_get() during initialization.

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:
OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
Could not test on OMAP2420 due to unavailability of board.

v2:
- Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
- Add omap_hwmod_get_main_clk() API
- Reverted changes of clock names from OMAP2 and OMAP3 platforms  

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Tarun Kanti DebBarma (4):
  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  ARM: OMAP2+: dmtimer: cleanup iclk usage
  ARM: OMAP2+: dmtimer: cleanup fclk usage

 arch/arm/mach-omap2/clock44xx_data.c         |   33 ++++++-----------
 arch/arm/mach-omap2/omap_hwmod.c             |   15 ++++++++
 arch/arm/mach-omap2/timer.c                  |   10 +-----
 arch/arm/plat-omap/dmtimer.c                 |   51 ++++++++------------------
 arch/arm/plat-omap/include/plat/dmtimer.h    |    2 +-
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
 6 files changed, 46 insertions(+), 67 deletions(-)


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

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-04-20 12:39 ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

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.
Corrected the timer fck name mis-match between clock44xx_data.c and
omap_hwmod_44xx_data.c.
Added omap_hwmod_get_main_clk() API. There is no more need to construct
clock names using sprintf() to be used in clk_get() during initialization.

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:
OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
Could not test on OMAP2420 due to unavailability of board.

v2:
- Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
- Add omap_hwmod_get_main_clk() API
- Reverted changes of clock names from OMAP2 and OMAP3 platforms  

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Tarun Kanti DebBarma (4):
  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  ARM: OMAP2+: dmtimer: cleanup iclk usage
  ARM: OMAP2+: dmtimer: cleanup fclk usage

 arch/arm/mach-omap2/clock44xx_data.c         |   33 ++++++-----------
 arch/arm/mach-omap2/omap_hwmod.c             |   15 ++++++++
 arch/arm/mach-omap2/timer.c                  |   10 +-----
 arch/arm/plat-omap/dmtimer.c                 |   51 ++++++++------------------
 arch/arm/plat-omap/include/plat/dmtimer.h    |    2 +-
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
 6 files changed, 46 insertions(+), 67 deletions(-)

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

* [PATCH v2 1/4] ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
  2012-04-20 12:39 ` Tarun Kanti DebBarma
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  -1 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

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

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

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

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

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 652139c..8a8768b 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,39 @@ 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__);
-		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_request_and_ioremap(dev, mem);
 	if (!timer->io_base) {
-		dev_err(&pdev->dev, "%s: ioremap failed.\n", __func__);
-		ret = -ENOMEM;
-		goto err_free_mem;
+		dev_err(dev, "%s: region already claimed.\n", __func__);
+		return -ENOMEM;
 	}
 
 	timer->id = pdev->id;
@@ -682,12 +672,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 +687,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 +710,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] 34+ messages in thread

* [PATCH v2 1/4] ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

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

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 652139c..8a8768b 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,39 @@ 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__);
-		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_request_and_ioremap(dev, mem);
 	if (!timer->io_base) {
-		dev_err(&pdev->dev, "%s: ioremap failed.\n", __func__);
-		ret = -ENOMEM;
-		goto err_free_mem;
+		dev_err(dev, "%s: region already claimed.\n", __func__);
+		return -ENOMEM;
 	}
 
 	timer->id = pdev->id;
@@ -682,12 +672,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 +687,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 +710,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] 34+ messages in thread

* [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  2012-04-20 12:39 ` Tarun Kanti DebBarma
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  -1 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

Add an API to get main clock name associated with a given @oh.
This will avoid the need to construct fclk names during early
initialization in order to get fclk handle using clk_get().

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb..2c6214d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
 
 	return 0;
 }
+
+/**
+ * omap_hwmod_get_main_clk - get pointer to main clock name
+ * @oh: struct omap_hwmod *
+ *
+ * Returns the main clock name assocated with @oh upon success,
+ * or NULL if @oh is NULL.
+ */
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
+{
+	if (!oh)
+		return NULL;
+
+	return oh->main_clk;
+}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145..f3c0697 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
 
 int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
 
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
+
 /*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
-- 
1.7.0.4


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

* [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

Add an API to get main clock name associated with a given @oh.
This will avoid the need to construct fclk names during early
initialization in order to get fclk handle using clk_get().

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2c27fdb..2c6214d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
 
 	return 0;
 }
+
+/**
+ * omap_hwmod_get_main_clk - get pointer to main clock name
+ * @oh: struct omap_hwmod *
+ *
+ * Returns the main clock name assocated with @oh upon success,
+ * or NULL if @oh is NULL.
+ */
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
+{
+	if (!oh)
+		return NULL;
+
+	return oh->main_clk;
+}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 8070145..f3c0697 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
 
 int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
 
+const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
+
 /*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
-- 
1.7.0.4

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

* [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-20 12:39 ` Tarun Kanti DebBarma
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  -1 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

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.

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

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] 34+ messages in thread

* [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

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] 34+ messages in thread

* [PATCH v2 4/4] ARM: OMAP2+: dmtimer: cleanup fclk usage
  2012-04-20 12:39 ` Tarun Kanti DebBarma
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  -1 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

With omap_hwmod_get_main_clk() now available, this can be passed to
clk_get() to extract the fclk and thus avoid construction of fclk name.
Corrected the timer fck name mis-match between clock44xx_data.c and
omap_hwmod_44xx_data.c. For other platforms this is already taken care.

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/clock44xx_data.c |   22 +++++++++++-----------
 arch/arm/mach-omap2/timer.c          |    3 +--
 2 files changed, 12 insertions(+), 13 deletions(-)

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/timer.c b/arch/arm/mach-omap2/timer.c
index 5d7a0ee..80c9667 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, omap_hwmod_get_main_clk(oh));
 	if (IS_ERR(timer->fclk))
 		return -ENODEV;
 
-- 
1.7.0.4


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

* [PATCH v2 4/4] ARM: OMAP2+: dmtimer: cleanup fclk usage
@ 2012-04-20 12:39   ` Tarun Kanti DebBarma
  0 siblings, 0 replies; 34+ messages in thread
From: Tarun Kanti DebBarma @ 2012-04-20 12:39 UTC (permalink / raw)
  To: linux-arm-kernel

With omap_hwmod_get_main_clk() now available, this can be passed to
clk_get() to extract the fclk and thus avoid construction of fclk name.
Corrected the timer fck name mis-match between clock44xx_data.c and
omap_hwmod_44xx_data.c. For other platforms this is already taken care.

Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
---
 arch/arm/mach-omap2/clock44xx_data.c |   22 +++++++++++-----------
 arch/arm/mach-omap2/timer.c          |    3 +--
 2 files changed, 12 insertions(+), 13 deletions(-)

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/timer.c b/arch/arm/mach-omap2/timer.c
index 5d7a0ee..80c9667 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, omap_hwmod_get_main_clk(oh));
 	if (IS_ERR(timer->fclk))
 		return -ENODEV;
 
-- 
1.7.0.4

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

* Re: [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  2012-04-20 12:39   ` Tarun Kanti DebBarma
@ 2012-04-20 15:10     ` Cousson, Benoit
  -1 siblings, 0 replies; 34+ messages in thread
From: Cousson, Benoit @ 2012-04-20 15:10 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Tony Lindgren,
	Kevin Hilman, Rajendra Nayak, Santosh Shilimkar

Hi Tarun,

Thanks for this series, it will help us cleaning a little bit more the 
legacy stuff we have inside our data files.

On 4/20/2012 2:39 PM, Tarun Kanti DebBarma wrote:
> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().
>
> Cc: Cousson, Benoit<b-cousson@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Tony Lindgren<tony@atomide.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Cc: Rajendra Nayak<rnayak@ti.com>
> Cc: Santosh Shilimkar<santosh.shilimkar@ti.com>
>
> Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>

Acked-by: Benoit Cousson <b-cousson@ti.com>

Regards,
Benoit

> ---
>   arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
>   2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 2c27fdb..2c6214d 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
>
>   	return 0;
>   }
> +
> +/**
> + * omap_hwmod_get_main_clk - get pointer to main clock name
> + * @oh: struct omap_hwmod *
> + *
> + * Returns the main clock name assocated with @oh upon success,
> + * or NULL if @oh is NULL.
> + */
> +const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
> +{
> +	if (!oh)
> +		return NULL;
> +
> +	return oh->main_clk;
> +}
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index 8070145..f3c0697 100644
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
>
>   int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
>
> +const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
> +
>   /*
>    * Chip variant-specific hwmod init routines - XXX should be converted
>    * to use initcalls once the initial boot ordering is straightened out


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

* [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
@ 2012-04-20 15:10     ` Cousson, Benoit
  0 siblings, 0 replies; 34+ messages in thread
From: Cousson, Benoit @ 2012-04-20 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tarun,

Thanks for this series, it will help us cleaning a little bit more the 
legacy stuff we have inside our data files.

On 4/20/2012 2:39 PM, Tarun Kanti DebBarma wrote:
> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().
>
> Cc: Cousson, Benoit<b-cousson@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Tony Lindgren<tony@atomide.com>
> Cc: Kevin Hilman<khilman@ti.com>
> Cc: Rajendra Nayak<rnayak@ti.com>
> Cc: Santosh Shilimkar<santosh.shilimkar@ti.com>
>
> Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>

Acked-by: Benoit Cousson <b-cousson@ti.com>

Regards,
Benoit

> ---
>   arch/arm/mach-omap2/omap_hwmod.c             |   15 +++++++++++++++
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 ++
>   2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 2c27fdb..2c6214d 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -2775,3 +2775,18 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx)
>
>   	return 0;
>   }
> +
> +/**
> + * omap_hwmod_get_main_clk - get pointer to main clock name
> + * @oh: struct omap_hwmod *
> + *
> + * Returns the main clock name assocated with @oh upon success,
> + * or NULL if @oh is NULL.
> + */
> +const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
> +{
> +	if (!oh)
> +		return NULL;
> +
> +	return oh->main_clk;
> +}
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index 8070145..f3c0697 100644
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -608,6 +608,8 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh);
>
>   int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx);
>
> +const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
> +
>   /*
>    * Chip variant-specific hwmod init routines - XXX should be converted
>    * to use initcalls once the initial boot ordering is straightened out

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

* Re: [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-20 12:39   ` Tarun Kanti DebBarma
@ 2012-04-23 17:48     ` Kevin Hilman
  -1 siblings, 0 replies; 34+ messages in thread
From: Kevin Hilman @ 2012-04-23 17:48 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Paul Walmsley,
	Tony Lindgren, Rajendra Nayak, Santosh Shilimkar

Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:

> 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.

What about the OMAP2/3 clkdev tables?  Can't those be removed as well?

Comment applies to PATCH 4/4 also.

Kevin

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

* [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
@ 2012-04-23 17:48     ` Kevin Hilman
  0 siblings, 0 replies; 34+ messages in thread
From: Kevin Hilman @ 2012-04-23 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:

> 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.

What about the OMAP2/3 clkdev tables?  Can't those be removed as well?

Comment applies to PATCH 4/4 also.

Kevin

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

* Re: [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-23 17:48     ` Kevin Hilman
@ 2012-04-23 19:36       ` DebBarma, Tarun Kanti
  -1 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-23 19:36 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Paul Walmsley,
	Tony Lindgren, Rajendra Nayak, Santosh Shilimkar

On Mon, Apr 23, 2012 at 11:18 PM, Kevin Hilman <khilman@ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
>> 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.
>
> What about the OMAP2/3 clkdev tables?  Can't those be removed as well?
No, they are being used. In fact I removed them in the beginning only
to discover they are needed.

>
> Comment applies to PATCH 4/4 also.
You mean removing iclk from clkdev table? That is already done in this patch!!
--
Tarun
>
> Kevin
--
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] 34+ messages in thread

* [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
@ 2012-04-23 19:36       ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-04-23 19:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 23, 2012 at 11:18 PM, Kevin Hilman <khilman@ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
>> 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.
>
> What about the OMAP2/3 clkdev tables? ?Can't those be removed as well?
No, they are being used. In fact I removed them in the beginning only
to discover they are needed.

>
> Comment applies to PATCH 4/4 also.
You mean removing iclk from clkdev table? That is already done in this patch!!
--
Tarun
>
> Kevin

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

* Re: [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
  2012-04-23 19:36       ` DebBarma, Tarun Kanti
@ 2012-04-24  0:34         ` Kevin Hilman
  -1 siblings, 0 replies; 34+ messages in thread
From: Kevin Hilman @ 2012-04-24  0:34 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Paul Walmsley,
	Tony Lindgren, Rajendra Nayak, Santosh Shilimkar

"DebBarma, Tarun Kanti" <tarun.kanti@ti.com> writes:

> On Mon, Apr 23, 2012 at 11:18 PM, Kevin Hilman <khilman@ti.com> wrote:
>> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>>
>>> 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.
>>
>> What about the OMAP2/3 clkdev tables?  Can't those be removed as well?
> No, they are being used. In fact I removed them in the beginning only
> to discover they are needed.

Maybe PATCH 0/x could summarize why they're still needed for OMAP2/3.

>>
>> Comment applies to PATCH 4/4 also.
> You mean removing iclk from clkdev table? That is already done in this patch!!

I meant why can't OMAP2/3 data be removed in PATCH 4/4 also, which only
touches OMAP4.

Kevin
--
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] 34+ messages in thread

* [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage
@ 2012-04-24  0:34         ` Kevin Hilman
  0 siblings, 0 replies; 34+ messages in thread
From: Kevin Hilman @ 2012-04-24  0:34 UTC (permalink / raw)
  To: linux-arm-kernel

"DebBarma, Tarun Kanti" <tarun.kanti@ti.com> writes:

> On Mon, Apr 23, 2012 at 11:18 PM, Kevin Hilman <khilman@ti.com> wrote:
>> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>>
>>> 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.
>>
>> What about the OMAP2/3 clkdev tables? ?Can't those be removed as well?
> No, they are being used. In fact I removed them in the beginning only
> to discover they are needed.

Maybe PATCH 0/x could summarize why they're still needed for OMAP2/3.

>>
>> Comment applies to PATCH 4/4 also.
> You mean removing iclk from clkdev table? That is already done in this patch!!

I meant why can't OMAP2/3 data be removed in PATCH 4/4 also, which only
touches OMAP4.

Kevin

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-04-20 12:39 ` Tarun Kanti DebBarma
@ 2012-06-14 10:54   ` DebBarma, Tarun Kanti
  -1 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-06-14 10:54 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, Tarun Kanti DebBarma, Cousson, Benoit,
	Paul Walmsley, Tony Lindgren, Kevin Hilman, Rajendra Nayak,
	Santosh Shilimkar

On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
<tarun.kanti@ti.com> 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.
> Corrected the timer fck name mis-match between clock44xx_data.c and
> omap_hwmod_44xx_data.c.
> Added omap_hwmod_get_main_clk() API. There is no more need to construct
> clock names using sprintf() to be used in clk_get() during initialization.
>
> 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:
> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
> Could not test on OMAP2420 due to unavailability of board.
>
> v2:
> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
> - Add omap_hwmod_get_main_clk() API
> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>
> Cc: Cousson, Benoit <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
> Tarun Kanti DebBarma (4):
>  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
>  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
>  ARM: OMAP2+: dmtimer: cleanup iclk usage
>  ARM: OMAP2+: dmtimer: cleanup fclk usage
[ping]
Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?
--
Tarun
>
>  arch/arm/mach-omap2/clock44xx_data.c         |   33 ++++++-----------
>  arch/arm/mach-omap2/omap_hwmod.c             |   15 ++++++++
>  arch/arm/mach-omap2/timer.c                  |   10 +-----
>  arch/arm/plat-omap/dmtimer.c                 |   51 ++++++++------------------
>  arch/arm/plat-omap/include/plat/dmtimer.h    |    2 +-
>  arch/arm/plat-omap/include/plat/omap_hwmod.h |    2 +
>  6 files changed, 46 insertions(+), 67 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] 34+ messages in thread

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-06-14 10:54   ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-06-14 10:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
<tarun.kanti@ti.com> 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.
> Corrected the timer fck name mis-match between clock44xx_data.c and
> omap_hwmod_44xx_data.c.
> Added omap_hwmod_get_main_clk() API. There is no more need to construct
> clock names using sprintf() to be used in clk_get() during initialization.
>
> 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:
> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
> Could not test on OMAP2420 due to unavailability of board.
>
> v2:
> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
> - Add omap_hwmod_get_main_clk() API
> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>
> Cc: Cousson, Benoit <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
> Tarun Kanti DebBarma (4):
> ?ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
> ?ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
> ?ARM: OMAP2+: dmtimer: cleanup iclk usage
> ?ARM: OMAP2+: dmtimer: cleanup fclk usage
[ping]
Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?
--
Tarun
>
> ?arch/arm/mach-omap2/clock44xx_data.c ? ? ? ? | ? 33 ++++++-----------
> ?arch/arm/mach-omap2/omap_hwmod.c ? ? ? ? ? ? | ? 15 ++++++++
> ?arch/arm/mach-omap2/timer.c ? ? ? ? ? ? ? ? ?| ? 10 +-----
> ?arch/arm/plat-omap/dmtimer.c ? ? ? ? ? ? ? ? | ? 51 ++++++++------------------
> ?arch/arm/plat-omap/include/plat/dmtimer.h ? ?| ? ?2 +-
> ?arch/arm/plat-omap/include/plat/omap_hwmod.h | ? ?2 +
> ?6 files changed, 46 insertions(+), 67 deletions(-)
>

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-06-14 10:54   ` DebBarma, Tarun Kanti
@ 2012-06-14 10:58     ` Shilimkar, Santosh
  -1 siblings, 0 replies; 34+ messages in thread
From: Shilimkar, Santosh @ 2012-06-14 10:58 UTC (permalink / raw)
  To: Tony
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Paul Walmsley,
	Kevin Hilman, Rajendra Nayak, DebBarma, Tarun Kanti

Tony,

On Thu, Jun 14, 2012 at 4:24 PM, DebBarma, Tarun Kanti
<tarun.kanti@ti.com> wrote:
> On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
> <tarun.kanti@ti.com> 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.
>> Corrected the timer fck name mis-match between clock44xx_data.c and
>> omap_hwmod_44xx_data.c.
>> Added omap_hwmod_get_main_clk() API. There is no more need to construct
>> clock names using sprintf() to be used in clk_get() during initialization.
>>
>> 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:
>> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
>> Could not test on OMAP2420 due to unavailability of board.
>>
>> v2:
>> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
>> - Add omap_hwmod_get_main_clk() API
>> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>>
>> Cc: Cousson, Benoit <b-cousson@ti.com>
>> Cc: Paul Walmsley <paul@pwsan.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Rajendra Nayak <rnayak@ti.com>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>
>> Tarun Kanti DebBarma (4):
>>  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
>>  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
>>  ARM: OMAP2+: dmtimer: cleanup iclk usage
>>  ARM: OMAP2+: dmtimer: cleanup fclk usage
> [ping]
> Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
> has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
> tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?

Just to let you know that this cleanup is essential for Benoit's OMAP4
hwmod cleanup
and OMAP5 minimal support series.

Regards
santosh
--
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] 34+ messages in thread

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-06-14 10:58     ` Shilimkar, Santosh
  0 siblings, 0 replies; 34+ messages in thread
From: Shilimkar, Santosh @ 2012-06-14 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

Tony,

On Thu, Jun 14, 2012 at 4:24 PM, DebBarma, Tarun Kanti
<tarun.kanti@ti.com> wrote:
> On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
> <tarun.kanti@ti.com> 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.
>> Corrected the timer fck name mis-match between clock44xx_data.c and
>> omap_hwmod_44xx_data.c.
>> Added omap_hwmod_get_main_clk() API. There is no more need to construct
>> clock names using sprintf() to be used in clk_get() during initialization.
>>
>> 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:
>> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
>> Could not test on OMAP2420 due to unavailability of board.
>>
>> v2:
>> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
>> - Add omap_hwmod_get_main_clk() API
>> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>>
>> Cc: Cousson, Benoit <b-cousson@ti.com>
>> Cc: Paul Walmsley <paul@pwsan.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Rajendra Nayak <rnayak@ti.com>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>
>> Tarun Kanti DebBarma (4):
>> ?ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
>> ?ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
>> ?ARM: OMAP2+: dmtimer: cleanup iclk usage
>> ?ARM: OMAP2+: dmtimer: cleanup fclk usage
> [ping]
> Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
> has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
> tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?

Just to let you know that this cleanup is essential for Benoit's OMAP4
hwmod cleanup
and OMAP5 minimal support series.

Regards
santosh

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

* Re: [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  2012-04-20 12:39   ` Tarun Kanti DebBarma
@ 2012-06-18 16:23     ` Paul Walmsley
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Walmsley @ 2012-06-18 16:23 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Tony Lindgren,
	Kevin Hilman, Rajendra Nayak, Santosh Shilimkar

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

Hi,

On Fri, 20 Apr 2012, Tarun Kanti DebBarma wrote:

> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().
> 
> Cc: Cousson, Benoit <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>

Thanks, queued for 3.6 with Benoît's ack.


- Paul

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

* [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
@ 2012-06-18 16:23     ` Paul Walmsley
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Walmsley @ 2012-06-18 16:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, 20 Apr 2012, Tarun Kanti DebBarma wrote:

> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().
> 
> Cc: Cousson, Benoit <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> 
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>

Thanks, queued for 3.6 with Beno?t's ack.


- Paul

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

* Re: [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  2012-04-20 12:39   ` Tarun Kanti DebBarma
@ 2012-07-04 15:39     ` Paul Walmsley
  -1 siblings, 0 replies; 34+ messages in thread
From: Paul Walmsley @ 2012-07-04 15:39 UTC (permalink / raw)
  To: Tarun Kanti DebBarma
  Cc: linux-omap, linux-arm-kernel, Cousson, Benoit, Tony Lindgren,
	Kevin Hilman, Rajendra Nayak, Santosh Shilimkar

On Fri, 20 Apr 2012, Tarun Kanti DebBarma wrote:

> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().

Thanks, queued.

- Paul

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

* [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
@ 2012-07-04 15:39     ` Paul Walmsley
  0 siblings, 0 replies; 34+ messages in thread
From: Paul Walmsley @ 2012-07-04 15:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 20 Apr 2012, Tarun Kanti DebBarma wrote:

> Add an API to get main clock name associated with a given @oh.
> This will avoid the need to construct fclk names during early
> initialization in order to get fclk handle using clk_get().

Thanks, queued.

- Paul

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-06-14 10:58     ` Shilimkar, Santosh
@ 2012-07-05  4:02       ` DebBarma, Tarun Kanti
  -1 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-07-05  4:02 UTC (permalink / raw)
  To: Tony
  Cc: Shilimkar, Santosh, linux-omap, linux-arm-kernel, Cousson,
	Benoit, Paul Walmsley, Kevin Hilman, Rajendra Nayak

Hi Tony,

On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> Tony,
>
> On Thu, Jun 14, 2012 at 4:24 PM, DebBarma, Tarun Kanti
> <tarun.kanti@ti.com> wrote:
>> On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
>> <tarun.kanti@ti.com> 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.
>>> Corrected the timer fck name mis-match between clock44xx_data.c and
>>> omap_hwmod_44xx_data.c.
>>> Added omap_hwmod_get_main_clk() API. There is no more need to construct
>>> clock names using sprintf() to be used in clk_get() during initialization.
>>>
>>> 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:
>>> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
>>> Could not test on OMAP2420 due to unavailability of board.
>>>
>>> v2:
>>> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
>>> - Add omap_hwmod_get_main_clk() API
>>> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>>>
>>> Cc: Cousson, Benoit <b-cousson@ti.com>
>>> Cc: Paul Walmsley <paul@pwsan.com>
>>> Cc: Tony Lindgren <tony@atomide.com>
>>> Cc: Kevin Hilman <khilman@ti.com>
>>> Cc: Rajendra Nayak <rnayak@ti.com>
>>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>
>>> Tarun Kanti DebBarma (4):
>>>  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
>>>  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
>>>  ARM: OMAP2+: dmtimer: cleanup iclk usage
>>>  ARM: OMAP2+: dmtimer: cleanup fclk usage
>> [ping]
>> Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
>> has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
>> tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?
>
> Just to let you know that this cleanup is essential for Benoit's OMAP4
> hwmod cleanup
> and OMAP5 minimal support series.
This is a gentle reminder in case you have missed somehow!!
Let me know if anything else needs to be done.
Thanks.
--
Tarun

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

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-07-05  4:02       ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-07-05  4:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> Tony,
>
> On Thu, Jun 14, 2012 at 4:24 PM, DebBarma, Tarun Kanti
> <tarun.kanti@ti.com> wrote:
>> On Fri, Apr 20, 2012 at 6:09 PM, Tarun Kanti DebBarma
>> <tarun.kanti@ti.com> 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.
>>> Corrected the timer fck name mis-match between clock44xx_data.c and
>>> omap_hwmod_44xx_data.c.
>>> Added omap_hwmod_get_main_clk() API. There is no more need to construct
>>> clock names using sprintf() to be used in clk_get() during initialization.
>>>
>>> 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:
>>> OMAP5, OMAP4430SDP, OMAP3430SDP, OMAP2430SDP.
>>> Could not test on OMAP2420 due to unavailability of board.
>>>
>>> v2:
>>> - Use devm_request_and_ioremap() instead of request_mem_region() and ioremap()
>>> - Add omap_hwmod_get_main_clk() API
>>> - Reverted changes of clock names from OMAP2 and OMAP3 platforms
>>>
>>> Cc: Cousson, Benoit <b-cousson@ti.com>
>>> Cc: Paul Walmsley <paul@pwsan.com>
>>> Cc: Tony Lindgren <tony@atomide.com>
>>> Cc: Kevin Hilman <khilman@ti.com>
>>> Cc: Rajendra Nayak <rnayak@ti.com>
>>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>
>>> Tarun Kanti DebBarma (4):
>>>  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
>>>  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
>>>  ARM: OMAP2+: dmtimer: cleanup iclk usage
>>>  ARM: OMAP2+: dmtimer: cleanup fclk usage
>> [ping]
>> Only one of the patches in the series (ARM: OMAP2+: dmtimer: cleanup iclk usage)
>> has been taken. I just applied the remaining patches on top of Linux 3.5-rc2 and
>> tested on OMAP3 and OMAP4. Can the remaining patches be taken as well?
>
> Just to let you know that this cleanup is essential for Benoit's OMAP4
> hwmod cleanup
> and OMAP5 minimal support series.
This is a gentle reminder in case you have missed somehow!!
Let me know if anything else needs to be done.
Thanks.
--
Tarun

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-07-05  4:02       ` DebBarma, Tarun Kanti
@ 2012-07-05  9:28         ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2012-07-05  9:28 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: Shilimkar, Santosh, linux-omap, linux-arm-kernel, Cousson,
	Benoit, Paul Walmsley, Kevin Hilman, Rajendra Nayak

* DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120704 21:07]:
> On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote:
> >
> > Just to let you know that this cleanup is essential for Benoit's OMAP4
> > hwmod cleanup
> > and OMAP5 minimal support series.
>
> This is a gentle reminder in case you have missed somehow!!
> Let me know if anything else needs to be done.

Now with the hwmod patch 2/4 pulled into cleanup-part2 from Paul,
I've also applied patch 1/4 there. Patches 3 and 4 have still some pending
comments from Kevin it seems?

Also at least patch 3 won't apply, so please check Kevin's comments
and repost patches 3 and 4 on top of cleanup-part2 at commit 74dd9ec62.

Regards,

Tony

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

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-07-05  9:28         ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2012-07-05  9:28 UTC (permalink / raw)
  To: linux-arm-kernel

* DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120704 21:07]:
> On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote:
> >
> > Just to let you know that this cleanup is essential for Benoit's OMAP4
> > hwmod cleanup
> > and OMAP5 minimal support series.
>
> This is a gentle reminder in case you have missed somehow!!
> Let me know if anything else needs to be done.

Now with the hwmod patch 2/4 pulled into cleanup-part2 from Paul,
I've also applied patch 1/4 there. Patches 3 and 4 have still some pending
comments from Kevin it seems?

Also at least patch 3 won't apply, so please check Kevin's comments
and repost patches 3 and 4 on top of cleanup-part2 at commit 74dd9ec62.

Regards,

Tony

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-07-05  9:28         ` Tony Lindgren
@ 2012-07-05 11:41           ` DebBarma, Tarun Kanti
  -1 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-07-05 11:41 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Shilimkar, Santosh, linux-omap, linux-arm-kernel, Cousson,
	Benoit, Paul Walmsley, Kevin Hilman, Rajendra Nayak

Hi Tony,

On Thu, Jul 5, 2012 at 2:58 PM, Tony Lindgren <tony@atomide.com> wrote:
> * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120704 21:07]:
>> On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote:
>> >
>> > Just to let you know that this cleanup is essential for Benoit's OMAP4
>> > hwmod cleanup
>> > and OMAP5 minimal support series.
>>
>> This is a gentle reminder in case you have missed somehow!!
>> Let me know if anything else needs to be done.
>
> Now with the hwmod patch 2/4 pulled into cleanup-part2 from Paul,
> I've also applied patch 1/4 there. Patches 3 and 4 have still some pending
> comments from Kevin it seems?
Yes....

>
> Also at least patch 3 won't apply, so please check Kevin's comments
> and repost patches 3 and 4 on top of cleanup-part2 at commit 74dd9ec62.
Patch 3: Comment was about adding summary in patch 0/x why we have
not removed iclk in OMAP2/3 platform. In other words there was no
specific changes needed on patch 3 as such. BTW, patch 3 is already merged.

Patch 4:
--- [Kevin's comment] ---
>>
>> Comment applies to PATCH 4/4 also.
> You mean removing iclk from clkdev table? That is already done in this patch!!
I meant why can't OMAP2/3 data be removed in PATCH 4/4 also, which only
touches OMAP4.
--- [end] -----------------------
In patch 4 the only change done in the clock table was to correct the
name mis-match
of functional clock names for OMAP4 between clock data and hwmod data.
For OMAP2/3 the names are already matching. As the comment was given in patch 3
where iclk entries got removed for OMAP4, he must have expected similar cleanup
is done for fclk in patch 4. But as I said, only the name mis-match is
corrected.
In summary, there is no specific changes needed in the patch.

I will rebase on top of cleanup-part2 are repost patch 4.
--
Tarun
>
> Regards,
>
> Tony

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

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-07-05 11:41           ` DebBarma, Tarun Kanti
  0 siblings, 0 replies; 34+ messages in thread
From: DebBarma, Tarun Kanti @ 2012-07-05 11:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

On Thu, Jul 5, 2012 at 2:58 PM, Tony Lindgren <tony@atomide.com> wrote:
> * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120704 21:07]:
>> On Thu, Jun 14, 2012 at 4:28 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote:
>> >
>> > Just to let you know that this cleanup is essential for Benoit's OMAP4
>> > hwmod cleanup
>> > and OMAP5 minimal support series.
>>
>> This is a gentle reminder in case you have missed somehow!!
>> Let me know if anything else needs to be done.
>
> Now with the hwmod patch 2/4 pulled into cleanup-part2 from Paul,
> I've also applied patch 1/4 there. Patches 3 and 4 have still some pending
> comments from Kevin it seems?
Yes....

>
> Also at least patch 3 won't apply, so please check Kevin's comments
> and repost patches 3 and 4 on top of cleanup-part2 at commit 74dd9ec62.
Patch 3: Comment was about adding summary in patch 0/x why we have
not removed iclk in OMAP2/3 platform. In other words there was no
specific changes needed on patch 3 as such. BTW, patch 3 is already merged.

Patch 4:
--- [Kevin's comment] ---
>>
>> Comment applies to PATCH 4/4 also.
> You mean removing iclk from clkdev table? That is already done in this patch!!
I meant why can't OMAP2/3 data be removed in PATCH 4/4 also, which only
touches OMAP4.
--- [end] -----------------------
In patch 4 the only change done in the clock table was to correct the
name mis-match
of functional clock names for OMAP4 between clock data and hwmod data.
For OMAP2/3 the names are already matching. As the comment was given in patch 3
where iclk entries got removed for OMAP4, he must have expected similar cleanup
is done for fclk in patch 4. But as I said, only the name mis-match is
corrected.
In summary, there is no specific changes needed in the patch.

I will rebase on top of cleanup-part2 are repost patch 4.
--
Tarun
>
> Regards,
>
> Tony

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

* Re: [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
  2012-07-05 11:41           ` DebBarma, Tarun Kanti
@ 2012-07-06  7:09             ` Tony Lindgren
  -1 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2012-07-06  7:09 UTC (permalink / raw)
  To: DebBarma, Tarun Kanti
  Cc: Shilimkar, Santosh, linux-omap, linux-arm-kernel, Cousson,
	Benoit, Paul Walmsley, Kevin Hilman, Rajendra Nayak

* DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120705 04:46]:
>
> Patch 3: Comment was about adding summary in patch 0/x why we have
> not removed iclk in OMAP2/3 platform. In other words there was no
> specific changes needed on patch 3 as such. BTW, patch 3 is already merged.
...

> I will rebase on top of cleanup-part2 are repost patch 4.

OK thanks!

Tony

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

* [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage
@ 2012-07-06  7:09             ` Tony Lindgren
  0 siblings, 0 replies; 34+ messages in thread
From: Tony Lindgren @ 2012-07-06  7:09 UTC (permalink / raw)
  To: linux-arm-kernel

* DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120705 04:46]:
>
> Patch 3: Comment was about adding summary in patch 0/x why we have
> not removed iclk in OMAP2/3 platform. In other words there was no
> specific changes needed on patch 3 as such. BTW, patch 3 is already merged.
...

> I will rebase on top of cleanup-part2 are repost patch 4.

OK thanks!

Tony

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

end of thread, other threads:[~2012-07-06  7:09 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20 12:39 [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage Tarun Kanti DebBarma
2012-04-20 12:39 ` Tarun Kanti DebBarma
2012-04-20 12:39 ` [PATCH v2 1/4] ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe() Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-04-20 12:39 ` [PATCH v2 2/4] ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-04-20 15:10   ` Cousson, Benoit
2012-04-20 15:10     ` Cousson, Benoit
2012-06-18 16:23   ` Paul Walmsley
2012-06-18 16:23     ` Paul Walmsley
2012-07-04 15:39   ` Paul Walmsley
2012-07-04 15:39     ` Paul Walmsley
2012-04-20 12:39 ` [PATCH v2 3/4] ARM: OMAP2+: dmtimer: cleanup iclk usage Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-04-23 17:48   ` Kevin Hilman
2012-04-23 17:48     ` Kevin Hilman
2012-04-23 19:36     ` DebBarma, Tarun Kanti
2012-04-23 19:36       ` DebBarma, Tarun Kanti
2012-04-24  0:34       ` Kevin Hilman
2012-04-24  0:34         ` Kevin Hilman
2012-04-20 12:39 ` [PATCH v2 4/4] ARM: OMAP2+: dmtimer: cleanup fclk usage Tarun Kanti DebBarma
2012-04-20 12:39   ` Tarun Kanti DebBarma
2012-06-14 10:54 ` [PATCH v2 0/4] ARM: OMAP2+: dmtimer: cleanup related to devm API and clk usage DebBarma, Tarun Kanti
2012-06-14 10:54   ` DebBarma, Tarun Kanti
2012-06-14 10:58   ` Shilimkar, Santosh
2012-06-14 10:58     ` Shilimkar, Santosh
2012-07-05  4:02     ` DebBarma, Tarun Kanti
2012-07-05  4:02       ` DebBarma, Tarun Kanti
2012-07-05  9:28       ` Tony Lindgren
2012-07-05  9:28         ` Tony Lindgren
2012-07-05 11:41         ` DebBarma, Tarun Kanti
2012-07-05 11:41           ` DebBarma, Tarun Kanti
2012-07-06  7:09           ` Tony Lindgren
2012-07-06  7:09             ` Tony Lindgren

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.