ARM: OMAP: Clean-up DMTIMER
Subsystems (7)
cover ARM: OMAP: Clean-up DMTIMER
This series cleans-up the DMTIMER code and moves the DMTIMER header from plat/dmtimer.h to plat-omap/dmtimer.h in preparation for single zImage support.
This series in based upon DMTIMER fixes series [1].
Tested on OMAP5912 OSK, OMAP3430 Beagle and OMAP4430 Panda. Testing includes ...
1. Booting kernel on above boards
2. Checking the timer counter is incrementing when configuring and starting a timer
3. Checking the timer overflow interrupt when timer expires.
4. Using different clock sources to operate the timer with.
This has also been boot tested on the AM335x Beagle Bone.
[1] http://marc.info/?l=linux-omap&m=135275633628412&w=2
Jon Hunter (8):
ARM: OMAP: Clean-up dmtimer reset code
ARM: OMAP: Define omap_dm_timer_prepare function as static
ARM: OMAP: Don't store timers physical address
ARM: OMAP2+: Remove unnecessary local variable in timer code
ARM: OMAP: Remove unnecessary omap_dm_timer structure declaration
ARM: OMAP: Add platform data header for DMTIMERs
ARM: OMAP: Remove unnecessary inclusion of dmtimer.h
ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
arch/arm/mach-omap1/pm.c | 2 +- arch/arm/mach-omap1/timer.c | 3 +- arch/arm/mach-omap1/timer32k.c | 1 - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - 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/pm-debug.c | 1 - arch/arm/mach-omap2/timer.c | 28 +- arch/arm/plat-omap/dmtimer.c | 56 ++- arch/arm/plat-omap/include/plat-omap/dmtimer.h | 420 ++++++++++++++++++ arch/arm/plat-omap/include/plat/dmtimer.h | 450 -------------------- drivers/staging/tidspbridge/core/dsp-clock.c | 2 +- drivers/staging/tidspbridge/core/ue_deh.c | 1 - include/linux/platform_data/dmtimer-omap.h | 31 ++ 16 files changed, 506 insertions(+), 497 deletions(-) create mode 100644 arch/arm/plat-omap/include/plat-omap/dmtimer.h delete mode 100644 arch/arm/plat-omap/include/plat/dmtimer.h create mode 100644 include/linux/platform_data/dmtimer-omap.h
Signature · 1 line
1.7.9.5
PATCH 1/8 ARM: OMAP: Clean-up dmtimer reset code
Only OMAP1 devices use the omap_dm_timer_reset() and so require the omap_dm_timer_wait_for_reset() and __omap_dm_timer_reset() functions. Therefore combine these into a single function called omap_dm_timer_reset() and simplify the code.
The omap_dm_timer_reset() function is now the only place that is using the omap_dm_timer structure member "sys_stat". Therefore, remove this member and just use the register offset definition to simplify and clean-up the code. The TISTAT register is only present on revision 1 timers and so check for this in the omap_dm_timer_reset() function.
Please note that for OMAP1 devices, the TIOCP_CFG register does not have the clock-activity field and so when we reset the timer for an OMAP1 device we only need to configure the idle-mode field in the TIOCP_CFG register.
--- arch/arm/plat-omap/dmtimer.c | 50 ++++++++++++++++++----------- arch/arm/plat-omap/include/plat/dmtimer.h | 23 ------------- 2 files changed, 31 insertions(+), 42 deletions(-)
arch/arm/plat-omap/dmtimer.c +31 -19
@@ -99,32 +99,39 @@ static void omap_timer_restore_context(struct omap_dm_timer *timer) timer->context.tclr); } -static void omap_dm_timer_wait_for_reset (struct omap_dm_timer *timer) +static int omap_dm_timer_reset (struct omap_dm_timer *timer) { -int c; +u32 l, timeout =100000 ; -if (!timer->sys_stat) -return ; +if (timer->revision !=1 ) +return -EINVAL ; - c =0 ; -while (!(__raw_readl (timer->sys_stat) &1 )) { - c++; -if (c >100000 ) { -printk (KERN_ERR "Timer failed to reset\n" ); -return ; - } +omap_dm_timer_write_reg (timer,OMAP_TIMER_IF_CTRL_REG ,0x06 ); + +do { + l =__omap_dm_timer_read (timer, +OMAP_TIMER_V1_SYS_STAT_OFFSET ,0 ); + }while (!l && timeout--); + +if (!timeout) { +dev_err (&timer->pdev->dev,"Timer failed to reset\n" ); +return -ETIMEDOUT ; } -} -static void omap_dm_timer_reset (struct omap_dm_timer *timer) -{ -omap_dm_timer_write_reg (timer,OMAP_TIMER_IF_CTRL_REG ,0x06 ); -omap_dm_timer_wait_for_reset (timer); -__omap_dm_timer_reset (timer,0 ,0 ); +/* Configure timer for smart-idle mode */ + l =__omap_dm_timer_read (timer,OMAP_TIMER_OCP_CFG_OFFSET ,0 ); + l |=0x2 <<0x3 ; +__omap_dm_timer_write (timer,OMAP_TIMER_OCP_CFG_OFFSET , l,0 ); + + timer->posted =0 ; + +return 0 ; }int omap_dm_timer_prepare (struct omap_dm_timer *timer) { +int rc; +/* * FIXME: OMAP1 devices do not use the clock framework for dmtimers so * do not call clk_get() for these devices.
@@ -140,8 +147,13 @@ int omap_dm_timer_prepare(struct omap_dm_timer *timer)omap_dm_timer_enable (timer); -if (timer->capability &OMAP_TIMER_NEEDS_RESET ) -omap_dm_timer_reset (timer); +if (timer->capability &OMAP_TIMER_NEEDS_RESET ) { + rc =omap_dm_timer_reset (timer); +if (rc) { +omap_dm_timer_disable (timer); +return rc; + } + }__omap_dm_timer_enable_posted (timer);omap_dm_timer_disable (timer);
arch/arm/plat-omap/include/plat/dmtimer.h +0 -23
@@ -267,7 +267,6 @@ struct omap_dm_timer {struct clk *fclk;void __iomem *io_base; -void __iomem *sys_stat;/* TISTAT timer status */ void __iomem *irq_stat;/* TISR/IRQSTATUS interrupt status */ void __iomem *irq_ena;/* irq enable */ void __iomem *irq_dis;/* irq disable, only on v2 ip */
@@ -317,8 +316,6 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) tidr =__raw_readl (timer->io_base);if (!(tidr >>16 )) { timer->revision =1 ; - timer->sys_stat = timer->io_base + -OMAP_TIMER_V1_SYS_STAT_OFFSET ; timer->irq_stat = timer->io_base +OMAP_TIMER_V1_STAT_OFFSET ; timer->irq_ena = timer->io_base +OMAP_TIMER_V1_INT_EN_OFFSET ; timer->irq_dis = timer->io_base +OMAP_TIMER_V1_INT_EN_OFFSET ;
@@ -326,7 +323,6 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) timer->func_base = timer->io_base; }else { timer->revision =2 ; - timer->sys_stat =NULL ; timer->irq_stat = timer->io_base +OMAP_TIMER_V2_IRQSTATUS ; timer->irq_ena = timer->io_base +OMAP_TIMER_V2_IRQENABLE_SET ; timer->irq_dis = timer->io_base +OMAP_TIMER_V2_IRQENABLE_CLR ;
@@ -337,25 +333,6 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) } } -/* Assumes the source clock has been set by caller */ -static inline void __omap_dm_timer_reset (struct omap_dm_timer *timer, -int autoidle,int wakeup) -{ -u32 l; - - l =__raw_readl (timer->io_base +OMAP_TIMER_OCP_CFG_OFFSET ); - l |=0x02 <<3 ;/* Set to smart-idle mode */ - l |=0x2 <<8 ;/* Set clock activity to perserve f-clock on idle */ - -if (autoidle) - l |=0x1 <<0 ; - -if (wakeup) - l |=1 <<2 ; - -__raw_writel (l, timer->io_base +OMAP_TIMER_OCP_CFG_OFFSET ); -} -/* * __omap_dm_timer_enable_posted - enables write posted mode * @timer: pointer to timer instance handle
Signature · 1 line
1.7.9.5
PATCH 2/8 ARM: OMAP: Define omap_dm_timer_prepare function as static
In reply to Jon HunterThe omap_dm_timer_prepare function is a local function only used in the dmtimer.c file. Therefore, make this a static function and remove its declaration from the dmtimer.h file.
--- arch/arm/plat-omap/dmtimer.c | 2 +- arch/arm/plat-omap/include/plat/dmtimer.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
arch/arm/plat-omap/dmtimer.c +1 -1
@@ -128,7 +128,7 @@ static int omap_dm_timer_reset(struct omap_dm_timer *timer)return 0 ; } -int omap_dm_timer_prepare (struct omap_dm_timer *timer) +static int omap_dm_timer_prepare (struct omap_dm_timer *timer) {int rc;
arch/arm/plat-omap/include/plat/dmtimer.h +0 -2
@@ -286,8 +286,6 @@ struct omap_dm_timer {struct list_head node; }; -int omap_dm_timer_prepare (struct omap_dm_timer *timer); -static inline u32 __omap_dm_timer_read (struct omap_dm_timer *timer,u32 reg,int posted) {
Signature · 1 line
1.7.9.5
PATCH 3/8 ARM: OMAP: Don't store timers physical address
In reply to Jon HunterThe OMAP2+ system timer code stores the physical address of the timer but never uses it. Remove this and clean-up the code by removing the local variable "size" and changing the names of the local variables mem_rsrc and irq_rsrc to mem and irq, respectively.
--- arch/arm/mach-omap2/timer.c | 13 +++++-------- arch/arm/plat-omap/include/plat/dmtimer.h | 1 - 2 files changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/timer.c +5 -8
@@ -245,8 +245,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,const char *oh_name;struct device_node *np;struct omap_hwmod *oh; -struct resource irq_rsrc, mem_rsrc; -size_t size; +struct resource irq, mem;int res =0 ;int r;
@@ -280,20 +279,18 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,if (!of_have_populated_dt ()) { r =omap_hwmod_get_resource_byname (oh,IORESOURCE_IRQ ,NULL , - &irq_rsrc); + &irq);if (r)return -ENXIO ; - timer->irq = irq_rsrc.start; + timer->irq = irq.start; r =omap_hwmod_get_resource_byname (oh,IORESOURCE_MEM ,NULL , - &mem_rsrc); + &mem);if (r)return -ENXIO ; - timer->phys_base = mem_rsrc.start; - size = mem_rsrc.end - mem_rsrc.start;/* Static mapping, never released */ - timer->io_base =ioremap (timer->phys_base, size); + timer->io_base =ioremap (mem.start, mem.end - mem.start); }if (!timer->io_base)
arch/arm/plat-omap/include/plat/dmtimer.h +0 -1
@@ -261,7 +261,6 @@ int omap_dm_timers_active(void); (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))struct omap_dm_timer { -unsigned long phys_base;int id;int irq;struct clk *fclk;
Signature · 1 line
1.7.9.5
PATCH 4/8 ARM: OMAP2+: Remove unnecessary local variable in timer code
In reply to Jon HunterThe function omap_dm_timer_init_one() declares two local variables of type int that are used to store the return value of functions called. One such local variable is sufficient and so remove one of these local variables.
--- arch/arm/mach-omap2/timer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/timer.c +5 -6
@@ -246,8 +246,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,struct device_node *np;struct omap_hwmod *oh;struct resource irq, mem; -int res =0 ; -int r; +int r =0 ;if (of_have_populated_dt ()) { np =omap_get_timer_dt (omap_timer_match,NULL );
@@ -307,10 +306,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, src =clk_get (NULL , fck_source);if (IS_ERR (src)) { - res = -EINVAL ; + r = -EINVAL ; }else { - res =clk_set_parent (timer->fclk, src); -if (IS_ERR_VALUE (res)) + r =clk_set_parent (timer->fclk, src); +if (IS_ERR_VALUE (r))pr_warn ("%s: %s cannot set source\n" , __func__, oh->name);clk_put (src);
@@ -331,7 +330,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, timer->rate =clk_get_rate (timer->fclk); timer->reserved =1 ; -return res; +return r; } static void __init omap2_gp_clockevent_init(int gptimer_id,
Signature · 1 line
1.7.9.5
PATCH 5/8 ARM: OMAP: Remove unnecessary omap_dm_timer structure declaration
In reply to Jon HunterRemove unnecessary declaration of structure omap_dm_timer from dmtimer.h and move the actual declaration of structure omap_dm_timer towards top of dmtimer.h to avoid any compilation errors.
--- arch/arm/plat-omap/include/plat/dmtimer.h | 52 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 27 deletions(-)
arch/arm/plat-omap/include/plat/dmtimer.h +25 -27
@@ -79,8 +79,6 @@ struct omap_timer_capability_dev_attr {u32 timer_capability; }; -struct omap_dm_timer ; -struct timer_regs {u32 tidr;u32 tier;
@@ -101,6 +99,31 @@ struct timer_regs {u32 towr; }; +struct omap_dm_timer { +int id; +int irq; +struct clk *fclk; + +void __iomem *io_base; +void __iomem *irq_stat;/* TISR/IRQSTATUS interrupt status */ +void __iomem *irq_ena;/* irq enable */ +void __iomem *irq_dis;/* irq disable, only on v2 ip */ +void __iomem *pend;/* write pending */ +void __iomem *func_base;/* function register base */ + +unsigned long rate; +unsigned reserved:1 ; +unsigned posted:1 ; +struct timer_regs context; +int (*get_context_loss_count)(struct device *); +int ctx_loss_count; +int revision; +u32 capability; +u32 errata; +struct platform_device *pdev; +struct list_head node; +}; +struct dmtimer_platform_data {/* set_timer_src - Only used for OMAP1 devices */ int (*set_timer_src)(struct platform_device *pdev,int source);
@@ -260,31 +283,6 @@ int omap_dm_timers_active(void);#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \ (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) -struct omap_dm_timer { -int id; -int irq; -struct clk *fclk; - -void __iomem *io_base; -void __iomem *irq_stat;/* TISR/IRQSTATUS interrupt status */ -void __iomem *irq_ena;/* irq enable */ -void __iomem *irq_dis;/* irq disable, only on v2 ip */ -void __iomem *pend;/* write pending */ -void __iomem *func_base;/* function register base */ - -unsigned long rate; -unsigned reserved:1 ; -unsigned posted:1 ; -struct timer_regs context; -int (*get_context_loss_count)(struct device *); -int ctx_loss_count; -int revision; -u32 capability; -u32 errata; -struct platform_device *pdev; -struct list_head node; -}; -static inline u32 __omap_dm_timer_read (struct omap_dm_timer *timer,u32 reg,int posted) {
Signature · 1 line
1.7.9.5
PATCH 6/8 ARM: OMAP: Add platform data header for DMTIMERs
In reply to Jon HunterMove definition of dmtimer platform data structure in to its own header under <linux/platform_data>.
--- arch/arm/mach-omap1/timer.c | 1 + arch/arm/mach-omap2/timer.c | 2 ++ arch/arm/plat-omap/dmtimer.c | 2 ++ arch/arm/plat-omap/include/plat/dmtimer.h | 8 ------- include/linux/platform_data/dmtimer-omap.h | 31 ++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 include/linux/platform_data/dmtimer-omap.h
arch/arm/mach-omap1/timer.c +1 -0
@@ -25,6 +25,7 @@#include <linux/err.h> #include <linux/slab.h> #include <linux/platform_device.h> +#include <linux/platform_data/dmtimer-omap.h> #include <mach/irqs.h>
arch/arm/mach-omap2/timer.c +2 -0
@@ -39,6 +39,8 @@#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/platform_device.h> +#include <linux/platform_data/dmtimer-omap.h> #include <asm/mach/time.h> #include <asm/smp_twd.h>
arch/arm/plat-omap/dmtimer.c +2 -0
@@ -43,6 +43,8 @@#include <linux/pm_runtime.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/platform_device.h> +#include <linux/platform_data/dmtimer-omap.h> #include <plat/dmtimer.h>
arch/arm/plat-omap/include/plat/dmtimer.h +0 -8
@@ -124,14 +124,6 @@ struct omap_dm_timer {struct list_head node; }; -struct dmtimer_platform_data { -/* set_timer_src - Only used for OMAP1 devices */ -int (*set_timer_src)(struct platform_device *pdev,int source); -u32 timer_errata; -u32 timer_capability; -int (*get_context_loss_count)(struct device *); -}; -int omap_dm_timer_reserve_systimer (int id);struct omap_dm_timer *omap_dm_timer_request (void );struct omap_dm_timer *omap_dm_timer_request_specific (int timer_id);
include/linux/platform_data/dmtimer-omap.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* DMTIMER platform data for TI OMAP platforms +* +* Copyright (C) 2012 Texas Instruments +* Author: Jon Hunter <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License version 2 as published by +* the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__ +#define __PLATFORM_DATA_DMTIMER_OMAP_H__ + +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 *); +}; + +#endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
Signature · 1 line
1.7.9.5
PATCH 7/8 ARM: OMAP: Remove unnecessary inclusion of dmtimer.h
In reply to Jon HunterSome source files are including dmtimer.h but not actually using any dmtimer definitions or functions. Therefore, remove the inclusion dmtimer.h from these source files.
--- arch/arm/mach-omap1/timer32k.c | 1 - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - arch/arm/mach-omap2/pm-debug.c | 1 - drivers/staging/tidspbridge/core/ue_deh.c | 1 - 5 files changed, 5 deletions(-)
arch/arm/mach-omap1/timer32k.c +0 -1
@@ -51,7 +51,6 @@#include <asm/mach/time.h> #include <plat/counter-32k.h> -#include <plat/dmtimer.h> #include <mach/hardware.h>
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
@@ -17,7 +17,6 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> #include "omap_hwmod.h" #include "l3_2xxx.h"
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -1
@@ -18,7 +18,6 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> #include "omap_hwmod.h" #include "mmc.h"
arch/arm/mach-omap2/pm-debug.c +0 -1
@@ -30,7 +30,6 @@#include "clock.h" #include "powerdomain.h" #include "clockdomain.h" -#include <plat/dmtimer.h> #include "omap-pm.h" #include "soc.h"
drivers/staging/tidspbridge/core/ue_deh.c +0 -1
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> -#include <plat/dmtimer.h> #include <dspbridge/dbdefs.h> #include <dspbridge/dspdeh.h>
Signature · 1 line
1.7.9.5
PATCH 7/8 ARM: OMAP: Remove unnecessary inclusion of dmtimer.h
Quoted 66 lines · Jon Hunter
Some source files are including
dmtimer.hbut not actually using any dmtimer definitions or functions. Therefore, remove the inclusiondmtimer.hfrom these source files.Signed-off-by Jon Hunter <[email protected]>--- arch/arm/mach-omap1/timer32k.c | 1 - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - arch/arm/mach-omap2/pm-debug.c | 1 - drivers/staging/tidspbridge/core/ue_deh.c | 1 - 5 files changed, 5 deletions(-)arch/arm/mach-omap1/timer32k.c +0
-1@@ -51,7 +51,6 @@#include <asm/mach/time.h> #include <plat/counter-32k.h> -#include <plat/dmtimer.h> #include <mach/hardware.h> arch/arm/mach-omap2/omap_hwmod_2420_data.c +0
-1@@ -17,7 +17,6 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> #include "omap_hwmod.h" #include "l3_2xxx.h" arch/arm/mach-omap2/omap_hwmod_2430_data.c +0
-1@@ -18,7 +18,6 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> #include "omap_hwmod.h" #include "mmc.h" arch/arm/mach-omap2/pm-debug.c +0
-1@@ -30,7 +30,6 @@#include "clock.h" #include "powerdomain.h" #include "clockdomain.h" -#include <plat/dmtimer.h> #include "omap-pm.h" #include "soc.h" drivers/staging/tidspbridge/core/ue_deh.c +0
-0
drivers/staging/tidspbridge/core/ue_deh.c line 24
Quoted 7 lines
drivers/staging/tidspbridge/core/ue_deh.c +0
-1@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> -#include <plat/dmtimer.h> #include <dspbridge/dbdefs.h> #include <dspbridge/dspdeh.h>
Hi Omar, I should have had you in copy on this one. Are you ok with the removal of the above dmtimer.h include? It does not appear that this file needs to include dmtimer.h.
Is it ok for this to go through Tony's tree? If so, care to ACK?
Cheers
Jon
PATCH 7/8 ARM: OMAP: Remove unnecessary inclusion of dmtimer.h
Hi Jon,
Quoted 10 lines · Jon Hunter
Quoted 10 lines
drivers/staging/tidspbridge/core/ue_deh.c +0
-1@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> -#include <plat/dmtimer.h>
Quoted 6 lines
drivers/staging/tidspbridge/core/ue_deh.c line 24
Quoted 2 lines
drivers/staging/tidspbridge/core/ue_deh.c +0
-0#include <dspbridge/dbdefs.h> #include <dspbridge/dspdeh.h> Hi Omar, I should have had you in copy on this one. Are you ok with the removal of the above
dmtimer.hinclude? It does not appear that this file needs to includedmtimer.h.
Indeed, we don't use it here.
Quoted 1 line
Is it ok for this to go through Tony's tree? If so, care to ACK?
Looks fine to me, but I believe you will want to let Greg know if this patch will bypass staging tree.
Cheers,
Omar
Greg Kroah-Hartman
maintainerPATCH 7/8 ARM: OMAP: Remove unnecessary inclusion of dmtimer.h
Quoted 20 lines · Omar Ramirez Luna
Hi Jon,
Quoted 10 lines · Jon Hunter
Quoted 10 lines
drivers/staging/tidspbridge/core/ue_deh.c +0
-1@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/interrupt.h> -#include <plat/dmtimer.h> Quoted 6 lines
drivers/staging/tidspbridge/core/ue_deh.c line 24
Quoted 2 lines
drivers/staging/tidspbridge/core/ue_deh.c +0
-0#include <dspbridge/dbdefs.h> #include <dspbridge/dspdeh.h> Hi Omar, I should have had you in copy on this one. Are you ok with the removal of the above
dmtimer.hinclude? It does not appear that this file needs to includedmtimer.h.
Quoted 6 lines
Indeed, we don't use it here.
Quoted 1 line
Is it ok for this to go through Tony's tree? If so, care to ACK?
Looks fine to me, but I believe you will want to let Greg know if this patch will bypass staging tree.
That's fine with me for such trivial stuff.
greg k-h
PATCH 8/8 ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
In reply to Jon HunterMove plat/dmtimer.h to plat-omap/dmtimer.h in order to support a single zImage for ARM devices.
--- arch/arm/mach-omap1/pm.c | 2 +- arch/arm/mach-omap1/timer.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/timer.c | 2 +- arch/arm/plat-omap/dmtimer.c | 2 +- arch/arm/plat-omap/include/plat-omap/dmtimer.h | 420 ++++++++++++++++++++ arch/arm/plat-omap/include/plat/dmtimer.h | 414 ------------------- drivers/staging/tidspbridge/core/dsp-clock.c | 2 +- 10 files changed, 428 insertions(+), 422 deletions(-) create mode 100644 arch/arm/plat-omap/include/plat-omap/dmtimer.h delete mode 100644 arch/arm/plat-omap/include/plat/dmtimer.h
arch/arm/mach-omap1/pm.c +1 -1
@@ -53,7 +53,7 @@#include <mach/tc.h> #include <mach/mux.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #include <mach/irqs.h>
arch/arm/mach-omap1/timer.c +1 -1
@@ -29,7 +29,7 @@#include <mach/irqs.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #define OMAP1610_GPTIMER1_BASE 0xfffb1400#define OMAP1610_GPTIMER2_BASE 0xfffb1c00
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +1 -1
@@ -11,7 +11,7 @@#include <linux/platform_data/gpio-omap.h> #include <plat-omap/dma-omap.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include "omap_hwmod.h"
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
@@ -24,7 +24,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 <plat-omap/dmtimer.h> #include <plat/iommu.h> #include "am35xx.h"
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +1 -1
@@ -27,7 +27,7 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/asoc-ti-mcbsp.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #include <plat/iommu.h> #include "omap_hwmod.h"
arch/arm/mach-omap2/timer.c +1 -1
@@ -50,7 +50,7 @@#include "omap_hwmod.h" #include "omap_device.h" #include <plat/counter-32k.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #include "omap-pm.h" #include "soc.h"
arch/arm/plat-omap/dmtimer.c +1 -1
@@ -46,7 +46,7 @@#include <linux/platform_device.h> #include <linux/platform_data/dmtimer-omap.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> static u32 omap_reserved_systimers;static LIST_HEAD (omap_timer_list);
arch/arm/plat-omap/include/plat-omap/dmtimer.h new file +420 -0
420 lines not on this page · raw message
arch/arm/plat-omap/include/plat/dmtimer.h deleted +0 -414
414 lines not on this page · raw message
drivers/staging/tidspbridge/core/dsp-clock.c +1 -1
@@ -22,7 +22,7 @@/* ----------------------------------- Host OS */ #include <dspbridge/host_os.h> -#include <plat/dmtimer.h> +#include <plat-omap/dmtimer.h> #include <linux/platform_data/asoc-ti-mcbsp.h> /* ----------------------------------- DSP/BIOS Bridge */
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerPATCH 8/8 ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
Quoted 2 lines · Jon Hunter
Move
plat/dmtimer.htoplat-omap/dmtimer.hin order to support a single zImage for ARM devices.
Let's skip this one for now as it turns out this solution won't work either for multiplatform without adding nasty hacks to arch/arm/Makefile to include arch/arm/plat-omap.
Sorry I don't have any real solution in mind other than making the remaining dmtimer.h users to use Linux generic timer functions, or pass the dmtimer functions in platform_data for now.
Regards,
Tony
PATCH 8/8 ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
Quoted 11 lines · Tony Lindgren
Quoted 2 lines · Jon Hunter
Move
plat/dmtimer.htoplat-omap/dmtimer.hin order to support a single zImage for ARM devices.Let's skip this one for now as it turns out this solution won't work either for multiplatform without adding nasty hacks to
arch/arm/Makefileto includearch/arm/plat-omap.Sorry I don't have any real solution in mind other than making the remaining
dmtimer.husers to use Linux generic timer functions, or pass the dmtimer functions inplatform_datafor now.
Ok, no problem. Are you happy with the others?
One thing that we could do, is not include the dmtimer driver in the multi-platform build for now. I believe that only the dsp/iva/gfx is using this driver currently.
I believe that there are some issues with building the kernel without the dmtimer and so I can look into fixing that.
Is there a way to not include dmtimer with multi-platform but still enable in omap2plus_defconfig? Or are we planning to kill omap2plus_defconfig too?
Cheers
Jon
Tony Lindgren
maintainerPATCH 8/8 ARM: OMAP: Move plat/dmtimer.h to plat-omap/dmtimer.h
Quoted 10 lines · Jon Hunter
Quoted 8 lines · Tony Lindgren
Quoted 2 lines · Jon Hunter
Move
plat/dmtimer.htoplat-omap/dmtimer.hin order to support a single zImage for ARM devices.Let's skip this one for now as it turns out this solution won't work either for multiplatform without adding nasty hacks to
arch/arm/Makefileto includearch/arm/plat-omap.
Quoted 5 lines
Quoted 3 lines
Sorry I don't have any real solution in mind other than making the remaining
dmtimer.husers to use Linux generic timer functions, or pass the dmtimer functions inplatform_datafor now.Ok, no problem. Are you happy with the others?
The others look OK to me thanks.
Quoted 3 lines
One thing that we could do, is not include the dmtimer driver in the multi-platform build for now. I believe that only the dsp/iva/gfx is using this driver currently.
Looks like the users are drivers/staging/tidspbridge and drivers/media/rc/ir-rx51.c. Both could use platform_data pointers for now, but that really just postpones the problem.
Quoted 2 lines
I believe that there are some issues with building the kernel without the dmtimer and so I can look into fixing that.
We can include it from <plat/dmtimer.h> for arch/arm/*omap*/* code, but not for drivers.
Quoted 3 lines
Is there a way to not include dmtimer with multi-platform but still enable in
omap2plus_defconfig? Or are we planning to killomap2plus_defconfigtoo?
We'll be keeping omap2plus_defconfig, but once we enable multiplatform support there's really no reason to go back.
Regards,
Tony