All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-08 12:28 ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

The series moves dmtimer out of plat-omap to drivers/clocksource.
The series also does a bunch of changes to pwm-omap-dmtimer code
to adapt to the driver migration and clean up plat specific
pdata-quirks and use the dmtimer platform data.

Boot tested on DRA7-EVM and AM437X-GP-EVM.

More testing would be of great help. 

No code changes in this v2 version. Only enhanced patch
statistics for renames.
 
Keerthy (7):
  clocksource: dmtimer: Remove all the exports
  arm: omap: Move dmtimer.h out of plat-omap
  arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
    clocksource
  dmtimer: Add timer ops to the platform data structure
  clocksource: dmtimer: Populate the timer ops to the pdata
  pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  arm: omap: pdata-quirks: Remove unused timer pdata

 arch/arm/mach-omap1/pm.c                           |  2 +-
 arch/arm/mach-omap1/timer.c                        |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
 arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
 arch/arm/mach-omap2/timer.c                        |  2 +-
 arch/arm/plat-omap/Kconfig                         |  6 ---
 arch/arm/plat-omap/Makefile                        |  1 -
 drivers/clocksource/Kconfig                        |  6 +++
 drivers/clocksource/Makefile                       |  1 +
 .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
 drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
 .../include/plat => include/clocksource}/dmtimer.h |  0
 include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
 20 files changed, 104 insertions(+), 95 deletions(-)
 rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
 rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)

-- 
1.9.1

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

* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-08 12:28 ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

The series moves dmtimer out of plat-omap to drivers/clocksource.
The series also does a bunch of changes to pwm-omap-dmtimer code
to adapt to the driver migration and clean up plat specific
pdata-quirks and use the dmtimer platform data.

Boot tested on DRA7-EVM and AM437X-GP-EVM.

More testing would be of great help. 

No code changes in this v2 version. Only enhanced patch
statistics for renames.
 
Keerthy (7):
  clocksource: dmtimer: Remove all the exports
  arm: omap: Move dmtimer.h out of plat-omap
  arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
    clocksource
  dmtimer: Add timer ops to the platform data structure
  clocksource: dmtimer: Populate the timer ops to the pdata
  pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  arm: omap: pdata-quirks: Remove unused timer pdata

 arch/arm/mach-omap1/pm.c                           |  2 +-
 arch/arm/mach-omap1/timer.c                        |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
 arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
 arch/arm/mach-omap2/timer.c                        |  2 +-
 arch/arm/plat-omap/Kconfig                         |  6 ---
 arch/arm/plat-omap/Makefile                        |  1 -
 drivers/clocksource/Kconfig                        |  6 +++
 drivers/clocksource/Makefile                       |  1 +
 .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
 drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
 .../include/plat => include/clocksource}/dmtimer.h |  0
 include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
 20 files changed, 104 insertions(+), 95 deletions(-)
 rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
 rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)

-- 
1.9.1

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

* [PATCH v2 1/7] clocksource: dmtimer: Remove all the exports
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Remove all the unwanted exports from the driver

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/plat-omap/dmtimer.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index d443e48..72565fc 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -302,7 +302,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
 {
 	return _omap_dm_timer_request(REQUEST_ANY, NULL);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request);
 
 struct omap_dm_timer *omap_dm_timer_request_specific(int id)
 {
@@ -315,7 +314,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
 
 	return _omap_dm_timer_request(REQUEST_BY_ID, &id);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific);
 
 /**
  * omap_dm_timer_request_by_cap - Request a timer by capability
@@ -330,7 +328,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap)
 {
 	return _omap_dm_timer_request(REQUEST_BY_CAP, &cap);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_cap);
 
 /**
  * omap_dm_timer_request_by_node - Request a timer by device-tree node
@@ -346,7 +343,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
 
 	return _omap_dm_timer_request(REQUEST_BY_NODE, np);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_node);
 
 int omap_dm_timer_free(struct omap_dm_timer *timer)
 {
@@ -359,7 +355,6 @@ int omap_dm_timer_free(struct omap_dm_timer *timer)
 	timer->reserved = 0;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_free);
 
 void omap_dm_timer_enable(struct omap_dm_timer *timer)
 {
@@ -379,13 +374,11 @@ void omap_dm_timer_enable(struct omap_dm_timer *timer)
 		}
 	}
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_enable);
 
 void omap_dm_timer_disable(struct omap_dm_timer *timer)
 {
 	pm_runtime_put_sync(&timer->pdev->dev);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_disable);
 
 int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
 {
@@ -393,7 +386,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
 		return timer->irq;
 	return -EINVAL;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq);
 
 #if defined(CONFIG_ARCH_OMAP1)
 #include <mach/hardware.h>
@@ -429,7 +421,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 
 	return inputmask;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
 
 #else
 
@@ -439,7 +430,6 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
 		return timer->fclk;
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_get_fclk);
 
 __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 {
@@ -447,7 +437,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
 
 #endif
 
@@ -461,7 +450,6 @@ int omap_dm_timer_trigger(struct omap_dm_timer *timer)
 	omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_trigger);
 
 int omap_dm_timer_start(struct omap_dm_timer *timer)
 {
@@ -482,7 +470,6 @@ int omap_dm_timer_start(struct omap_dm_timer *timer)
 	timer->context.tclr = l;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_start);
 
 int omap_dm_timer_stop(struct omap_dm_timer *timer)
 {
@@ -506,7 +493,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
 
 int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 {
@@ -569,7 +555,6 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
 
 int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
 			    unsigned int load)
@@ -595,7 +580,6 @@ int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_load);
 
 /* Optimized set_load which removes costly spin wait in timer_start */
 int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
@@ -625,7 +609,6 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
 	timer->context.tcrr = load;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
 
 int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
 			     unsigned int match)
@@ -650,7 +633,6 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_match);
 
 int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
 			   int toggle, int trigger)
@@ -676,7 +658,6 @@ int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_pwm);
 
 int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
 {
@@ -699,7 +680,6 @@ int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
 
 int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
 				  unsigned int value)
@@ -716,7 +696,6 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
 
 /**
  * omap_dm_timer_set_int_disable - disable timer interrupts
@@ -747,7 +726,6 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable);
 
 unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
 {
@@ -762,7 +740,6 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
 
 	return l;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
 
 int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
 {
@@ -773,7 +750,6 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
 
 unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
 {
@@ -784,7 +760,6 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
 
 	return __omap_dm_timer_read_counter(timer, timer->posted);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
 
 int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
 {
@@ -799,7 +774,6 @@ int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
 	timer->context.tcrr = value;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_write_counter);
 
 int omap_dm_timers_active(void)
 {
@@ -816,7 +790,6 @@ int omap_dm_timers_active(void)
 	}
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timers_active);
 
 static const struct of_device_id omap_timer_match[];
 
-- 
1.9.1

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

* [PATCH v2 1/7] clocksource: dmtimer: Remove all the exports
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Remove all the unwanted exports from the driver

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/plat-omap/dmtimer.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index d443e48..72565fc 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -302,7 +302,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
 {
 	return _omap_dm_timer_request(REQUEST_ANY, NULL);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request);
 
 struct omap_dm_timer *omap_dm_timer_request_specific(int id)
 {
@@ -315,7 +314,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
 
 	return _omap_dm_timer_request(REQUEST_BY_ID, &id);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific);
 
 /**
  * omap_dm_timer_request_by_cap - Request a timer by capability
@@ -330,7 +328,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap)
 {
 	return _omap_dm_timer_request(REQUEST_BY_CAP, &cap);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_cap);
 
 /**
  * omap_dm_timer_request_by_node - Request a timer by device-tree node
@@ -346,7 +343,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
 
 	return _omap_dm_timer_request(REQUEST_BY_NODE, np);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_node);
 
 int omap_dm_timer_free(struct omap_dm_timer *timer)
 {
@@ -359,7 +355,6 @@ int omap_dm_timer_free(struct omap_dm_timer *timer)
 	timer->reserved = 0;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_free);
 
 void omap_dm_timer_enable(struct omap_dm_timer *timer)
 {
@@ -379,13 +374,11 @@ void omap_dm_timer_enable(struct omap_dm_timer *timer)
 		}
 	}
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_enable);
 
 void omap_dm_timer_disable(struct omap_dm_timer *timer)
 {
 	pm_runtime_put_sync(&timer->pdev->dev);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_disable);
 
 int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
 {
@@ -393,7 +386,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
 		return timer->irq;
 	return -EINVAL;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq);
 
 #if defined(CONFIG_ARCH_OMAP1)
 #include <mach/hardware.h>
@@ -429,7 +421,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 
 	return inputmask;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
 
 #else
 
@@ -439,7 +430,6 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
 		return timer->fclk;
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_get_fclk);
 
 __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 {
@@ -447,7 +437,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
 
 #endif
 
@@ -461,7 +450,6 @@ int omap_dm_timer_trigger(struct omap_dm_timer *timer)
 	omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_trigger);
 
 int omap_dm_timer_start(struct omap_dm_timer *timer)
 {
@@ -482,7 +470,6 @@ int omap_dm_timer_start(struct omap_dm_timer *timer)
 	timer->context.tclr = l;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_start);
 
 int omap_dm_timer_stop(struct omap_dm_timer *timer)
 {
@@ -506,7 +493,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
 
 int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 {
@@ -569,7 +555,6 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
 
 int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
 			    unsigned int load)
@@ -595,7 +580,6 @@ int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_load);
 
 /* Optimized set_load which removes costly spin wait in timer_start */
 int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
@@ -625,7 +609,6 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
 	timer->context.tcrr = load;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
 
 int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
 			     unsigned int match)
@@ -650,7 +633,6 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_match);
 
 int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
 			   int toggle, int trigger)
@@ -676,7 +658,6 @@ int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_pwm);
 
 int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
 {
@@ -699,7 +680,6 @@ int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
 
 int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
 				  unsigned int value)
@@ -716,7 +696,6 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
 
 /**
  * omap_dm_timer_set_int_disable - disable timer interrupts
@@ -747,7 +726,6 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
 	omap_dm_timer_disable(timer);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable);
 
 unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
 {
@@ -762,7 +740,6 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
 
 	return l;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
 
 int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
 {
@@ -773,7 +750,6 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
 
 unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
 {
@@ -784,7 +760,6 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
 
 	return __omap_dm_timer_read_counter(timer, timer->posted);
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
 
 int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
 {
@@ -799,7 +774,6 @@ int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
 	timer->context.tcrr = value;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timer_write_counter);
 
 int omap_dm_timers_active(void)
 {
@@ -816,7 +790,6 @@ int omap_dm_timers_active(void)
 	}
 	return 0;
 }
-EXPORT_SYMBOL_GPL(omap_dm_timers_active);
 
 static const struct of_device_id omap_timer_match[];
 
-- 
1.9.1

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

The header file is currently under plat-omap directory
under arch/omap. Move this out to an accessible place.

No Code changes done to the header file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/mach-omap1/pm.c                                           | 2 +-
 arch/arm/mach-omap1/timer.c                                        | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2420_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c                 | 2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c                          | 2 +-
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c                         | 2 +-
 arch/arm/mach-omap2/pdata-quirks.c                                 | 2 +-
 arch/arm/mach-omap2/timer.c                                        | 2 +-
 arch/arm/plat-omap/dmtimer.c                                       | 2 +-
 {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h | 0
 14 files changed, 13 insertions(+), 13 deletions(-)
 rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)

diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index f1135bf..a07d47cf 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -55,7 +55,7 @@
 #include <mach/tc.h>
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index 8fb1ec6..7c057ab 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -27,7 +27,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_data/dmtimer-omap.h>
 
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "soc.h"
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 1a15a34..45c1043 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -16,7 +16,7 @@
 #include <linux/i2c-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 3801850..892ca58 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -18,7 +18,7 @@
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index beec4cd..82b51c0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -11,7 +11,7 @@
 
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include "omap_hwmod.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 9cfba41..2423c51 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -25,7 +25,7 @@
 #include "l4_3xxx.h"
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "soc.h"
 #include "omap_hwmod.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index c477096..22e0e38 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -30,7 +30,7 @@
 
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index 988e7ea..530334e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -26,7 +26,7 @@
 #include <linux/omap-dma.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index d05e553d..adabdef 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -26,7 +26,7 @@
 #include <linux/omap-dma.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 77a515b..d05dd2d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -18,7 +18,7 @@
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod_common_data.h"
 #include "cm81xx.h"
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 6b433fc..ad9df86 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -27,7 +27,7 @@
 #include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_data/media/ir-rx51.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "common.h"
 #include "common-board-devices.h"
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ece09c9..31c1b01 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -26,6 +26,7 @@
  * License. See the file "COPYING" in the main directory of this archive
  * for more details.
  */
+#include <clocksource/dmtimer.h>
 #include <linux/init.h>
 #include <linux/time.h>
 #include <linux/interrupt.h>
@@ -49,7 +50,6 @@
 #include "omap_hwmod.h"
 #include "omap_device.h"
 #include <plat/counter-32k.h>
-#include <plat/dmtimer.h>
 #include "omap-pm.h"
 
 #include "soc.h"
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 72565fc..afe1dc9 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -47,7 +47,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_data/dmtimer-omap.h>
 
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 static u32 omap_reserved_systimers;
 static LIST_HEAD(omap_timer_list);
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/include/clocksource/dmtimer.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/dmtimer.h
rename to include/clocksource/dmtimer.h
-- 
1.9.1

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

The header file is currently under plat-omap directory
under arch/omap. Move this out to an accessible place.

No Code changes done to the header file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/mach-omap1/pm.c                                           | 2 +-
 arch/arm/mach-omap1/timer.c                                        | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2420_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c                 | 2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c                         | 2 +-
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c                          | 2 +-
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c                         | 2 +-
 arch/arm/mach-omap2/pdata-quirks.c                                 | 2 +-
 arch/arm/mach-omap2/timer.c                                        | 2 +-
 arch/arm/plat-omap/dmtimer.c                                       | 2 +-
 {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h | 0
 14 files changed, 13 insertions(+), 13 deletions(-)
 rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)

diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index f1135bf..a07d47cf 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -55,7 +55,7 @@
 #include <mach/tc.h>
 #include <mach/mux.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index 8fb1ec6..7c057ab 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -27,7 +27,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_data/dmtimer-omap.h>
 
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "soc.h"
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 1a15a34..45c1043 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -16,7 +16,7 @@
 #include <linux/i2c-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 3801850..892ca58 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -18,7 +18,7 @@
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index beec4cd..82b51c0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -11,7 +11,7 @@
 
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/omap-dma.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include "omap_hwmod.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 9cfba41..2423c51 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -25,7 +25,7 @@
 #include "l4_3xxx.h"
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "soc.h"
 #include "omap_hwmod.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index c477096..22e0e38 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -30,7 +30,7 @@
 
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index 988e7ea..530334e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -26,7 +26,7 @@
 #include <linux/omap-dma.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index d05e553d..adabdef 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -26,7 +26,7 @@
 #include <linux/omap-dma.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 77a515b..d05dd2d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -18,7 +18,7 @@
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "omap_hwmod_common_data.h"
 #include "cm81xx.h"
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 6b433fc..ad9df86 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -27,7 +27,7 @@
 #include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_data/media/ir-rx51.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 #include "common.h"
 #include "common-board-devices.h"
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ece09c9..31c1b01 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -26,6 +26,7 @@
  * License. See the file "COPYING" in the main directory of this archive
  * for more details.
  */
+#include <clocksource/dmtimer.h>
 #include <linux/init.h>
 #include <linux/time.h>
 #include <linux/interrupt.h>
@@ -49,7 +50,6 @@
 #include "omap_hwmod.h"
 #include "omap_device.h"
 #include <plat/counter-32k.h>
-#include <plat/dmtimer.h>
 #include "omap-pm.h"
 
 #include "soc.h"
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 72565fc..afe1dc9 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -47,7 +47,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_data/dmtimer-omap.h>
 
-#include <plat/dmtimer.h>
+#include <clocksource/dmtimer.h>
 
 static u32 omap_reserved_systimers;
 static LIST_HEAD(omap_timer_list);
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/include/clocksource/dmtimer.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/dmtimer.h
rename to include/clocksource/dmtimer.h
-- 
1.9.1

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

* [PATCH v2 3/7] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Move the dmtimer driver out of plat-omap to clocksource.
So that non-omap devices also could use this.

No Code changes done to the driver file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/plat-omap/Kconfig                            | 6 ------
 arch/arm/plat-omap/Makefile                           | 1 -
 drivers/clocksource/Kconfig                           | 6 ++++++
 drivers/clocksource/Makefile                          | 1 +
 {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
 5 files changed, 7 insertions(+), 7 deletions(-)
 rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 3e27bff..4b92ac5 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -105,12 +105,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
 	help
 	  PPA routine service ID for setting L2 auxiliary control register.
 
-config OMAP_DM_TIMER
-	bool "Use dual-mode timer"
-	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
-	help
-	 Select this option if you want to use OMAP Dual-Mode timers.
-
 config OMAP_SERIAL_WAKE
 	bool "Enable wake-up events for serial ports"
 	depends on ARCH_OMAP1 && OMAP_MUX
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 47e1867..7215ada 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -9,5 +9,4 @@ obj-y := sram.o dma.o counter_32k.o
 
 # omap_device support (OMAP2+ only at the moment)
 
-obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
 obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c729a88..4da66cf 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -46,6 +46,12 @@ config DIGICOLOR_TIMER
 	help
 	  Enables the support for the digicolor timer driver.
 
+config OMAP_DM_TIMER
+	bool "Use dual-mode timer"
+	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
+	help
+	 Select this option if you want to use Dual-Mode timers.
+
 config DW_APB_TIMER
 	bool "DW APB timer driver" if COMPILE_TEST
 	help
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index dbc1ad1..a8e51e6 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_EM_TIMER_STI)	+= em_sti.o
 obj-$(CONFIG_CLKBLD_I8253)	+= i8253.o
 obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
+obj-$(CONFIG_OMAP_DM_TIMER)	+= dmtimer.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
 obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
diff --git a/arch/arm/plat-omap/dmtimer.c b/drivers/clocksource/dmtimer.c
similarity index 100%
rename from arch/arm/plat-omap/dmtimer.c
rename to drivers/clocksource/dmtimer.c
-- 
1.9.1

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

* [PATCH v2 3/7] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Move the dmtimer driver out of plat-omap to clocksource.
So that non-omap devices also could use this.

No Code changes done to the driver file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/plat-omap/Kconfig                            | 6 ------
 arch/arm/plat-omap/Makefile                           | 1 -
 drivers/clocksource/Kconfig                           | 6 ++++++
 drivers/clocksource/Makefile                          | 1 +
 {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
 5 files changed, 7 insertions(+), 7 deletions(-)
 rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index 3e27bff..4b92ac5 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -105,12 +105,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
 	help
 	  PPA routine service ID for setting L2 auxiliary control register.
 
-config OMAP_DM_TIMER
-	bool "Use dual-mode timer"
-	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
-	help
-	 Select this option if you want to use OMAP Dual-Mode timers.
-
 config OMAP_SERIAL_WAKE
 	bool "Enable wake-up events for serial ports"
 	depends on ARCH_OMAP1 && OMAP_MUX
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 47e1867..7215ada 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -9,5 +9,4 @@ obj-y := sram.o dma.o counter_32k.o
 
 # omap_device support (OMAP2+ only at the moment)
 
-obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
 obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c729a88..4da66cf 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -46,6 +46,12 @@ config DIGICOLOR_TIMER
 	help
 	  Enables the support for the digicolor timer driver.
 
+config OMAP_DM_TIMER
+	bool "Use dual-mode timer"
+	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
+	help
+	 Select this option if you want to use Dual-Mode timers.
+
 config DW_APB_TIMER
 	bool "DW APB timer driver" if COMPILE_TEST
 	help
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index dbc1ad1..a8e51e6 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_EM_TIMER_STI)	+= em_sti.o
 obj-$(CONFIG_CLKBLD_I8253)	+= i8253.o
 obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
+obj-$(CONFIG_OMAP_DM_TIMER)	+= dmtimer.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
 obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
diff --git a/arch/arm/plat-omap/dmtimer.c b/drivers/clocksource/dmtimer.c
similarity index 100%
rename from arch/arm/plat-omap/dmtimer.c
rename to drivers/clocksource/dmtimer.c
-- 
1.9.1

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

* [PATCH v2 4/7] dmtimer: Add timer ops to the platform data structure
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Add timer ops to the platform data structure

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
index a19b78d..a3e1794 100644
--- a/include/linux/platform_data/dmtimer-omap.h
+++ b/include/linux/platform_data/dmtimer-omap.h
@@ -20,12 +20,50 @@
 #ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
 #define __PLATFORM_DATA_DMTIMER_OMAP_H__
 
+struct omap_dm_timer_ops {
+	struct omap_dm_timer *(*request_by_node)(struct device_node *np);
+	struct omap_dm_timer *(*request_specific)(int timer_id);
+	struct omap_dm_timer *(*request)(void);
+
+	int	(*free)(struct omap_dm_timer *timer);
+
+	void	(*enable)(struct omap_dm_timer *timer);
+	void	(*disable)(struct omap_dm_timer *timer);
+
+	int	(*get_irq)(struct omap_dm_timer *timer);
+	int	(*set_int_enable)(struct omap_dm_timer *timer,
+				  unsigned int value);
+	int	(*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
+
+	struct clk *(*get_fclk)(struct omap_dm_timer *timer);
+
+	int	(*start)(struct omap_dm_timer *timer);
+	int	(*stop)(struct omap_dm_timer *timer);
+	int	(*set_source)(struct omap_dm_timer *timer, int source);
+
+	int	(*set_load)(struct omap_dm_timer *timer, int autoreload,
+			    unsigned int value);
+	int	(*set_match)(struct omap_dm_timer *timer, int enable,
+			     unsigned int match);
+	int	(*set_pwm)(struct omap_dm_timer *timer, int def_on,
+			   int toggle, int trigger);
+	int	(*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
+
+	unsigned int (*read_counter)(struct omap_dm_timer *timer);
+	int	(*write_counter)(struct omap_dm_timer *timer,
+				 unsigned int value);
+	unsigned int (*read_status)(struct omap_dm_timer *timer);
+	int	(*write_status)(struct omap_dm_timer *timer,
+				unsigned int value);
+};
+
 struct dmtimer_platform_data {
 	/* set_timer_src - Only used for OMAP1 devices */
 	int (*set_timer_src)(struct platform_device *pdev, int source);
 	u32 timer_capability;
 	u32 timer_errata;
 	int (*get_context_loss_count)(struct device *);
+	struct omap_dm_timer_ops *timer_ops;
 };
 
 #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
-- 
1.9.1

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

* [PATCH v2 4/7] dmtimer: Add timer ops to the platform data structure
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Add timer ops to the platform data structure

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
index a19b78d..a3e1794 100644
--- a/include/linux/platform_data/dmtimer-omap.h
+++ b/include/linux/platform_data/dmtimer-omap.h
@@ -20,12 +20,50 @@
 #ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
 #define __PLATFORM_DATA_DMTIMER_OMAP_H__
 
+struct omap_dm_timer_ops {
+	struct omap_dm_timer *(*request_by_node)(struct device_node *np);
+	struct omap_dm_timer *(*request_specific)(int timer_id);
+	struct omap_dm_timer *(*request)(void);
+
+	int	(*free)(struct omap_dm_timer *timer);
+
+	void	(*enable)(struct omap_dm_timer *timer);
+	void	(*disable)(struct omap_dm_timer *timer);
+
+	int	(*get_irq)(struct omap_dm_timer *timer);
+	int	(*set_int_enable)(struct omap_dm_timer *timer,
+				  unsigned int value);
+	int	(*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
+
+	struct clk *(*get_fclk)(struct omap_dm_timer *timer);
+
+	int	(*start)(struct omap_dm_timer *timer);
+	int	(*stop)(struct omap_dm_timer *timer);
+	int	(*set_source)(struct omap_dm_timer *timer, int source);
+
+	int	(*set_load)(struct omap_dm_timer *timer, int autoreload,
+			    unsigned int value);
+	int	(*set_match)(struct omap_dm_timer *timer, int enable,
+			     unsigned int match);
+	int	(*set_pwm)(struct omap_dm_timer *timer, int def_on,
+			   int toggle, int trigger);
+	int	(*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
+
+	unsigned int (*read_counter)(struct omap_dm_timer *timer);
+	int	(*write_counter)(struct omap_dm_timer *timer,
+				 unsigned int value);
+	unsigned int (*read_status)(struct omap_dm_timer *timer);
+	int	(*write_status)(struct omap_dm_timer *timer,
+				unsigned int value);
+};
+
 struct dmtimer_platform_data {
 	/* set_timer_src - Only used for OMAP1 devices */
 	int (*set_timer_src)(struct platform_device *pdev, int source);
 	u32 timer_capability;
 	u32 timer_errata;
 	int (*get_context_loss_count)(struct device *);
+	struct omap_dm_timer_ops *timer_ops;
 };
 
 #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
-- 
1.9.1

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

* [PATCH v2 5/7] clocksource: dmtimer: Populate the timer ops to the pdata
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Add the timer ops to the platform data

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 drivers/clocksource/dmtimer.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/clocksource/dmtimer.c b/drivers/clocksource/dmtimer.c
index afe1dc9..1cbd954 100644
--- a/drivers/clocksource/dmtimer.c
+++ b/drivers/clocksource/dmtimer.c
@@ -922,8 +922,33 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
 	return ret;
 }
 
+static struct omap_dm_timer_ops dmtimer_ops = {
+	.request_by_node = omap_dm_timer_request_by_node,
+	.request_specific = omap_dm_timer_request_specific,
+	.request = omap_dm_timer_request,
+	.set_source = omap_dm_timer_set_source,
+	.get_irq = omap_dm_timer_get_irq,
+	.set_int_enable = omap_dm_timer_set_int_enable,
+	.set_int_disable = omap_dm_timer_set_int_disable,
+	.free = omap_dm_timer_free,
+	.enable = omap_dm_timer_enable,
+	.disable = omap_dm_timer_disable,
+	.get_fclk = omap_dm_timer_get_fclk,
+	.start = omap_dm_timer_start,
+	.stop = omap_dm_timer_stop,
+	.set_load = omap_dm_timer_set_load,
+	.set_match = omap_dm_timer_set_match,
+	.set_pwm = omap_dm_timer_set_pwm,
+	.set_prescaler = omap_dm_timer_set_prescaler,
+	.read_counter = omap_dm_timer_read_counter,
+	.write_counter = omap_dm_timer_write_counter,
+	.read_status = omap_dm_timer_read_status,
+	.write_status = omap_dm_timer_write_status,
+};
+
 static const struct dmtimer_platform_data omap3plus_pdata = {
 	.timer_errata = OMAP_TIMER_ERRATA_I103_I767,
+	.timer_ops = &dmtimer_ops,
 };
 
 static const struct of_device_id omap_timer_match[] = {
-- 
1.9.1

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

* [PATCH v2 5/7] clocksource: dmtimer: Populate the timer ops to the pdata
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Add the timer ops to the platform data

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 drivers/clocksource/dmtimer.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/clocksource/dmtimer.c b/drivers/clocksource/dmtimer.c
index afe1dc9..1cbd954 100644
--- a/drivers/clocksource/dmtimer.c
+++ b/drivers/clocksource/dmtimer.c
@@ -922,8 +922,33 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
 	return ret;
 }
 
+static struct omap_dm_timer_ops dmtimer_ops = {
+	.request_by_node = omap_dm_timer_request_by_node,
+	.request_specific = omap_dm_timer_request_specific,
+	.request = omap_dm_timer_request,
+	.set_source = omap_dm_timer_set_source,
+	.get_irq = omap_dm_timer_get_irq,
+	.set_int_enable = omap_dm_timer_set_int_enable,
+	.set_int_disable = omap_dm_timer_set_int_disable,
+	.free = omap_dm_timer_free,
+	.enable = omap_dm_timer_enable,
+	.disable = omap_dm_timer_disable,
+	.get_fclk = omap_dm_timer_get_fclk,
+	.start = omap_dm_timer_start,
+	.stop = omap_dm_timer_stop,
+	.set_load = omap_dm_timer_set_load,
+	.set_match = omap_dm_timer_set_match,
+	.set_pwm = omap_dm_timer_set_pwm,
+	.set_prescaler = omap_dm_timer_set_prescaler,
+	.read_counter = omap_dm_timer_read_counter,
+	.write_counter = omap_dm_timer_write_counter,
+	.read_status = omap_dm_timer_read_status,
+	.write_status = omap_dm_timer_write_status,
+};
+
 static const struct dmtimer_platform_data omap3plus_pdata = {
 	.timer_errata = OMAP_TIMER_ERRATA_I103_I767,
+	.timer_ops = &dmtimer_ops,
 };
 
 static const struct of_device_id omap_timer_match[] = {
-- 
1.9.1

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

* [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 5ad42f3..3b27aff 100644
--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -23,6 +23,7 @@
 #include <linux/mutex.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/dmtimer-omap.h>
 #include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
 	struct pwm_chip chip;
 	struct mutex mutex;
 	pwm_omap_dmtimer *dm_timer;
-	struct pwm_omap_dmtimer_pdata *pdata;
+	struct omap_dm_timer_ops *pdata;
 	struct platform_device *dm_timer_pdev;
 };
 
@@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device_node *timer;
+	struct platform_device *timer_pdev;
 	struct pwm_omap_dmtimer_chip *omap;
-	struct pwm_omap_dmtimer_pdata *pdata;
+	struct dmtimer_platform_data *timer_pdata;
+	struct omap_dm_timer_ops *pdata;
 	pwm_omap_dmtimer *dm_timer;
 	u32 v;
 	int status;
 
-	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
-		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
+	timer = of_parse_phandle(np, "ti,timers", 0);
+	if (!timer)
+		return -ENODEV;
+
+	timer_pdev = of_find_device_by_node(timer);
+	if (!timer_pdev) {
+		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
+		return -ENODEV;
+	}
+
+	timer_pdata = dev_get_platdata(&timer_pdev->dev);
+	if (!timer_pdata) {
+		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
 		return -EINVAL;
 	}
 
-	if (!pdata->request_by_node ||
+	pdata = timer_pdata->timer_ops;
+
+	if (!pdata || !pdata->request_by_node ||
 	    !pdata->free ||
 	    !pdata->enable ||
 	    !pdata->disable ||
@@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	timer = of_parse_phandle(np, "ti,timers", 0);
-	if (!timer)
-		return -ENODEV;
-
 	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
 		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
 		return -ENODEV;
@@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 
 	omap->pdata = pdata;
 	omap->dm_timer = dm_timer;
-
-	omap->dm_timer_pdev = of_find_device_by_node(timer);
-	if (!omap->dm_timer_pdev) {
-		dev_err(&pdev->dev, "Unable to find timer pdev\n");
-		omap->pdata->free(dm_timer);
-		return -EINVAL;
-	}
+	omap->dm_timer_pdev = timer_pdev;
 
 	/*
 	 * Ensure that the timer is stopped before we allow PWM core to call
-- 
1.9.1

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

* [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 5ad42f3..3b27aff 100644
--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -23,6 +23,7 @@
 #include <linux/mutex.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/dmtimer-omap.h>
 #include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
 	struct pwm_chip chip;
 	struct mutex mutex;
 	pwm_omap_dmtimer *dm_timer;
-	struct pwm_omap_dmtimer_pdata *pdata;
+	struct omap_dm_timer_ops *pdata;
 	struct platform_device *dm_timer_pdev;
 };
 
@@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device_node *timer;
+	struct platform_device *timer_pdev;
 	struct pwm_omap_dmtimer_chip *omap;
-	struct pwm_omap_dmtimer_pdata *pdata;
+	struct dmtimer_platform_data *timer_pdata;
+	struct omap_dm_timer_ops *pdata;
 	pwm_omap_dmtimer *dm_timer;
 	u32 v;
 	int status;
 
-	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
-		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
+	timer = of_parse_phandle(np, "ti,timers", 0);
+	if (!timer)
+		return -ENODEV;
+
+	timer_pdev = of_find_device_by_node(timer);
+	if (!timer_pdev) {
+		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
+		return -ENODEV;
+	}
+
+	timer_pdata = dev_get_platdata(&timer_pdev->dev);
+	if (!timer_pdata) {
+		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
 		return -EINVAL;
 	}
 
-	if (!pdata->request_by_node ||
+	pdata = timer_pdata->timer_ops;
+
+	if (!pdata || !pdata->request_by_node ||
 	    !pdata->free ||
 	    !pdata->enable ||
 	    !pdata->disable ||
@@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	timer = of_parse_phandle(np, "ti,timers", 0);
-	if (!timer)
-		return -ENODEV;
-
 	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
 		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
 		return -ENODEV;
@@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 
 	omap->pdata = pdata;
 	omap->dm_timer = dm_timer;
-
-	omap->dm_timer_pdev = of_find_device_by_node(timer);
-	if (!omap->dm_timer_pdev) {
-		dev_err(&pdev->dev, "Unable to find timer pdev\n");
-		omap->pdata->free(dm_timer);
-		return -EINVAL;
-	}
+	omap->dm_timer_pdev = timer_pdev;
 
 	/*
 	 * Ensure that the timer is stopped before we allow PWM core to call
-- 
1.9.1

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

* [PATCH v2 7/7] arm: omap: pdata-quirks: Remove unused timer pdata
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:28   ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel, j-keerthy

Remove unused timer pdata.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/mach-omap2/pdata-quirks.c | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index ad9df86..e7d7fc7 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -24,10 +24,8 @@
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/iommu-omap.h>
 #include <linux/platform_data/wkup_m3.h>
-#include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_data/media/ir-rx51.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <clocksource/dmtimer.h>
 
 #include "common.h"
 #include "common-board-devices.h"
@@ -477,33 +475,6 @@ void omap_auxdata_legacy_init(struct device *dev)
 	dev->platform_data = &twl_gpio_auxdata;
 }
 
-/* Dual mode timer PWM callbacks platdata */
-#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
-static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
-	.request_by_node = omap_dm_timer_request_by_node,
-	.request_specific = omap_dm_timer_request_specific,
-	.request = omap_dm_timer_request,
-	.set_source = omap_dm_timer_set_source,
-	.get_irq = omap_dm_timer_get_irq,
-	.set_int_enable = omap_dm_timer_set_int_enable,
-	.set_int_disable = omap_dm_timer_set_int_disable,
-	.free = omap_dm_timer_free,
-	.enable = omap_dm_timer_enable,
-	.disable = omap_dm_timer_disable,
-	.get_fclk = omap_dm_timer_get_fclk,
-	.start = omap_dm_timer_start,
-	.stop = omap_dm_timer_stop,
-	.set_load = omap_dm_timer_set_load,
-	.set_match = omap_dm_timer_set_match,
-	.set_pwm = omap_dm_timer_set_pwm,
-	.set_prescaler = omap_dm_timer_set_prescaler,
-	.read_counter = omap_dm_timer_read_counter,
-	.write_counter = omap_dm_timer_write_counter,
-	.read_status = omap_dm_timer_read_status,
-	.write_status = omap_dm_timer_write_status,
-};
-#endif
-
 static struct ir_rx51_platform_data __maybe_unused rx51_ir_data = {
 	.set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
 };
@@ -572,9 +543,6 @@ static void __init omap3_mcbsp_init(void) {}
 	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
 		       &wkup_m3_data),
 #endif
-#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
-	OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
-#endif
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
 	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
 		       &omap4_iommu_pdata),
-- 
1.9.1

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

* [PATCH v2 7/7] arm: omap: pdata-quirks: Remove unused timer pdata
@ 2017-11-08 12:28   ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-08 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Remove unused timer pdata.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---

No code changes in this v2 version. Only enhanced patch
statistics for renames.

 arch/arm/mach-omap2/pdata-quirks.c | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index ad9df86..e7d7fc7 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -24,10 +24,8 @@
 #include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/iommu-omap.h>
 #include <linux/platform_data/wkup_m3.h>
-#include <linux/platform_data/pwm_omap_dmtimer.h>
 #include <linux/platform_data/media/ir-rx51.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <clocksource/dmtimer.h>
 
 #include "common.h"
 #include "common-board-devices.h"
@@ -477,33 +475,6 @@ void omap_auxdata_legacy_init(struct device *dev)
 	dev->platform_data = &twl_gpio_auxdata;
 }
 
-/* Dual mode timer PWM callbacks platdata */
-#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
-static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
-	.request_by_node = omap_dm_timer_request_by_node,
-	.request_specific = omap_dm_timer_request_specific,
-	.request = omap_dm_timer_request,
-	.set_source = omap_dm_timer_set_source,
-	.get_irq = omap_dm_timer_get_irq,
-	.set_int_enable = omap_dm_timer_set_int_enable,
-	.set_int_disable = omap_dm_timer_set_int_disable,
-	.free = omap_dm_timer_free,
-	.enable = omap_dm_timer_enable,
-	.disable = omap_dm_timer_disable,
-	.get_fclk = omap_dm_timer_get_fclk,
-	.start = omap_dm_timer_start,
-	.stop = omap_dm_timer_stop,
-	.set_load = omap_dm_timer_set_load,
-	.set_match = omap_dm_timer_set_match,
-	.set_pwm = omap_dm_timer_set_pwm,
-	.set_prescaler = omap_dm_timer_set_prescaler,
-	.read_counter = omap_dm_timer_read_counter,
-	.write_counter = omap_dm_timer_write_counter,
-	.read_status = omap_dm_timer_read_status,
-	.write_status = omap_dm_timer_write_status,
-};
-#endif
-
 static struct ir_rx51_platform_data __maybe_unused rx51_ir_data = {
 	.set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
 };
@@ -572,9 +543,6 @@ static void __init omap3_mcbsp_init(void) {}
 	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
 		       &wkup_m3_data),
 #endif
-#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
-	OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
-#endif
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
 	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
 		       &omap4_iommu_pdata),
-- 
1.9.1

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

* Re: [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 12:51   ` Ladislav Michl
  -1 siblings, 0 replies; 48+ messages in thread
From: Ladislav Michl @ 2017-11-08 12:51 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm,
	sebastian.reichel

On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
> The series moves dmtimer out of plat-omap to drivers/clocksource.
> The series also does a bunch of changes to pwm-omap-dmtimer code
> to adapt to the driver migration and clean up plat specific
> pdata-quirks and use the dmtimer platform data.
> 
> Boot tested on DRA7-EVM and AM437X-GP-EVM.

Boot tested on IGEPv2 with DM3730 and OMAP3530
Tested-by: Ladislav Michl <ladis@linux-mips.org>

> More testing would be of great help. 
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
Applying: clocksource: dmtimer: Remove all the exports
Applying: arm: omap: Move dmtimer.h out of plat-omap
Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
error: patch failed: drivers/clocksource/Kconfig:46
error: drivers/clocksource/Kconfig: patch does not apply
Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource

Test above was using your first serie which I manually fixed to apply.
Given the fact there is no code change, I will not do this again :-)
(and I'm happy someone is cleaning dm timer code, thank you)

	ladis

> Keerthy (7):
>   clocksource: dmtimer: Remove all the exports
>   arm: omap: Move dmtimer.h out of plat-omap
>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>     clocksource
>   dmtimer: Add timer ops to the platform data structure
>   clocksource: dmtimer: Populate the timer ops to the pdata
>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>   arm: omap: pdata-quirks: Remove unused timer pdata
> 
>  arch/arm/mach-omap1/pm.c                           |  2 +-
>  arch/arm/mach-omap1/timer.c                        |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>  arch/arm/mach-omap2/timer.c                        |  2 +-
>  arch/arm/plat-omap/Kconfig                         |  6 ---
>  arch/arm/plat-omap/Makefile                        |  1 -
>  drivers/clocksource/Kconfig                        |  6 +++
>  drivers/clocksource/Makefile                       |  1 +
>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>  .../include/plat => include/clocksource}/dmtimer.h |  0
>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>  20 files changed, 104 insertions(+), 95 deletions(-)
>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
> 
> -- 
> 1.9.1
> 
> --
> 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] 48+ messages in thread

* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-08 12:51   ` Ladislav Michl
  0 siblings, 0 replies; 48+ messages in thread
From: Ladislav Michl @ 2017-11-08 12:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
> The series moves dmtimer out of plat-omap to drivers/clocksource.
> The series also does a bunch of changes to pwm-omap-dmtimer code
> to adapt to the driver migration and clean up plat specific
> pdata-quirks and use the dmtimer platform data.
> 
> Boot tested on DRA7-EVM and AM437X-GP-EVM.

Boot tested on IGEPv2 with DM3730 and OMAP3530
Tested-by: Ladislav Michl <ladis@linux-mips.org>

> More testing would be of great help. 
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
Applying: clocksource: dmtimer: Remove all the exports
Applying: arm: omap: Move dmtimer.h out of plat-omap
Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
error: patch failed: drivers/clocksource/Kconfig:46
error: drivers/clocksource/Kconfig: patch does not apply
Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource

Test above was using your first serie which I manually fixed to apply.
Given the fact there is no code change, I will not do this again :-)
(and I'm happy someone is cleaning dm timer code, thank you)

	ladis

> Keerthy (7):
>   clocksource: dmtimer: Remove all the exports
>   arm: omap: Move dmtimer.h out of plat-omap
>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>     clocksource
>   dmtimer: Add timer ops to the platform data structure
>   clocksource: dmtimer: Populate the timer ops to the pdata
>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>   arm: omap: pdata-quirks: Remove unused timer pdata
> 
>  arch/arm/mach-omap1/pm.c                           |  2 +-
>  arch/arm/mach-omap1/timer.c                        |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>  arch/arm/mach-omap2/timer.c                        |  2 +-
>  arch/arm/plat-omap/Kconfig                         |  6 ---
>  arch/arm/plat-omap/Makefile                        |  1 -
>  drivers/clocksource/Kconfig                        |  6 +++
>  drivers/clocksource/Makefile                       |  1 +
>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>  .../include/plat => include/clocksource}/dmtimer.h |  0
>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>  20 files changed, 104 insertions(+), 95 deletions(-)
>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
> 
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-08 12:28   ` Keerthy
@ 2017-11-08 16:42     ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-08 16:42 UTC (permalink / raw)
  To: Keerthy
  Cc: aaro.koskinen, thierry.reding, khilman, daniel.lezcano, linux,
	linux-omap, linux-arm-kernel, linux-pwm, sebastian.reichel

* Keerthy <j-keerthy@ti.com> [171108 12:31]:
> The header file is currently under plat-omap directory
> under arch/omap. Move this out to an accessible place.
> 
> No Code changes done to the header file.

Some of the dmtimer functions are in this header to optimize the
size of the system timer code. Can you please check if some of them
can be left out of dmtimer.h and be made private to mach-omap1/timer.c
and mach-omap2/timer.c?

Again, we don't want driver code to start mis-using these as that's
immediately going to be big mess out of control.

Regards,

Tony

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-08 16:42     ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-08 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

* Keerthy <j-keerthy@ti.com> [171108 12:31]:
> The header file is currently under plat-omap directory
> under arch/omap. Move this out to an accessible place.
> 
> No Code changes done to the header file.

Some of the dmtimer functions are in this header to optimize the
size of the system timer code. Can you please check if some of them
can be left out of dmtimer.h and be made private to mach-omap1/timer.c
and mach-omap2/timer.c?

Again, we don't want driver code to start mis-using these as that's
immediately going to be big mess out of control.

Regards,

Tony

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

* Re: [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
  2017-11-08 12:28 ` Keerthy
@ 2017-11-08 22:57   ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-08 22:57 UTC (permalink / raw)
  To: Keerthy
  Cc: aaro.koskinen, thierry.reding, khilman, daniel.lezcano, linux,
	linux-omap, linux-arm-kernel, linux-pwm, sebastian.reichel

* Keerthy <j-keerthy@ti.com> [171108 04:30]:
> The series moves dmtimer out of plat-omap to drivers/clocksource.
> The series also does a bunch of changes to pwm-omap-dmtimer code
> to adapt to the driver migration and clean up plat specific
> pdata-quirks and use the dmtimer platform data.
> 
> Boot tested on DRA7-EVM and AM437X-GP-EVM.
> 
> More testing would be of great help. 
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

OK Cool.

Thierry, can you please take a look at the driver code and see if
you want other clean-ups done before moving this to drivers?

For merging, I can set up an immutable branch for this against
v4.15-rc1 when it's out and no more comments. That way we both
can then merge it in as needed.

Regards,

Tony

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

* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-08 22:57   ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-08 22:57 UTC (permalink / raw)
  To: linux-arm-kernel

* Keerthy <j-keerthy@ti.com> [171108 04:30]:
> The series moves dmtimer out of plat-omap to drivers/clocksource.
> The series also does a bunch of changes to pwm-omap-dmtimer code
> to adapt to the driver migration and clean up plat specific
> pdata-quirks and use the dmtimer platform data.
> 
> Boot tested on DRA7-EVM and AM437X-GP-EVM.
> 
> More testing would be of great help. 
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

OK Cool.

Thierry, can you please take a look at the driver code and see if
you want other clean-ups done before moving this to drivers?

For merging, I can set up an immutable branch for this against
v4.15-rc1 when it's out and no more comments. That way we both
can then merge it in as needed.

Regards,

Tony

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

* Re: [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-08 16:42     ` Tony Lindgren
@ 2017-11-09  4:25       ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:25 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: aaro.koskinen, thierry.reding, khilman, daniel.lezcano, linux,
	linux-omap, linux-arm-kernel, linux-pwm, sebastian.reichel



On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
>> The header file is currently under plat-omap directory
>> under arch/omap. Move this out to an accessible place.
>>
>> No Code changes done to the header file.
> 
> Some of the dmtimer functions are in this header to optimize the
> size of the system timer code. Can you please check if some of them
> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
> and mach-omap2/timer.c?

Okay. I will try to clean that as well.

> 
> Again, we don't want driver code to start mis-using these as that's
> immediately going to be big mess out of control.

Sure.

> 
> Regards,
> 
> Tony
> 

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-09  4:25       ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:25 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
>> The header file is currently under plat-omap directory
>> under arch/omap. Move this out to an accessible place.
>>
>> No Code changes done to the header file.
> 
> Some of the dmtimer functions are in this header to optimize the
> size of the system timer code. Can you please check if some of them
> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
> and mach-omap2/timer.c?

Okay. I will try to clean that as well.

> 
> Again, we don't want driver code to start mis-using these as that's
> immediately going to be big mess out of control.

Sure.

> 
> Regards,
> 
> Tony
> 

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

* Re: [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
  2017-11-08 12:51   ` Ladislav Michl
@ 2017-11-09  4:31     ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:31 UTC (permalink / raw)
  To: Ladislav Michl
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm,
	sebastian.reichel



On Wednesday 08 November 2017 06:21 PM, Ladislav Michl wrote:
> On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
>> The series moves dmtimer out of plat-omap to drivers/clocksource.
>> The series also does a bunch of changes to pwm-omap-dmtimer code
>> to adapt to the driver migration and clean up plat specific
>> pdata-quirks and use the dmtimer platform data.
>>
>> Boot tested on DRA7-EVM and AM437X-GP-EVM.
> 
> Boot tested on IGEPv2 with DM3730 and OMAP3530
> Tested-by: Ladislav Michl <ladis@linux-mips.org>

Thanks for Testing :-).

> 
>> More testing would be of great help. 
>>
>> No code changes in this v2 version. Only enhanced patch
>> statistics for renames.
> 
> Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
> Applying: clocksource: dmtimer: Remove all the exports
> Applying: arm: omap: Move dmtimer.h out of plat-omap
> Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
> error: patch failed: drivers/clocksource/Kconfig:46
> error: drivers/clocksource/Kconfig: patch does not apply
> Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
> 
> Test above was using your first serie which I manually fixed to apply.
> Given the fact there is no code change, I will not do this again :-)
> (and I'm happy someone is cleaning dm timer code, thank you)

I had rebased to latest next branch. Not sure what went wrong there. Let
me check myself.

I will rebase with all other comments fixed to the next branch and post v3.

Thanks Ladis.

> 
> 	ladis
> 
>> Keerthy (7):
>>   clocksource: dmtimer: Remove all the exports
>>   arm: omap: Move dmtimer.h out of plat-omap
>>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>>     clocksource
>>   dmtimer: Add timer ops to the platform data structure
>>   clocksource: dmtimer: Populate the timer ops to the pdata
>>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>>   arm: omap: pdata-quirks: Remove unused timer pdata
>>
>>  arch/arm/mach-omap1/pm.c                           |  2 +-
>>  arch/arm/mach-omap1/timer.c                        |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>>  arch/arm/mach-omap2/timer.c                        |  2 +-
>>  arch/arm/plat-omap/Kconfig                         |  6 ---
>>  arch/arm/plat-omap/Makefile                        |  1 -
>>  drivers/clocksource/Kconfig                        |  6 +++
>>  drivers/clocksource/Makefile                       |  1 +
>>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>>  .../include/plat => include/clocksource}/dmtimer.h |  0
>>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>>  20 files changed, 104 insertions(+), 95 deletions(-)
>>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
>>
>> -- 
>> 1.9.1
>>
>> --
>> 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] 48+ messages in thread

* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-09  4:31     ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:31 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 08 November 2017 06:21 PM, Ladislav Michl wrote:
> On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
>> The series moves dmtimer out of plat-omap to drivers/clocksource.
>> The series also does a bunch of changes to pwm-omap-dmtimer code
>> to adapt to the driver migration and clean up plat specific
>> pdata-quirks and use the dmtimer platform data.
>>
>> Boot tested on DRA7-EVM and AM437X-GP-EVM.
> 
> Boot tested on IGEPv2 with DM3730 and OMAP3530
> Tested-by: Ladislav Michl <ladis@linux-mips.org>

Thanks for Testing :-).

> 
>> More testing would be of great help. 
>>
>> No code changes in this v2 version. Only enhanced patch
>> statistics for renames.
> 
> Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
> Applying: clocksource: dmtimer: Remove all the exports
> Applying: arm: omap: Move dmtimer.h out of plat-omap
> Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
> error: patch failed: drivers/clocksource/Kconfig:46
> error: drivers/clocksource/Kconfig: patch does not apply
> Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
> 
> Test above was using your first serie which I manually fixed to apply.
> Given the fact there is no code change, I will not do this again :-)
> (and I'm happy someone is cleaning dm timer code, thank you)

I had rebased to latest next branch. Not sure what went wrong there. Let
me check myself.

I will rebase with all other comments fixed to the next branch and post v3.

Thanks Ladis.

> 
> 	ladis
> 
>> Keerthy (7):
>>   clocksource: dmtimer: Remove all the exports
>>   arm: omap: Move dmtimer.h out of plat-omap
>>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>>     clocksource
>>   dmtimer: Add timer ops to the platform data structure
>>   clocksource: dmtimer: Populate the timer ops to the pdata
>>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>>   arm: omap: pdata-quirks: Remove unused timer pdata
>>
>>  arch/arm/mach-omap1/pm.c                           |  2 +-
>>  arch/arm/mach-omap1/timer.c                        |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>>  arch/arm/mach-omap2/timer.c                        |  2 +-
>>  arch/arm/plat-omap/Kconfig                         |  6 ---
>>  arch/arm/plat-omap/Makefile                        |  1 -
>>  drivers/clocksource/Kconfig                        |  6 +++
>>  drivers/clocksource/Makefile                       |  1 +
>>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>>  .../include/plat => include/clocksource}/dmtimer.h |  0
>>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>>  20 files changed, 104 insertions(+), 95 deletions(-)
>>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
>>
>> -- 
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
  2017-11-09  4:31     ` Keerthy
@ 2017-11-09  4:41       ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:41 UTC (permalink / raw)
  To: Ladislav Michl
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm,
	sebastian.reichel



On Thursday 09 November 2017 10:01 AM, Keerthy wrote:
> 
> 
> On Wednesday 08 November 2017 06:21 PM, Ladislav Michl wrote:
>> On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
>>> The series moves dmtimer out of plat-omap to drivers/clocksource.
>>> The series also does a bunch of changes to pwm-omap-dmtimer code
>>> to adapt to the driver migration and clean up plat specific
>>> pdata-quirks and use the dmtimer platform data.
>>>
>>> Boot tested on DRA7-EVM and AM437X-GP-EVM.
>>
>> Boot tested on IGEPv2 with DM3730 and OMAP3530
>> Tested-by: Ladislav Michl <ladis@linux-mips.org>
> 
> Thanks for Testing :-).
> 
>>
>>> More testing would be of great help. 
>>>
>>> No code changes in this v2 version. Only enhanced patch
>>> statistics for renames.
>>
>> Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
>> Applying: clocksource: dmtimer: Remove all the exports
>> Applying: arm: omap: Move dmtimer.h out of plat-omap
>> Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
>> error: patch failed: drivers/clocksource/Kconfig:46
>> error: drivers/clocksource/Kconfig: patch does not apply
>> Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
>>
>> Test above was using your first serie which I manually fixed to apply.
>> Given the fact there is no code change, I will not do this again :-)
>> (and I'm happy someone is cleaning dm timer code, thank you)
> 
> I had rebased to latest next branch. Not sure what went wrong there. Let
> me check myself.

Ladis,

I got the same error as you have got against 4.14-rc8.
I should have mentioned in the series these patches are against the
latest next branch.

They apply cleanly against Latest next branch.

Thanks,
Keerthy

> 
> I will rebase with all other comments fixed to the next branch and post v3.
> 
> Thanks Ladis.
> 
>>
>> 	ladis
>>
>>> Keerthy (7):
>>>   clocksource: dmtimer: Remove all the exports
>>>   arm: omap: Move dmtimer.h out of plat-omap
>>>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>>>     clocksource
>>>   dmtimer: Add timer ops to the platform data structure
>>>   clocksource: dmtimer: Populate the timer ops to the pdata
>>>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>>>   arm: omap: pdata-quirks: Remove unused timer pdata
>>>
>>>  arch/arm/mach-omap1/pm.c                           |  2 +-
>>>  arch/arm/mach-omap1/timer.c                        |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>>>  arch/arm/mach-omap2/timer.c                        |  2 +-
>>>  arch/arm/plat-omap/Kconfig                         |  6 ---
>>>  arch/arm/plat-omap/Makefile                        |  1 -
>>>  drivers/clocksource/Kconfig                        |  6 +++
>>>  drivers/clocksource/Makefile                       |  1 +
>>>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>>>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>>>  .../include/plat => include/clocksource}/dmtimer.h |  0
>>>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>>>  20 files changed, 104 insertions(+), 95 deletions(-)
>>>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>>>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
>>>
>>> -- 
>>> 1.9.1
>>>
>>> --
>>> 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] 48+ messages in thread

* [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap
@ 2017-11-09  4:41       ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  4:41 UTC (permalink / raw)
  To: linux-arm-kernel



On Thursday 09 November 2017 10:01 AM, Keerthy wrote:
> 
> 
> On Wednesday 08 November 2017 06:21 PM, Ladislav Michl wrote:
>> On Wed, Nov 08, 2017 at 05:58:21PM +0530, Keerthy wrote:
>>> The series moves dmtimer out of plat-omap to drivers/clocksource.
>>> The series also does a bunch of changes to pwm-omap-dmtimer code
>>> to adapt to the driver migration and clean up plat specific
>>> pdata-quirks and use the dmtimer platform data.
>>>
>>> Boot tested on DRA7-EVM and AM437X-GP-EVM.
>>
>> Boot tested on IGEPv2 with DM3730 and OMAP3530
>> Tested-by: Ladislav Michl <ladis@linux-mips.org>
> 
> Thanks for Testing :-).
> 
>>
>>> More testing would be of great help. 
>>>
>>> No code changes in this v2 version. Only enhanced patch
>>> statistics for renames.
>>
>> Btw, what are these pathes against. Here's how it ends against 4.14-rc8:
>> Applying: clocksource: dmtimer: Remove all the exports
>> Applying: arm: omap: Move dmtimer.h out of plat-omap
>> Applying: arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
>> error: patch failed: drivers/clocksource/Kconfig:46
>> error: drivers/clocksource/Kconfig: patch does not apply
>> Patch failed at 0003 arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
>>
>> Test above was using your first serie which I manually fixed to apply.
>> Given the fact there is no code change, I will not do this again :-)
>> (and I'm happy someone is cleaning dm timer code, thank you)
> 
> I had rebased to latest next branch. Not sure what went wrong there. Let
> me check myself.

Ladis,

I got the same error as you have got against 4.14-rc8.
I should have mentioned in the series these patches are against the
latest next branch.

They apply cleanly against Latest next branch.

Thanks,
Keerthy

> 
> I will rebase with all other comments fixed to the next branch and post v3.
> 
> Thanks Ladis.
> 
>>
>> 	ladis
>>
>>> Keerthy (7):
>>>   clocksource: dmtimer: Remove all the exports
>>>   arm: omap: Move dmtimer.h out of plat-omap
>>>   arm: OMAP: Move dmtimer driver out of plat-omap to drivers under
>>>     clocksource
>>>   dmtimer: Add timer ops to the platform data structure
>>>   clocksource: dmtimer: Populate the timer ops to the pdata
>>>   pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
>>>   arm: omap: pdata-quirks: Remove unused timer pdata
>>>
>>>  arch/arm/mach-omap1/pm.c                           |  2 +-
>>>  arch/arm/mach-omap1/timer.c                        |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2420_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2430_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |  2 +-
>>>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c         |  2 +-
>>>  arch/arm/mach-omap2/pdata-quirks.c                 | 32 -------------
>>>  arch/arm/mach-omap2/timer.c                        |  2 +-
>>>  arch/arm/plat-omap/Kconfig                         |  6 ---
>>>  arch/arm/plat-omap/Makefile                        |  1 -
>>>  drivers/clocksource/Kconfig                        |  6 +++
>>>  drivers/clocksource/Makefile                       |  1 +
>>>  .../plat-omap => drivers/clocksource}/dmtimer.c    | 54 +++++++++++-----------
>>>  drivers/pwm/pwm-omap-dmtimer.c                     | 39 +++++++++-------
>>>  .../include/plat => include/clocksource}/dmtimer.h |  0
>>>  include/linux/platform_data/dmtimer-omap.h         | 38 +++++++++++++++
>>>  20 files changed, 104 insertions(+), 95 deletions(-)
>>>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (95%)
>>>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
>>>
>>> -- 
>>> 1.9.1
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>>> the body of a message to majordomo at 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 at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-09  4:25       ` Keerthy
@ 2017-11-09  8:06         ` Keerthy
  -1 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  8:06 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: aaro.koskinen, thierry.reding, khilman, daniel.lezcano, linux,
	linux-omap, linux-arm-kernel, linux-pwm, sebastian.reichel



On Thursday 09 November 2017 09:55 AM, Keerthy wrote:
> 
> 
> On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
>> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
>>> The header file is currently under plat-omap directory
>>> under arch/omap. Move this out to an accessible place.
>>>
>>> No Code changes done to the header file.
>>
>> Some of the dmtimer functions are in this header to optimize the
>> size of the system timer code. Can you please check if some of them
>> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
>> and mach-omap2/timer.c?
> 
> Okay. I will try to clean that as well.

Tony,

Only function that i could push out of dmtimer.h was
__omap_dm_timer_override_errata

which is being currently called by mach-omap2/timer.c alone.

Rest all are used both my dmtimer.c as well as mach-omap2/timer.c.
Here is the list:

__omap_dm_timer_read
__omap_dm_timer_write
__omap_dm_timer_init_regs
__omap_dm_timer_enable_posted
__omap_dm_timer_stop
__omap_dm_timer_load_start
__omap_dm_timer_int_enable
__omap_dm_timer_read_counter
__omap_dm_timer_write_status

Any preferences on moving them to dmtimer.c or leaving them in header file?

Regards,
Keerthy

> 
>>
>> Again, we don't want driver code to start mis-using these as that's
>> immediately going to be big mess out of control.
> 
> Sure.
> 
>>
>> Regards,
>>
>> Tony
>>

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-09  8:06         ` Keerthy
  0 siblings, 0 replies; 48+ messages in thread
From: Keerthy @ 2017-11-09  8:06 UTC (permalink / raw)
  To: linux-arm-kernel



On Thursday 09 November 2017 09:55 AM, Keerthy wrote:
> 
> 
> On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
>> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
>>> The header file is currently under plat-omap directory
>>> under arch/omap. Move this out to an accessible place.
>>>
>>> No Code changes done to the header file.
>>
>> Some of the dmtimer functions are in this header to optimize the
>> size of the system timer code. Can you please check if some of them
>> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
>> and mach-omap2/timer.c?
> 
> Okay. I will try to clean that as well.

Tony,

Only function that i could push out of dmtimer.h was
__omap_dm_timer_override_errata

which is being currently called by mach-omap2/timer.c alone.

Rest all are used both my dmtimer.c as well as mach-omap2/timer.c.
Here is the list:

__omap_dm_timer_read
__omap_dm_timer_write
__omap_dm_timer_init_regs
__omap_dm_timer_enable_posted
__omap_dm_timer_stop
__omap_dm_timer_load_start
__omap_dm_timer_int_enable
__omap_dm_timer_read_counter
__omap_dm_timer_write_status

Any preferences on moving them to dmtimer.c or leaving them in header file?

Regards,
Keerthy

> 
>>
>> Again, we don't want driver code to start mis-using these as that's
>> immediately going to be big mess out of control.
> 
> Sure.
> 
>>
>> Regards,
>>
>> Tony
>>

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

* Re: [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-09  8:06         ` Keerthy
@ 2017-11-09 14:52           ` Tony Lindgren
  -1 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-09 14:52 UTC (permalink / raw)
  To: Keerthy
  Cc: aaro.koskinen, thierry.reding, khilman, daniel.lezcano, linux,
	linux-omap, linux-arm-kernel, linux-pwm, sebastian.reichel

* Keerthy <j-keerthy@ti.com> [171109 08:09]:
> 
> 
> On Thursday 09 November 2017 09:55 AM, Keerthy wrote:
> > 
> > 
> > On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
> >> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
> >>> The header file is currently under plat-omap directory
> >>> under arch/omap. Move this out to an accessible place.
> >>>
> >>> No Code changes done to the header file.
> >>
> >> Some of the dmtimer functions are in this header to optimize the
> >> size of the system timer code. Can you please check if some of them
> >> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
> >> and mach-omap2/timer.c?
> > 
> > Okay. I will try to clean that as well.
> 
> Tony,
> 
> Only function that i could push out of dmtimer.h was
> __omap_dm_timer_override_errata
> 
> which is being currently called by mach-omap2/timer.c alone.

Hmm OK thanks for checking.

> Rest all are used both my dmtimer.c as well as mach-omap2/timer.c.
> Here is the list:
> 
> __omap_dm_timer_read
> __omap_dm_timer_write
> __omap_dm_timer_init_regs
> __omap_dm_timer_enable_posted
> __omap_dm_timer_stop
> __omap_dm_timer_load_start
> __omap_dm_timer_int_enable
> __omap_dm_timer_read_counter
> __omap_dm_timer_write_status
> 
> Any preferences on moving them to dmtimer.c or leaving them in header file?

How about we make the system timer functions and these header
functions private to the dmtimer.c. Then we can have the SoC specific
system timer functions be selected based on comaptible value like
drivers typically do :)

I think only the SoC specific init code should be left in
arch/arm/mach-omap[12]/timer.c.

Regards,

Tony

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-09 14:52           ` Tony Lindgren
  0 siblings, 0 replies; 48+ messages in thread
From: Tony Lindgren @ 2017-11-09 14:52 UTC (permalink / raw)
  To: linux-arm-kernel

* Keerthy <j-keerthy@ti.com> [171109 08:09]:
> 
> 
> On Thursday 09 November 2017 09:55 AM, Keerthy wrote:
> > 
> > 
> > On Wednesday 08 November 2017 10:12 PM, Tony Lindgren wrote:
> >> * Keerthy <j-keerthy@ti.com> [171108 12:31]:
> >>> The header file is currently under plat-omap directory
> >>> under arch/omap. Move this out to an accessible place.
> >>>
> >>> No Code changes done to the header file.
> >>
> >> Some of the dmtimer functions are in this header to optimize the
> >> size of the system timer code. Can you please check if some of them
> >> can be left out of dmtimer.h and be made private to mach-omap1/timer.c
> >> and mach-omap2/timer.c?
> > 
> > Okay. I will try to clean that as well.
> 
> Tony,
> 
> Only function that i could push out of dmtimer.h was
> __omap_dm_timer_override_errata
> 
> which is being currently called by mach-omap2/timer.c alone.

Hmm OK thanks for checking.

> Rest all are used both my dmtimer.c as well as mach-omap2/timer.c.
> Here is the list:
> 
> __omap_dm_timer_read
> __omap_dm_timer_write
> __omap_dm_timer_init_regs
> __omap_dm_timer_enable_posted
> __omap_dm_timer_stop
> __omap_dm_timer_load_start
> __omap_dm_timer_int_enable
> __omap_dm_timer_read_counter
> __omap_dm_timer_write_status
> 
> Any preferences on moving them to dmtimer.c or leaving them in header file?

How about we make the system timer functions and these header
functions private to the dmtimer.c. Then we can have the SoC specific
system timer functions be selected based on comaptible value like
drivers typically do :)

I think only the SoC specific init code should be left in
arch/arm/mach-omap[12]/timer.c.

Regards,

Tony

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

* Re: [PATCH v2 1/7] clocksource: dmtimer: Remove all the exports
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:13     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:13 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 7977 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:22PM +0530, Keerthy wrote:
> Remove all the unwanted exports from the driver
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> No code changes in this v2 version. Only enhanced patch
> statistics for renames.
> 
>  arch/arm/plat-omap/dmtimer.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index d443e48..72565fc 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -302,7 +302,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
>  {
>  	return _omap_dm_timer_request(REQUEST_ANY, NULL);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request);
>  
>  struct omap_dm_timer *omap_dm_timer_request_specific(int id)
>  {
> @@ -315,7 +314,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
>  
>  	return _omap_dm_timer_request(REQUEST_BY_ID, &id);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific);
>  
>  /**
>   * omap_dm_timer_request_by_cap - Request a timer by capability
> @@ -330,7 +328,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap)
>  {
>  	return _omap_dm_timer_request(REQUEST_BY_CAP, &cap);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_cap);
>  
>  /**
>   * omap_dm_timer_request_by_node - Request a timer by device-tree node
> @@ -346,7 +343,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
>  
>  	return _omap_dm_timer_request(REQUEST_BY_NODE, np);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_node);
>  
>  int omap_dm_timer_free(struct omap_dm_timer *timer)
>  {
> @@ -359,7 +355,6 @@ int omap_dm_timer_free(struct omap_dm_timer *timer)
>  	timer->reserved = 0;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_free);
>  
>  void omap_dm_timer_enable(struct omap_dm_timer *timer)
>  {
> @@ -379,13 +374,11 @@ void omap_dm_timer_enable(struct omap_dm_timer *timer)
>  		}
>  	}
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_enable);
>  
>  void omap_dm_timer_disable(struct omap_dm_timer *timer)
>  {
>  	pm_runtime_put_sync(&timer->pdev->dev);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_disable);
>  
>  int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
>  {
> @@ -393,7 +386,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
>  		return timer->irq;
>  	return -EINVAL;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq);
>  
>  #if defined(CONFIG_ARCH_OMAP1)
>  #include <mach/hardware.h>
> @@ -429,7 +421,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  
>  	return inputmask;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
>  
>  #else
>  
> @@ -439,7 +430,6 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
>  		return timer->fclk;
>  	return NULL;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_get_fclk);
>  
>  __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  {
> @@ -447,7 +437,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
>  
>  #endif
>  
> @@ -461,7 +450,6 @@ int omap_dm_timer_trigger(struct omap_dm_timer *timer)
>  	omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_trigger);
>  
>  int omap_dm_timer_start(struct omap_dm_timer *timer)
>  {
> @@ -482,7 +470,6 @@ int omap_dm_timer_start(struct omap_dm_timer *timer)
>  	timer->context.tclr = l;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_start);
>  
>  int omap_dm_timer_stop(struct omap_dm_timer *timer)
>  {
> @@ -506,7 +493,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
>  
>  int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
>  {
> @@ -569,7 +555,6 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
>  
>  	return ret;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
>  
>  int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
>  			    unsigned int load)
> @@ -595,7 +580,6 @@ int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_load);
>  
>  /* Optimized set_load which removes costly spin wait in timer_start */
>  int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
> @@ -625,7 +609,6 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
>  	timer->context.tcrr = load;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
>  
>  int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
>  			     unsigned int match)
> @@ -650,7 +633,6 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_match);
>  
>  int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
>  			   int toggle, int trigger)
> @@ -676,7 +658,6 @@ int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_pwm);
>  
>  int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
>  {
> @@ -699,7 +680,6 @@ int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
>  
>  int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
>  				  unsigned int value)
> @@ -716,7 +696,6 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
>  
>  /**
>   * omap_dm_timer_set_int_disable - disable timer interrupts
> @@ -747,7 +726,6 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable);
>  
>  unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
>  {
> @@ -762,7 +740,6 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
>  
>  	return l;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
>  
>  int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
>  {
> @@ -773,7 +750,6 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
>  
>  unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
>  {
> @@ -784,7 +760,6 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
>  
>  	return __omap_dm_timer_read_counter(timer, timer->posted);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
>  
>  int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
>  {
> @@ -799,7 +774,6 @@ int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
>  	timer->context.tcrr = value;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_write_counter);
>  
>  int omap_dm_timers_active(void)
>  {
> @@ -816,7 +790,6 @@ int omap_dm_timers_active(void)
>  	}
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timers_active);
>  
>  static const struct of_device_id omap_timer_match[];
>  
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 1/7] clocksource: dmtimer: Remove all the exports
@ 2017-11-09 16:13     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:22PM +0530, Keerthy wrote:
> Remove all the unwanted exports from the driver
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> No code changes in this v2 version. Only enhanced patch
> statistics for renames.
> 
>  arch/arm/plat-omap/dmtimer.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index d443e48..72565fc 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -302,7 +302,6 @@ struct omap_dm_timer *omap_dm_timer_request(void)
>  {
>  	return _omap_dm_timer_request(REQUEST_ANY, NULL);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request);
>  
>  struct omap_dm_timer *omap_dm_timer_request_specific(int id)
>  {
> @@ -315,7 +314,6 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
>  
>  	return _omap_dm_timer_request(REQUEST_BY_ID, &id);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_specific);
>  
>  /**
>   * omap_dm_timer_request_by_cap - Request a timer by capability
> @@ -330,7 +328,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap)
>  {
>  	return _omap_dm_timer_request(REQUEST_BY_CAP, &cap);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_cap);
>  
>  /**
>   * omap_dm_timer_request_by_node - Request a timer by device-tree node
> @@ -346,7 +343,6 @@ struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
>  
>  	return _omap_dm_timer_request(REQUEST_BY_NODE, np);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_request_by_node);
>  
>  int omap_dm_timer_free(struct omap_dm_timer *timer)
>  {
> @@ -359,7 +355,6 @@ int omap_dm_timer_free(struct omap_dm_timer *timer)
>  	timer->reserved = 0;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_free);
>  
>  void omap_dm_timer_enable(struct omap_dm_timer *timer)
>  {
> @@ -379,13 +374,11 @@ void omap_dm_timer_enable(struct omap_dm_timer *timer)
>  		}
>  	}
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_enable);
>  
>  void omap_dm_timer_disable(struct omap_dm_timer *timer)
>  {
>  	pm_runtime_put_sync(&timer->pdev->dev);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_disable);
>  
>  int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
>  {
> @@ -393,7 +386,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
>  		return timer->irq;
>  	return -EINVAL;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_get_irq);
>  
>  #if defined(CONFIG_ARCH_OMAP1)
>  #include <mach/hardware.h>
> @@ -429,7 +421,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  
>  	return inputmask;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
>  
>  #else
>  
> @@ -439,7 +430,6 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
>  		return timer->fclk;
>  	return NULL;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_get_fclk);
>  
>  __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  {
> @@ -447,7 +437,6 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_modify_idlect_mask);
>  
>  #endif
>  
> @@ -461,7 +450,6 @@ int omap_dm_timer_trigger(struct omap_dm_timer *timer)
>  	omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_trigger);
>  
>  int omap_dm_timer_start(struct omap_dm_timer *timer)
>  {
> @@ -482,7 +470,6 @@ int omap_dm_timer_start(struct omap_dm_timer *timer)
>  	timer->context.tclr = l;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_start);
>  
>  int omap_dm_timer_stop(struct omap_dm_timer *timer)
>  {
> @@ -506,7 +493,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
>  
>  int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
>  {
> @@ -569,7 +555,6 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
>  
>  	return ret;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
>  
>  int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
>  			    unsigned int load)
> @@ -595,7 +580,6 @@ int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_load);
>  
>  /* Optimized set_load which removes costly spin wait in timer_start */
>  int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
> @@ -625,7 +609,6 @@ int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
>  	timer->context.tcrr = load;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
>  
>  int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
>  			     unsigned int match)
> @@ -650,7 +633,6 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_match);
>  
>  int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
>  			   int toggle, int trigger)
> @@ -676,7 +658,6 @@ int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_pwm);
>  
>  int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
>  {
> @@ -699,7 +680,6 @@ int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
>  
>  int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
>  				  unsigned int value)
> @@ -716,7 +696,6 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
>  
>  /**
>   * omap_dm_timer_set_int_disable - disable timer interrupts
> @@ -747,7 +726,6 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
>  	omap_dm_timer_disable(timer);
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable);
>  
>  unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
>  {
> @@ -762,7 +740,6 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
>  
>  	return l;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
>  
>  int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
>  {
> @@ -773,7 +750,6 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
>  
>  unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
>  {
> @@ -784,7 +760,6 @@ unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
>  
>  	return __omap_dm_timer_read_counter(timer, timer->posted);
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
>  
>  int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
>  {
> @@ -799,7 +774,6 @@ int omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
>  	timer->context.tcrr = value;
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timer_write_counter);
>  
>  int omap_dm_timers_active(void)
>  {
> @@ -816,7 +790,6 @@ int omap_dm_timers_active(void)
>  	}
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(omap_dm_timers_active);
>  
>  static const struct of_device_id omap_timer_match[];
>  
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/99f214b3/attachment.sig>

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

* Re: [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:16     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:16 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 8751 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:23PM +0530, Keerthy wrote:
> The header file is currently under plat-omap directory
> under arch/omap. Move this out to an accessible place.
> 
> No Code changes done to the header file.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Thanks, this is much easier to review.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/mach-omap1/pm.c                                           | 2 +-
>  arch/arm/mach-omap1/timer.c                                        | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c                 | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c                          | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/pdata-quirks.c                                 | 2 +-
>  arch/arm/mach-omap2/timer.c                                        | 2 +-
>  arch/arm/plat-omap/dmtimer.c                                       | 2 +-
>  {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h | 0
>  14 files changed, 13 insertions(+), 13 deletions(-)
>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
> 
> diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
> index f1135bf..a07d47cf 100644
> --- a/arch/arm/mach-omap1/pm.c
> +++ b/arch/arm/mach-omap1/pm.c
> @@ -55,7 +55,7 @@
>  #include <mach/tc.h>
>  #include <mach/mux.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include <mach/irqs.h>
>  
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> index 8fb1ec6..7c057ab 100644
> --- a/arch/arm/mach-omap1/timer.c
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -27,7 +27,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/dmtimer-omap.h>
>  
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "soc.h"
>  
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> index 1a15a34..45c1043 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> @@ -16,7 +16,7 @@
>  #include <linux/i2c-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "l3_2xxx.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> index 3801850..892ca58 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> @@ -18,7 +18,7 @@
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "l3_2xxx.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> index beec4cd..82b51c0 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> @@ -11,7 +11,7 @@
>  
>  #include <linux/platform_data/gpio-omap.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  
>  #include "omap_hwmod.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 9cfba41..2423c51 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -25,7 +25,7 @@
>  #include "l4_3xxx.h"
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "soc.h"
>  #include "omap_hwmod.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> index c477096..22e0e38 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> @@ -30,7 +30,7 @@
>  
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> index 988e7ea..530334e 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> @@ -26,7 +26,7 @@
>  #include <linux/omap-dma.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index d05e553d..adabdef 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -26,7 +26,7 @@
>  #include <linux/omap-dma.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> index 77a515b..d05dd2d 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> @@ -18,7 +18,7 @@
>  #include <linux/platform_data/gpio-omap.h>
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod_common_data.h"
>  #include "cm81xx.h"
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index 6b433fc..ad9df86 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -27,7 +27,7 @@
>  #include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_data/media/ir-rx51.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "common.h"
>  #include "common-board-devices.h"
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index ece09c9..31c1b01 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -26,6 +26,7 @@
>   * License. See the file "COPYING" in the main directory of this archive
>   * for more details.
>   */
> +#include <clocksource/dmtimer.h>
>  #include <linux/init.h>
>  #include <linux/time.h>
>  #include <linux/interrupt.h>
> @@ -49,7 +50,6 @@
>  #include "omap_hwmod.h"
>  #include "omap_device.h"
>  #include <plat/counter-32k.h>
> -#include <plat/dmtimer.h>
>  #include "omap-pm.h"
>  
>  #include "soc.h"
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 72565fc..afe1dc9 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -47,7 +47,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/dmtimer-omap.h>
>  
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  static u32 omap_reserved_systimers;
>  static LIST_HEAD(omap_timer_list);
> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/include/clocksource/dmtimer.h
> similarity index 100%
> rename from arch/arm/plat-omap/include/plat/dmtimer.h
> rename to include/clocksource/dmtimer.h
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap
@ 2017-11-09 16:16     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:23PM +0530, Keerthy wrote:
> The header file is currently under plat-omap directory
> under arch/omap. Move this out to an accessible place.
> 
> No Code changes done to the header file.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Thanks, this is much easier to review.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/mach-omap1/pm.c                                           | 2 +-
>  arch/arm/mach-omap1/timer.c                                        | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2420_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2430_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c                 | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_44xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_54xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c                          | 2 +-
>  arch/arm/mach-omap2/omap_hwmod_81xx_data.c                         | 2 +-
>  arch/arm/mach-omap2/pdata-quirks.c                                 | 2 +-
>  arch/arm/mach-omap2/timer.c                                        | 2 +-
>  arch/arm/plat-omap/dmtimer.c                                       | 2 +-
>  {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h | 0
>  14 files changed, 13 insertions(+), 13 deletions(-)
>  rename {arch/arm/plat-omap/include/plat => include/clocksource}/dmtimer.h (100%)
> 
> diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
> index f1135bf..a07d47cf 100644
> --- a/arch/arm/mach-omap1/pm.c
> +++ b/arch/arm/mach-omap1/pm.c
> @@ -55,7 +55,7 @@
>  #include <mach/tc.h>
>  #include <mach/mux.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include <mach/irqs.h>
>  
> diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
> index 8fb1ec6..7c057ab 100644
> --- a/arch/arm/mach-omap1/timer.c
> +++ b/arch/arm/mach-omap1/timer.c
> @@ -27,7 +27,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/dmtimer-omap.h>
>  
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "soc.h"
>  
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> index 1a15a34..45c1043 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> @@ -16,7 +16,7 @@
>  #include <linux/i2c-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "l3_2xxx.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> index 3801850..892ca58 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> @@ -18,7 +18,7 @@
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "l3_2xxx.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> index beec4cd..82b51c0 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
> @@ -11,7 +11,7 @@
>  
>  #include <linux/platform_data/gpio-omap.h>
>  #include <linux/omap-dma.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  
>  #include "omap_hwmod.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 9cfba41..2423c51 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -25,7 +25,7 @@
>  #include "l4_3xxx.h"
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "soc.h"
>  #include "omap_hwmod.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> index c477096..22e0e38 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> @@ -30,7 +30,7 @@
>  
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> index 988e7ea..530334e 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
> @@ -26,7 +26,7 @@
>  #include <linux/omap-dma.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index d05e553d..adabdef 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -26,7 +26,7 @@
>  #include <linux/omap-dma.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod.h"
>  #include "omap_hwmod_common_data.h"
> diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> index 77a515b..d05dd2d 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
> @@ -18,7 +18,7 @@
>  #include <linux/platform_data/gpio-omap.h>
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/spi-omap2-mcspi.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "omap_hwmod_common_data.h"
>  #include "cm81xx.h"
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index 6b433fc..ad9df86 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -27,7 +27,7 @@
>  #include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_data/media/ir-rx51.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  #include "common.h"
>  #include "common-board-devices.h"
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index ece09c9..31c1b01 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -26,6 +26,7 @@
>   * License. See the file "COPYING" in the main directory of this archive
>   * for more details.
>   */
> +#include <clocksource/dmtimer.h>
>  #include <linux/init.h>
>  #include <linux/time.h>
>  #include <linux/interrupt.h>
> @@ -49,7 +50,6 @@
>  #include "omap_hwmod.h"
>  #include "omap_device.h"
>  #include <plat/counter-32k.h>
> -#include <plat/dmtimer.h>
>  #include "omap-pm.h"
>  
>  #include "soc.h"
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 72565fc..afe1dc9 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -47,7 +47,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/dmtimer-omap.h>
>  
> -#include <plat/dmtimer.h>
> +#include <clocksource/dmtimer.h>
>  
>  static u32 omap_reserved_systimers;
>  static LIST_HEAD(omap_timer_list);
> diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/include/clocksource/dmtimer.h
> similarity index 100%
> rename from arch/arm/plat-omap/include/plat/dmtimer.h
> rename to include/clocksource/dmtimer.h
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/25f1ef85/attachment-0001.sig>

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

* Re: [PATCH v2 3/7] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:17     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:17 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 3507 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:24PM +0530, Keerthy wrote:
> Move the dmtimer driver out of plat-omap to clocksource.
> So that non-omap devices also could use this.
> 
> No Code changes done to the driver file.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/plat-omap/Kconfig                            | 6 ------
>  arch/arm/plat-omap/Makefile                           | 1 -
>  drivers/clocksource/Kconfig                           | 6 ++++++
>  drivers/clocksource/Makefile                          | 1 +
>  {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
>  5 files changed, 7 insertions(+), 7 deletions(-)
>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)
> 
> diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> index 3e27bff..4b92ac5 100644
> --- a/arch/arm/plat-omap/Kconfig
> +++ b/arch/arm/plat-omap/Kconfig
> @@ -105,12 +105,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
>  	help
>  	  PPA routine service ID for setting L2 auxiliary control register.
>  
> -config OMAP_DM_TIMER
> -	bool "Use dual-mode timer"
> -	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> -	help
> -	 Select this option if you want to use OMAP Dual-Mode timers.
> -
>  config OMAP_SERIAL_WAKE
>  	bool "Enable wake-up events for serial ports"
>  	depends on ARCH_OMAP1 && OMAP_MUX
> diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
> index 47e1867..7215ada 100644
> --- a/arch/arm/plat-omap/Makefile
> +++ b/arch/arm/plat-omap/Makefile
> @@ -9,5 +9,4 @@ obj-y := sram.o dma.o counter_32k.o
>  
>  # omap_device support (OMAP2+ only at the moment)
>  
> -obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
>  obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index c729a88..4da66cf 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -46,6 +46,12 @@ config DIGICOLOR_TIMER
>  	help
>  	  Enables the support for the digicolor timer driver.
>  
> +config OMAP_DM_TIMER
> +	bool "Use dual-mode timer"
> +	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> +	help
> +	 Select this option if you want to use Dual-Mode timers.
> +
>  config DW_APB_TIMER
>  	bool "DW APB timer driver" if COMPILE_TEST
>  	help
> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> index dbc1ad1..a8e51e6 100644
> --- a/drivers/clocksource/Makefile
> +++ b/drivers/clocksource/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_EM_TIMER_STI)	+= em_sti.o
>  obj-$(CONFIG_CLKBLD_I8253)	+= i8253.o
>  obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
>  obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
> +obj-$(CONFIG_OMAP_DM_TIMER)	+= dmtimer.o
>  obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
>  obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
>  obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
> diff --git a/arch/arm/plat-omap/dmtimer.c b/drivers/clocksource/dmtimer.c
> similarity index 100%
> rename from arch/arm/plat-omap/dmtimer.c
> rename to drivers/clocksource/dmtimer.c
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 3/7] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
@ 2017-11-09 16:17     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:24PM +0530, Keerthy wrote:
> Move the dmtimer driver out of plat-omap to clocksource.
> So that non-omap devices also could use this.
> 
> No Code changes done to the driver file.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/plat-omap/Kconfig                            | 6 ------
>  arch/arm/plat-omap/Makefile                           | 1 -
>  drivers/clocksource/Kconfig                           | 6 ++++++
>  drivers/clocksource/Makefile                          | 1 +
>  {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
>  5 files changed, 7 insertions(+), 7 deletions(-)
>  rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)
> 
> diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> index 3e27bff..4b92ac5 100644
> --- a/arch/arm/plat-omap/Kconfig
> +++ b/arch/arm/plat-omap/Kconfig
> @@ -105,12 +105,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
>  	help
>  	  PPA routine service ID for setting L2 auxiliary control register.
>  
> -config OMAP_DM_TIMER
> -	bool "Use dual-mode timer"
> -	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> -	help
> -	 Select this option if you want to use OMAP Dual-Mode timers.
> -
>  config OMAP_SERIAL_WAKE
>  	bool "Enable wake-up events for serial ports"
>  	depends on ARCH_OMAP1 && OMAP_MUX
> diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
> index 47e1867..7215ada 100644
> --- a/arch/arm/plat-omap/Makefile
> +++ b/arch/arm/plat-omap/Makefile
> @@ -9,5 +9,4 @@ obj-y := sram.o dma.o counter_32k.o
>  
>  # omap_device support (OMAP2+ only at the moment)
>  
> -obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
>  obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index c729a88..4da66cf 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -46,6 +46,12 @@ config DIGICOLOR_TIMER
>  	help
>  	  Enables the support for the digicolor timer driver.
>  
> +config OMAP_DM_TIMER
> +	bool "Use dual-mode timer"
> +	depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> +	help
> +	 Select this option if you want to use Dual-Mode timers.
> +
>  config DW_APB_TIMER
>  	bool "DW APB timer driver" if COMPILE_TEST
>  	help
> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> index dbc1ad1..a8e51e6 100644
> --- a/drivers/clocksource/Makefile
> +++ b/drivers/clocksource/Makefile
> @@ -15,6 +15,7 @@ obj-$(CONFIG_EM_TIMER_STI)	+= em_sti.o
>  obj-$(CONFIG_CLKBLD_I8253)	+= i8253.o
>  obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
>  obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
> +obj-$(CONFIG_OMAP_DM_TIMER)	+= dmtimer.o
>  obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
>  obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
>  obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
> diff --git a/arch/arm/plat-omap/dmtimer.c b/drivers/clocksource/dmtimer.c
> similarity index 100%
> rename from arch/arm/plat-omap/dmtimer.c
> rename to drivers/clocksource/dmtimer.c
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/1b998f1b/attachment.sig>

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

* Re: [PATCH v2 4/7] dmtimer: Add timer ops to the platform data structure
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:27     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:27 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 3086 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:25PM +0530, Keerthy wrote:
> Add timer ops to the platform data structure
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

I think the solution to provide private functions is not very nice,
but it improves the current situation and does not touch any ABI (so
can easily be changed later on), so:

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
> index a19b78d..a3e1794 100644
> --- a/include/linux/platform_data/dmtimer-omap.h
> +++ b/include/linux/platform_data/dmtimer-omap.h
> @@ -20,12 +20,50 @@
>  #ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
>  #define __PLATFORM_DATA_DMTIMER_OMAP_H__
>  
> +struct omap_dm_timer_ops {
> +	struct omap_dm_timer *(*request_by_node)(struct device_node *np);
> +	struct omap_dm_timer *(*request_specific)(int timer_id);
> +	struct omap_dm_timer *(*request)(void);
> +
> +	int	(*free)(struct omap_dm_timer *timer);
> +
> +	void	(*enable)(struct omap_dm_timer *timer);
> +	void	(*disable)(struct omap_dm_timer *timer);
> +
> +	int	(*get_irq)(struct omap_dm_timer *timer);
> +	int	(*set_int_enable)(struct omap_dm_timer *timer,
> +				  unsigned int value);
> +	int	(*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
> +
> +	struct clk *(*get_fclk)(struct omap_dm_timer *timer);
> +
> +	int	(*start)(struct omap_dm_timer *timer);
> +	int	(*stop)(struct omap_dm_timer *timer);
> +	int	(*set_source)(struct omap_dm_timer *timer, int source);
> +
> +	int	(*set_load)(struct omap_dm_timer *timer, int autoreload,
> +			    unsigned int value);
> +	int	(*set_match)(struct omap_dm_timer *timer, int enable,
> +			     unsigned int match);
> +	int	(*set_pwm)(struct omap_dm_timer *timer, int def_on,
> +			   int toggle, int trigger);
> +	int	(*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
> +
> +	unsigned int (*read_counter)(struct omap_dm_timer *timer);
> +	int	(*write_counter)(struct omap_dm_timer *timer,
> +				 unsigned int value);
> +	unsigned int (*read_status)(struct omap_dm_timer *timer);
> +	int	(*write_status)(struct omap_dm_timer *timer,
> +				unsigned int value);
> +};
> +
>  struct dmtimer_platform_data {
>  	/* set_timer_src - Only used for OMAP1 devices */
>  	int (*set_timer_src)(struct platform_device *pdev, int source);
>  	u32 timer_capability;
>  	u32 timer_errata;
>  	int (*get_context_loss_count)(struct device *);
> +	struct omap_dm_timer_ops *timer_ops;
>  };
>  
>  #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 4/7] dmtimer: Add timer ops to the platform data structure
@ 2017-11-09 16:27     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:25PM +0530, Keerthy wrote:
> Add timer ops to the platform data structure
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

I think the solution to provide private functions is not very nice,
but it improves the current situation and does not touch any ABI (so
can easily be changed later on), so:

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
> index a19b78d..a3e1794 100644
> --- a/include/linux/platform_data/dmtimer-omap.h
> +++ b/include/linux/platform_data/dmtimer-omap.h
> @@ -20,12 +20,50 @@
>  #ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
>  #define __PLATFORM_DATA_DMTIMER_OMAP_H__
>  
> +struct omap_dm_timer_ops {
> +	struct omap_dm_timer *(*request_by_node)(struct device_node *np);
> +	struct omap_dm_timer *(*request_specific)(int timer_id);
> +	struct omap_dm_timer *(*request)(void);
> +
> +	int	(*free)(struct omap_dm_timer *timer);
> +
> +	void	(*enable)(struct omap_dm_timer *timer);
> +	void	(*disable)(struct omap_dm_timer *timer);
> +
> +	int	(*get_irq)(struct omap_dm_timer *timer);
> +	int	(*set_int_enable)(struct omap_dm_timer *timer,
> +				  unsigned int value);
> +	int	(*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
> +
> +	struct clk *(*get_fclk)(struct omap_dm_timer *timer);
> +
> +	int	(*start)(struct omap_dm_timer *timer);
> +	int	(*stop)(struct omap_dm_timer *timer);
> +	int	(*set_source)(struct omap_dm_timer *timer, int source);
> +
> +	int	(*set_load)(struct omap_dm_timer *timer, int autoreload,
> +			    unsigned int value);
> +	int	(*set_match)(struct omap_dm_timer *timer, int enable,
> +			     unsigned int match);
> +	int	(*set_pwm)(struct omap_dm_timer *timer, int def_on,
> +			   int toggle, int trigger);
> +	int	(*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
> +
> +	unsigned int (*read_counter)(struct omap_dm_timer *timer);
> +	int	(*write_counter)(struct omap_dm_timer *timer,
> +				 unsigned int value);
> +	unsigned int (*read_status)(struct omap_dm_timer *timer);
> +	int	(*write_status)(struct omap_dm_timer *timer,
> +				unsigned int value);
> +};
> +
>  struct dmtimer_platform_data {
>  	/* set_timer_src - Only used for OMAP1 devices */
>  	int (*set_timer_src)(struct platform_device *pdev, int source);
>  	u32 timer_capability;
>  	u32 timer_errata;
>  	int (*get_context_loss_count)(struct device *);
> +	struct omap_dm_timer_ops *timer_ops;
>  };
>  
>  #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/bed1490d/attachment-0001.sig>

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

* Re: [PATCH v2 5/7] clocksource: dmtimer: Populate the timer ops to the pdata
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:28     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:28 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:26PM +0530, Keerthy wrote:
> Add the timer ops to the platform data
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/clocksource/dmtimer.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/clocksource/dmtimer.c b/drivers/clocksource/dmtimer.c
> index afe1dc9..1cbd954 100644
> --- a/drivers/clocksource/dmtimer.c
> +++ b/drivers/clocksource/dmtimer.c
> @@ -922,8 +922,33 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
>  	return ret;
>  }
>  
> +static struct omap_dm_timer_ops dmtimer_ops = {
> +	.request_by_node = omap_dm_timer_request_by_node,
> +	.request_specific = omap_dm_timer_request_specific,
> +	.request = omap_dm_timer_request,
> +	.set_source = omap_dm_timer_set_source,
> +	.get_irq = omap_dm_timer_get_irq,
> +	.set_int_enable = omap_dm_timer_set_int_enable,
> +	.set_int_disable = omap_dm_timer_set_int_disable,
> +	.free = omap_dm_timer_free,
> +	.enable = omap_dm_timer_enable,
> +	.disable = omap_dm_timer_disable,
> +	.get_fclk = omap_dm_timer_get_fclk,
> +	.start = omap_dm_timer_start,
> +	.stop = omap_dm_timer_stop,
> +	.set_load = omap_dm_timer_set_load,
> +	.set_match = omap_dm_timer_set_match,
> +	.set_pwm = omap_dm_timer_set_pwm,
> +	.set_prescaler = omap_dm_timer_set_prescaler,
> +	.read_counter = omap_dm_timer_read_counter,
> +	.write_counter = omap_dm_timer_write_counter,
> +	.read_status = omap_dm_timer_read_status,
> +	.write_status = omap_dm_timer_write_status,
> +};
> +
>  static const struct dmtimer_platform_data omap3plus_pdata = {
>  	.timer_errata = OMAP_TIMER_ERRATA_I103_I767,
> +	.timer_ops = &dmtimer_ops,
>  };
>  
>  static const struct of_device_id omap_timer_match[] = {
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 5/7] clocksource: dmtimer: Populate the timer ops to the pdata
@ 2017-11-09 16:28     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:26PM +0530, Keerthy wrote:
> Add the timer ops to the platform data
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/clocksource/dmtimer.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/clocksource/dmtimer.c b/drivers/clocksource/dmtimer.c
> index afe1dc9..1cbd954 100644
> --- a/drivers/clocksource/dmtimer.c
> +++ b/drivers/clocksource/dmtimer.c
> @@ -922,8 +922,33 @@ static int omap_dm_timer_remove(struct platform_device *pdev)
>  	return ret;
>  }
>  
> +static struct omap_dm_timer_ops dmtimer_ops = {
> +	.request_by_node = omap_dm_timer_request_by_node,
> +	.request_specific = omap_dm_timer_request_specific,
> +	.request = omap_dm_timer_request,
> +	.set_source = omap_dm_timer_set_source,
> +	.get_irq = omap_dm_timer_get_irq,
> +	.set_int_enable = omap_dm_timer_set_int_enable,
> +	.set_int_disable = omap_dm_timer_set_int_disable,
> +	.free = omap_dm_timer_free,
> +	.enable = omap_dm_timer_enable,
> +	.disable = omap_dm_timer_disable,
> +	.get_fclk = omap_dm_timer_get_fclk,
> +	.start = omap_dm_timer_start,
> +	.stop = omap_dm_timer_stop,
> +	.set_load = omap_dm_timer_set_load,
> +	.set_match = omap_dm_timer_set_match,
> +	.set_pwm = omap_dm_timer_set_pwm,
> +	.set_prescaler = omap_dm_timer_set_prescaler,
> +	.read_counter = omap_dm_timer_read_counter,
> +	.write_counter = omap_dm_timer_write_counter,
> +	.read_status = omap_dm_timer_read_status,
> +	.write_status = omap_dm_timer_write_status,
> +};
> +
>  static const struct dmtimer_platform_data omap3plus_pdata = {
>  	.timer_errata = OMAP_TIMER_ERRATA_I103_I767,
> +	.timer_ops = &dmtimer_ops,
>  };
>  
>  static const struct of_device_id omap_timer_match[] = {
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/0279db09/attachment.sig>

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

* Re: [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:28     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:28 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 3561 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:27PM +0530, Keerthy wrote:
> Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
> index 5ad42f3..3b27aff 100644
> --- a/drivers/pwm/pwm-omap-dmtimer.c
> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -23,6 +23,7 @@
>  #include <linux/mutex.h>
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/platform_data/dmtimer-omap.h>
>  #include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
>  	struct pwm_chip chip;
>  	struct mutex mutex;
>  	pwm_omap_dmtimer *dm_timer;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct omap_dm_timer_ops *pdata;
>  	struct platform_device *dm_timer_pdev;
>  };
>  
> @@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  {
>  	struct device_node *np = pdev->dev.of_node;
>  	struct device_node *timer;
> +	struct platform_device *timer_pdev;
>  	struct pwm_omap_dmtimer_chip *omap;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct dmtimer_platform_data *timer_pdata;
> +	struct omap_dm_timer_ops *pdata;
>  	pwm_omap_dmtimer *dm_timer;
>  	u32 v;
>  	int status;
>  
> -	pdata = dev_get_platdata(&pdev->dev);
> -	if (!pdata) {
> -		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
> +	timer = of_parse_phandle(np, "ti,timers", 0);
> +	if (!timer)
> +		return -ENODEV;
> +
> +	timer_pdev = of_find_device_by_node(timer);
> +	if (!timer_pdev) {
> +		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
> +		return -ENODEV;
> +	}
> +
> +	timer_pdata = dev_get_platdata(&timer_pdev->dev);
> +	if (!timer_pdata) {
> +		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
>  		return -EINVAL;
>  	}
>  
> -	if (!pdata->request_by_node ||
> +	pdata = timer_pdata->timer_ops;
> +
> +	if (!pdata || !pdata->request_by_node ||
>  	    !pdata->free ||
>  	    !pdata->enable ||
>  	    !pdata->disable ||
> @@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> -	timer = of_parse_phandle(np, "ti,timers", 0);
> -	if (!timer)
> -		return -ENODEV;
> -
>  	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
>  		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
>  		return -ENODEV;
> @@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  
>  	omap->pdata = pdata;
>  	omap->dm_timer = dm_timer;
> -
> -	omap->dm_timer_pdev = of_find_device_by_node(timer);
> -	if (!omap->dm_timer_pdev) {
> -		dev_err(&pdev->dev, "Unable to find timer pdev\n");
> -		omap->pdata->free(dm_timer);
> -		return -EINVAL;
> -	}
> +	omap->dm_timer_pdev = timer_pdev;
>  
>  	/*
>  	 * Ensure that the timer is stopped before we allow PWM core to call
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
@ 2017-11-09 16:28     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:27PM +0530, Keerthy wrote:
> Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
> index 5ad42f3..3b27aff 100644
> --- a/drivers/pwm/pwm-omap-dmtimer.c
> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -23,6 +23,7 @@
>  #include <linux/mutex.h>
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> +#include <linux/platform_data/dmtimer-omap.h>
>  #include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> @@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
>  	struct pwm_chip chip;
>  	struct mutex mutex;
>  	pwm_omap_dmtimer *dm_timer;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct omap_dm_timer_ops *pdata;
>  	struct platform_device *dm_timer_pdev;
>  };
>  
> @@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  {
>  	struct device_node *np = pdev->dev.of_node;
>  	struct device_node *timer;
> +	struct platform_device *timer_pdev;
>  	struct pwm_omap_dmtimer_chip *omap;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct dmtimer_platform_data *timer_pdata;
> +	struct omap_dm_timer_ops *pdata;
>  	pwm_omap_dmtimer *dm_timer;
>  	u32 v;
>  	int status;
>  
> -	pdata = dev_get_platdata(&pdev->dev);
> -	if (!pdata) {
> -		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
> +	timer = of_parse_phandle(np, "ti,timers", 0);
> +	if (!timer)
> +		return -ENODEV;
> +
> +	timer_pdev = of_find_device_by_node(timer);
> +	if (!timer_pdev) {
> +		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
> +		return -ENODEV;
> +	}
> +
> +	timer_pdata = dev_get_platdata(&timer_pdev->dev);
> +	if (!timer_pdata) {
> +		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
>  		return -EINVAL;
>  	}
>  
> -	if (!pdata->request_by_node ||
> +	pdata = timer_pdata->timer_ops;
> +
> +	if (!pdata || !pdata->request_by_node ||
>  	    !pdata->free ||
>  	    !pdata->enable ||
>  	    !pdata->disable ||
> @@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> -	timer = of_parse_phandle(np, "ti,timers", 0);
> -	if (!timer)
> -		return -ENODEV;
> -
>  	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
>  		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
>  		return -ENODEV;
> @@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>  
>  	omap->pdata = pdata;
>  	omap->dm_timer = dm_timer;
> -
> -	omap->dm_timer_pdev = of_find_device_by_node(timer);
> -	if (!omap->dm_timer_pdev) {
> -		dev_err(&pdev->dev, "Unable to find timer pdev\n");
> -		omap->pdata->free(dm_timer);
> -		return -EINVAL;
> -	}
> +	omap->dm_timer_pdev = timer_pdev;
>  
>  	/*
>  	 * Ensure that the timer is stopped before we allow PWM core to call
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/9a852f43/attachment.sig>

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

* Re: [PATCH v2 7/7] arm: omap: pdata-quirks: Remove unused timer pdata
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 16:29     ` Sebastian Reichel
  -1 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:29 UTC (permalink / raw)
  To: Keerthy
  Cc: tony, aaro.koskinen, thierry.reding, khilman, daniel.lezcano,
	linux, linux-omap, linux-arm-kernel, linux-pwm

[-- Attachment #1: Type: text/plain, Size: 3153 bytes --]

Hi,

On Wed, Nov 08, 2017 at 05:58:28PM +0530, Keerthy wrote:
> Remove unused timer pdata.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/mach-omap2/pdata-quirks.c | 32 --------------------------------
>  1 file changed, 32 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index ad9df86..e7d7fc7 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -24,10 +24,8 @@
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/iommu-omap.h>
>  #include <linux/platform_data/wkup_m3.h>
> -#include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_data/media/ir-rx51.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <clocksource/dmtimer.h>
>  
>  #include "common.h"
>  #include "common-board-devices.h"
> @@ -477,33 +475,6 @@ void omap_auxdata_legacy_init(struct device *dev)
>  	dev->platform_data = &twl_gpio_auxdata;
>  }
>  
> -/* Dual mode timer PWM callbacks platdata */
> -#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
> -static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
> -	.request_by_node = omap_dm_timer_request_by_node,
> -	.request_specific = omap_dm_timer_request_specific,
> -	.request = omap_dm_timer_request,
> -	.set_source = omap_dm_timer_set_source,
> -	.get_irq = omap_dm_timer_get_irq,
> -	.set_int_enable = omap_dm_timer_set_int_enable,
> -	.set_int_disable = omap_dm_timer_set_int_disable,
> -	.free = omap_dm_timer_free,
> -	.enable = omap_dm_timer_enable,
> -	.disable = omap_dm_timer_disable,
> -	.get_fclk = omap_dm_timer_get_fclk,
> -	.start = omap_dm_timer_start,
> -	.stop = omap_dm_timer_stop,
> -	.set_load = omap_dm_timer_set_load,
> -	.set_match = omap_dm_timer_set_match,
> -	.set_pwm = omap_dm_timer_set_pwm,
> -	.set_prescaler = omap_dm_timer_set_prescaler,
> -	.read_counter = omap_dm_timer_read_counter,
> -	.write_counter = omap_dm_timer_write_counter,
> -	.read_status = omap_dm_timer_read_status,
> -	.write_status = omap_dm_timer_write_status,
> -};
> -#endif
> -
>  static struct ir_rx51_platform_data __maybe_unused rx51_ir_data = {
>  	.set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
>  };
> @@ -572,9 +543,6 @@ static void __init omap3_mcbsp_init(void) {}
>  	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
>  		       &wkup_m3_data),
>  #endif
> -#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
> -	OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
> -#endif
>  #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
>  	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
>  		       &omap4_iommu_pdata),
> -- 
> 1.9.1
> 
> --
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2 7/7] arm: omap: pdata-quirks: Remove unused timer pdata
@ 2017-11-09 16:29     ` Sebastian Reichel
  0 siblings, 0 replies; 48+ messages in thread
From: Sebastian Reichel @ 2017-11-09 16:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Nov 08, 2017 at 05:58:28PM +0530, Keerthy wrote:
> Remove unused timer pdata.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  arch/arm/mach-omap2/pdata-quirks.c | 32 --------------------------------
>  1 file changed, 32 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index ad9df86..e7d7fc7 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -24,10 +24,8 @@
>  #include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/iommu-omap.h>
>  #include <linux/platform_data/wkup_m3.h>
> -#include <linux/platform_data/pwm_omap_dmtimer.h>
>  #include <linux/platform_data/media/ir-rx51.h>
>  #include <linux/platform_data/asoc-ti-mcbsp.h>
> -#include <clocksource/dmtimer.h>
>  
>  #include "common.h"
>  #include "common-board-devices.h"
> @@ -477,33 +475,6 @@ void omap_auxdata_legacy_init(struct device *dev)
>  	dev->platform_data = &twl_gpio_auxdata;
>  }
>  
> -/* Dual mode timer PWM callbacks platdata */
> -#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
> -static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
> -	.request_by_node = omap_dm_timer_request_by_node,
> -	.request_specific = omap_dm_timer_request_specific,
> -	.request = omap_dm_timer_request,
> -	.set_source = omap_dm_timer_set_source,
> -	.get_irq = omap_dm_timer_get_irq,
> -	.set_int_enable = omap_dm_timer_set_int_enable,
> -	.set_int_disable = omap_dm_timer_set_int_disable,
> -	.free = omap_dm_timer_free,
> -	.enable = omap_dm_timer_enable,
> -	.disable = omap_dm_timer_disable,
> -	.get_fclk = omap_dm_timer_get_fclk,
> -	.start = omap_dm_timer_start,
> -	.stop = omap_dm_timer_stop,
> -	.set_load = omap_dm_timer_set_load,
> -	.set_match = omap_dm_timer_set_match,
> -	.set_pwm = omap_dm_timer_set_pwm,
> -	.set_prescaler = omap_dm_timer_set_prescaler,
> -	.read_counter = omap_dm_timer_read_counter,
> -	.write_counter = omap_dm_timer_write_counter,
> -	.read_status = omap_dm_timer_read_status,
> -	.write_status = omap_dm_timer_write_status,
> -};
> -#endif
> -
>  static struct ir_rx51_platform_data __maybe_unused rx51_ir_data = {
>  	.set_max_mpu_wakeup_lat = omap_pm_set_max_mpu_wakeup_lat,
>  };
> @@ -572,9 +543,6 @@ static void __init omap3_mcbsp_init(void) {}
>  	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
>  		       &wkup_m3_data),
>  #endif
> -#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
> -	OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
> -#endif
>  #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
>  	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
>  		       &omap4_iommu_pdata),
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171109/71320ddc/attachment.sig>

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

* Re: [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  2017-11-08 12:28   ` Keerthy
@ 2017-11-09 21:15     ` Grygorii Strashko
  -1 siblings, 0 replies; 48+ messages in thread
From: Grygorii Strashko @ 2017-11-09 21:15 UTC (permalink / raw)
  To: Keerthy, tony, aaro.koskinen, thierry.reding
  Cc: khilman, daniel.lezcano, linux, linux-omap, linux-arm-kernel,
	linux-pwm, sebastian.reichel



On 11/08/2017 06:28 AM, Keerthy wrote:
> Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.
> 
>   drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
>   1 file changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
> index 5ad42f3..3b27aff 100644
> --- a/drivers/pwm/pwm-omap-dmtimer.c
> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -23,6 +23,7 @@
>   #include <linux/mutex.h>
>   #include <linux/of.h>
>   #include <linux/of_platform.h>
> +#include <linux/platform_data/dmtimer-omap.h>
>   #include <linux/platform_data/pwm_omap_dmtimer.h>
>   #include <linux/platform_device.h>
>   #include <linux/pm_runtime.h>
> @@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
>   	struct pwm_chip chip;
>   	struct mutex mutex;
>   	pwm_omap_dmtimer *dm_timer;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct omap_dm_timer_ops *pdata;
>   	struct platform_device *dm_timer_pdev;
>   };
>   
> @@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   {
>   	struct device_node *np = pdev->dev.of_node;
>   	struct device_node *timer;
> +	struct platform_device *timer_pdev;
>   	struct pwm_omap_dmtimer_chip *omap;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct dmtimer_platform_data *timer_pdata;
> +	struct omap_dm_timer_ops *pdata;
>   	pwm_omap_dmtimer *dm_timer;
>   	u32 v;
>   	int status;
>   
> -	pdata = dev_get_platdata(&pdev->dev);
> -	if (!pdata) {
> -		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
> +	timer = of_parse_phandle(np, "ti,timers", 0);
> +	if (!timer)
> +		return -ENODEV;
> +
> +	timer_pdev = of_find_device_by_node(timer);
> +	if (!timer_pdev) {
> +		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
> +		return -ENODEV;
> +	}
> +
> +	timer_pdata = dev_get_platdata(&timer_pdev->dev);
> +	if (!timer_pdata) {
> +		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
>   		return -EINVAL;
>   	}

I really do not like above code :( It seems need to be hidden
inside some OF helper.

>   
> -	if (!pdata->request_by_node ||
> +	pdata = timer_pdata->timer_ops;
> +
> +	if (!pdata || !pdata->request_by_node ||
>   	    !pdata->free ||
>   	    !pdata->enable ||
>   	    !pdata->disable ||
> @@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   	}
>   
> -	timer = of_parse_phandle(np, "ti,timers", 0);
> -	if (!timer)
> -		return -ENODEV;
> -
>   	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
>   		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
>   		return -ENODEV;
> @@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   
>   	omap->pdata = pdata;
>   	omap->dm_timer = dm_timer;
> -
> -	omap->dm_timer_pdev = of_find_device_by_node(timer);
> -	if (!omap->dm_timer_pdev) {
> -		dev_err(&pdev->dev, "Unable to find timer pdev\n");
> -		omap->pdata->free(dm_timer);
> -		return -EINVAL;
> -	}
> +	omap->dm_timer_pdev = timer_pdev;
>   
>   	/*
>   	 * Ensure that the timer is stopped before we allow PWM core to call
> 

-- 
regards,
-grygorii

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

* [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
@ 2017-11-09 21:15     ` Grygorii Strashko
  0 siblings, 0 replies; 48+ messages in thread
From: Grygorii Strashko @ 2017-11-09 21:15 UTC (permalink / raw)
  To: linux-arm-kernel



On 11/08/2017 06:28 AM, Keerthy wrote:
> Adapt driver to utilize dmtimer pdata ops instead of pdata-quirks.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> 
> No code changes in this v2 version. Only enhanced patch
> statistics for renames.
> 
>   drivers/pwm/pwm-omap-dmtimer.c | 39 ++++++++++++++++++++++-----------------
>   1 file changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
> index 5ad42f3..3b27aff 100644
> --- a/drivers/pwm/pwm-omap-dmtimer.c
> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -23,6 +23,7 @@
>   #include <linux/mutex.h>
>   #include <linux/of.h>
>   #include <linux/of_platform.h>
> +#include <linux/platform_data/dmtimer-omap.h>
>   #include <linux/platform_data/pwm_omap_dmtimer.h>
>   #include <linux/platform_device.h>
>   #include <linux/pm_runtime.h>
> @@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
>   	struct pwm_chip chip;
>   	struct mutex mutex;
>   	pwm_omap_dmtimer *dm_timer;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct omap_dm_timer_ops *pdata;
>   	struct platform_device *dm_timer_pdev;
>   };
>   
> @@ -242,19 +243,33 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   {
>   	struct device_node *np = pdev->dev.of_node;
>   	struct device_node *timer;
> +	struct platform_device *timer_pdev;
>   	struct pwm_omap_dmtimer_chip *omap;
> -	struct pwm_omap_dmtimer_pdata *pdata;
> +	struct dmtimer_platform_data *timer_pdata;
> +	struct omap_dm_timer_ops *pdata;
>   	pwm_omap_dmtimer *dm_timer;
>   	u32 v;
>   	int status;
>   
> -	pdata = dev_get_platdata(&pdev->dev);
> -	if (!pdata) {
> -		dev_err(&pdev->dev, "Missing dmtimer platform data\n");
> +	timer = of_parse_phandle(np, "ti,timers", 0);
> +	if (!timer)
> +		return -ENODEV;
> +
> +	timer_pdev = of_find_device_by_node(timer);
> +	if (!timer_pdev) {
> +		dev_err(&pdev->dev, "Unable to find Timer pdev\n");
> +		return -ENODEV;
> +	}
> +
> +	timer_pdata = dev_get_platdata(&timer_pdev->dev);
> +	if (!timer_pdata) {
> +		dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
>   		return -EINVAL;
>   	}

I really do not like above code :( It seems need to be hidden
inside some OF helper.

>   
> -	if (!pdata->request_by_node ||
> +	pdata = timer_pdata->timer_ops;
> +
> +	if (!pdata || !pdata->request_by_node ||
>   	    !pdata->free ||
>   	    !pdata->enable ||
>   	    !pdata->disable ||
> @@ -270,10 +285,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   	}
>   
> -	timer = of_parse_phandle(np, "ti,timers", 0);
> -	if (!timer)
> -		return -ENODEV;
> -
>   	if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
>   		dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
>   		return -ENODEV;
> @@ -291,13 +302,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
>   
>   	omap->pdata = pdata;
>   	omap->dm_timer = dm_timer;
> -
> -	omap->dm_timer_pdev = of_find_device_by_node(timer);
> -	if (!omap->dm_timer_pdev) {
> -		dev_err(&pdev->dev, "Unable to find timer pdev\n");
> -		omap->pdata->free(dm_timer);
> -		return -EINVAL;
> -	}
> +	omap->dm_timer_pdev = timer_pdev;
>   
>   	/*
>   	 * Ensure that the timer is stopped before we allow PWM core to call
> 

-- 
regards,
-grygorii

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

end of thread, other threads:[~2017-11-09 21:16 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 12:28 [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap Keerthy
2017-11-08 12:28 ` Keerthy
2017-11-08 12:28 ` [PATCH v2 1/7] clocksource: dmtimer: Remove all the exports Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:13   ` Sebastian Reichel
2017-11-09 16:13     ` Sebastian Reichel
2017-11-08 12:28 ` [PATCH v2 2/7] arm: omap: Move dmtimer.h out of plat-omap Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-08 16:42   ` Tony Lindgren
2017-11-08 16:42     ` Tony Lindgren
2017-11-09  4:25     ` Keerthy
2017-11-09  4:25       ` Keerthy
2017-11-09  8:06       ` Keerthy
2017-11-09  8:06         ` Keerthy
2017-11-09 14:52         ` Tony Lindgren
2017-11-09 14:52           ` Tony Lindgren
2017-11-09 16:16   ` Sebastian Reichel
2017-11-09 16:16     ` Sebastian Reichel
2017-11-08 12:28 ` [PATCH v2 3/7] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:17   ` Sebastian Reichel
2017-11-09 16:17     ` Sebastian Reichel
2017-11-08 12:28 ` [PATCH v2 4/7] dmtimer: Add timer ops to the platform data structure Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:27   ` Sebastian Reichel
2017-11-09 16:27     ` Sebastian Reichel
2017-11-08 12:28 ` [PATCH v2 5/7] clocksource: dmtimer: Populate the timer ops to the pdata Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:28   ` Sebastian Reichel
2017-11-09 16:28     ` Sebastian Reichel
2017-11-08 12:28 ` [PATCH v2 6/7] pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:28   ` Sebastian Reichel
2017-11-09 16:28     ` Sebastian Reichel
2017-11-09 21:15   ` Grygorii Strashko
2017-11-09 21:15     ` Grygorii Strashko
2017-11-08 12:28 ` [PATCH v2 7/7] arm: omap: pdata-quirks: Remove unused timer pdata Keerthy
2017-11-08 12:28   ` Keerthy
2017-11-09 16:29   ` Sebastian Reichel
2017-11-09 16:29     ` Sebastian Reichel
2017-11-08 12:51 ` [PATCH v2 0/7] omap: dmtimer: Move driver out of plat-omap Ladislav Michl
2017-11-08 12:51   ` Ladislav Michl
2017-11-09  4:31   ` Keerthy
2017-11-09  4:31     ` Keerthy
2017-11-09  4:41     ` Keerthy
2017-11-09  4:41       ` Keerthy
2017-11-08 22:57 ` Tony Lindgren
2017-11-08 22:57   ` 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.