Re: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
* Pedanekar, Hemant hema...@ti.com [110918 20:32]: Tony, Kernel boots fine on TI816X (should also boot on TI814X) with your patch and patches (including OSC clock fix) from series http://www.spinics.net/lists/linux-omap/msg57011.html OK good to hear, I assume I can add your Tested-by then? Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
* DebBarma, Tarun Kanti tarun.ka...@ti.com [110918 04:53]: But we can map the interrupt registers separately and then have the rest start from func_base that is different based on the timer version. Rebasing the rest of the dmtimer hwmod patches on this should be fairly easy, mostly just need to pass timer instead of timer-io_base and use __raw_read/write for the interrupt registers. I went through the patch. It definitely looks much more simplified now. I will rebase on top of this change. OK thanks, can I add your Acked-by then? Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
* Mohammed, Afzal af...@ti.com [110918 21:48]: Hi Tony, On Sat, Sep 17, 2011 at 07:05:31, Tony Lindgren wrote: Afzal, care to check if that works for AM335X/TI816X/TI814X? With following patch over yours, AM335X (the only board with me) boots up fine. Thanks for catching that, will fold it in with your Signed-off-by. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
Tony Lindgren wrote on Monday, September 19, 2011 11:11 PM: device driver) * Pedanekar, Hemant hema...@ti.com [110918 20:32]: Tony, Kernel boots fine on TI816X (should also boot on TI814X) with your patch and patches (including OSC clock fix) from series http://www.spinics.net/lists/linux-omap/msg57011.html OK good to hear, I assume I can add your Tested-by then? Regards, Tony Yes. Thanks. Hemant-- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
[...] Well here's what I came up with to deal with the different timer registers. We can't use the context registers as those are for the value naturally.. But we can map the interrupt registers separately and then have the rest start from func_base that is different based on the timer version. Rebasing the rest of the dmtimer hwmod patches on this should be fairly easy, mostly just need to pass timer instead of timer-io_base and use __raw_read/write for the interrupt registers. I went through the patch. It definitely looks much more simplified now. I will rebase on top of this change. Also, I ended up checking the timer revision with if (!(tidr 16)) as it seems that those bits are zero for v1 timers? If that works, then we don't need patch 02/12 for the revision number. Right. -- Tarun Afzal, care to check if that works for AM335X/TI816X/TI814X? It tried it briefly with omap4 gptimer3 as the clockevent and CONFIG_LOCAL_TIMER disabled. The patch is against the current cleanup branch in linux-omap tree. Regards, Tony From: Tony Lindgren t...@atomide.com Date: Fri, 16 Sep 2011 15:44:20 -0700 Subject: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip The registers are slightly different between v1 and v2 ip that is available in omap4 and later for some timers. Add support for v2 ip by mapping the interrupt related registers separately and adding func_base for the functional registers. Also disable dmtimer driver features on omap4 for now as those need the hwmod conversion series to deal with enabling the timers properly in omap_dm_timer_init. Signed-off-by: Tony Lindgren t...@atomide.com diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index cf1de7d..21d34fb 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -78,7 +78,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) { struct clock_event_device *evt = clockevent_gpt; - __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); + __omap_dm_timer_write_status(clkev, OMAP_TIMER_INT_OVERFLOW); evt-event_handler(evt); return IRQ_HANDLED; @@ -93,7 +93,7 @@ static struct irqaction omap2_gp_timer_irq = { static int omap2_gp_timer_set_next_event(unsigned long cycles, struct clock_event_device *evt) { - __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST, + __omap_dm_timer_load_start(clkev, OMAP_TIMER_CTRL_ST, 0x - cycles, 1); return 0; @@ -104,16 +104,16 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, { u32 period; - __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate); + __omap_dm_timer_stop(clkev, 1, clkev.rate); switch (mode) { case CLOCK_EVT_MODE_PERIODIC: period = clkev.rate / HZ; period -= 1; /* Looks like we need to first set the load value separately */ - __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG, + __omap_dm_timer_write(clkev, OMAP_TIMER_LOAD_REG, 0x - period, 1); - __omap_dm_timer_load_start(clkev.io_base, + __omap_dm_timer_load_start(clkev, OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST, 0x - period, 1); break; @@ -172,6 +172,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, } omap_hwmod_enable(oh); + __omap_dm_timer_init_regs(timer); sys_timer_reserved |= (1 (gptimer_id - 1)); @@ -189,7 +190,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, clk_put(src); } } - __omap_dm_timer_reset(timer-io_base, 1, 1); + __omap_dm_timer_reset(timer, 1, 1); timer-posted = 1; timer-rate = clk_get_rate(timer-fclk); @@ -210,7 +211,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id, omap2_gp_timer_irq.dev_id = (void *)clkev; setup_irq(clkev.irq, omap2_gp_timer_irq); - __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); + __omap_dm_timer_int_enable(clkev, OMAP_TIMER_INT_OVERFLOW); clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC, clockevent_gpt.shift); @@ -251,7 +252,7 @@ static struct omap_dm_timer clksrc; static DEFINE_CLOCK_DATA(cd); static cycle_t clocksource_read_cycles(struct clocksource *cs) { - return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1); + return (cycle_t)__omap_dm_timer_read_counter(clksrc, 1); } static struct clocksource clocksource_gpt = { @@ -266,7 +267,7 @@ static void notrace
RE: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
Tony Lindgren wrote on Saturday, September 17, 2011 7:06 AM: device driver) * DebBarma, Tarun Kanti tarun.ka...@ti.com [110916 01:56]: [...] Afzal, care to check if that works for AM335X/TI816X/TI814X? It tried it briefly with omap4 gptimer3 as the clockevent and CONFIG_LOCAL_TIMER disabled. The patch is against the current cleanup branch in linux-omap tree. Regards, Tony From: Tony Lindgren t...@atomide.com Date: Fri, 16 Sep 2011 15:44:20 -0700 Subject: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip [...] Tony, Kernel boots fine on TI816X (should also boot on TI814X) with your patch and patches (including OSC clock fix) from series http://www.spinics.net/lists/linux-omap/msg57011.html Thanks. Hemant
RE: [PATCH] ARM: OMAP: Add support for dmtimer v2 ip (Re: [PATCH v15 06/12] OMAP: dmtimer: switch-over to platform device driver)
Hi Tony, On Sat, Sep 17, 2011 at 07:05:31, Tony Lindgren wrote: Afzal, care to check if that works for AM335X/TI816X/TI814X? With following patch over yours, AM335X (the only board with me) boots up fine. Regards Afzal From ff64a239e60f9b517860eb2fe9c4f88a188ca51d Mon Sep 17 00:00:00 2001 From: Afzal Mohammed af...@ti.com Date: Mon, 19 Sep 2011 10:06:59 +0530 Subject: [PATCH] ARM: OMAP: dmtimer register safe access Access dmtimer registers after setting it's parent clock. If default parent is not physically present, accessing register causes abort, so access registers after proper parent is set. Signed-off-by: Afzal Mohammed af...@ti.com --- arch/arm/mach-omap2/timer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 1746c69..ababc4d 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -172,7 +172,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, } omap_hwmod_enable(oh); - __omap_dm_timer_init_regs(timer); sys_timer_reserved |= (1 (gptimer_id - 1)); @@ -190,6 +189,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, clk_put(src); } } + __omap_dm_timer_init_regs(timer); __omap_dm_timer_reset(timer, 1, 1); timer-posted = 1; -- 1.6.2.4