From patchwork Thu Oct 25 12:12:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 1643531 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2C989DF2AB for ; Thu, 25 Oct 2012 12:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753489Ab2JYMNM (ORCPT ); Thu, 25 Oct 2012 08:13:12 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:33924 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939Ab2JYMNK convert rfc822-to-8bit (ORCPT ); Thu, 25 Oct 2012 08:13:10 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9PCD0cg027966; Thu, 25 Oct 2012 07:13:01 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9PCD0QB010417; Thu, 25 Oct 2012 17:43:00 +0530 (IST) Received: from DBDE01.ent.ti.com ([fe80::d5df:c4b5:9919:4e10]) by DBDE71.ent.ti.com ([fe80::692c:15fd:9507:b54%21]) with mapi id 14.01.0323.003; Thu, 25 Oct 2012 17:42:59 +0530 From: "Hiremath, Vaibhav" To: "Hunter, Jon" CC: "Cousson, Benoit" , Tony Lindgren , Paul Walmsley , Rob Herring , Grant Likely , device-tree , linux-omap , linux-arm Subject: RE: [PATCH V3 1/5] ARM: dts: OMAP: Add timer nodes Thread-Topic: [PATCH V3 1/5] ARM: dts: OMAP: Add timer nodes Thread-Index: AQHNrJFyU2csajXbU0mCv3R/h644jJfIxp7g///6zoCAATegcA== Date: Thu, 25 Oct 2012 12:12:59 +0000 Message-ID: <79CD15C6BA57404B839C016229A409A83EB4A768@DBDE01.ent.ti.com> References: <1350496873-21337-1-git-send-email-jon-hunter@ti.com> <1350496873-21337-2-git-send-email-jon-hunter@ti.com> <79CD15C6BA57404B839C016229A409A83EB49C1B@DBDE01.ent.ti.com> <50887315.2000509@ti.com> In-Reply-To: <50887315.2000509@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.190.27] MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On Thu, Oct 25, 2012 at 04:30:37, Hunter, Jon wrote: > > On 10/24/2012 01:17 PM, Hiremath, Vaibhav wrote: > > On Wed, Oct 17, 2012 at 23:31:09, Hunter, Jon wrote: > >> Add the 12 GP timers nodes present in OMAP2. > >> Add the 12 GP timers nodes present in OMAP3. > >> Add the 11 GP timers nodes present in OMAP4. > >> Add the 7 GP timers nodes present in AM33xx. > >> > >> Add documentation for timer properties specific to OMAP. > >> > >> Please note that for OMAP2/3 devices, there is only one interrupt controller > >> for the ARM CPU (which has the label "intc") and so globally define this as the > >> interrupt parent to save duplicating the interrupt parent for all device nodes. > >> > >> Thanks to Vaibhav Hiremath for creating the AM33xx timer nodes. I have modified > >> Vaibhav's original nodes adding information on which timers support a PWM > >> output. > >> > >> Cc: Benoit Cousson > >> Signed-off-by: Jon Hunter > >> --- > >> .../devicetree/bindings/arm/omap/timer.txt | 29 ++++++ > >> arch/arm/boot/dts/am33xx.dtsi | 61 +++++++++++++ > >> arch/arm/boot/dts/omap2.dtsi | 86 ++++++++++++++++++ > >> arch/arm/boot/dts/omap2420.dtsi | 8 ++ > >> arch/arm/boot/dts/omap2430.dtsi | 8 ++ > >> arch/arm/boot/dts/omap3.dtsi | 96 ++++++++++++++++++++ > >> arch/arm/boot/dts/omap4.dtsi | 86 ++++++++++++++++++ > >> 7 files changed, 374 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/arm/omap/timer.txt > >> > > > > Although I have not tested this version of patch series at my end, but > > whole patch-series Looks ok to me. > > > > Acked-By: Vaibhav Hiremath > > Thanks. I made a couple cosmetic changes in V4 apart from the > "interrupt-parent" addition which we are now dropping. Care to ACK > patches 2-5 of V4? > Jon, Good news, I could able to spend some time today on Timer issue on Am33xx and figure out what is going wrong there. The register context is loosing, which leads to failure of interrupt test cases. Below log describes more on this, [root@arago /]# echo 1 > /tmp/omap-test/timer/all [ 9.156122] Testing 48042000.timer with 24000000 Hz clock ... [root@arago /]# [root@arago /]# [root@arago /]# [root@arago /]# [ 11.505497] Timer read test PASSED! No errors, 100 loops [ 11.511493] omap_dm_timer_set_int_enable:664: irq_ena - 0 [ 11.517277] omap_dm_timer_set_int_enable:670: irq_ena - 2 [ 11.523095] omap_timer_interrupt_test:120: irq_ena - 0 [BOOOOOOOOM] [ 12.521111] Timer interrupt test FAILED! No interrupt occurred in 1 sec I changed the Test code as below, and not with your Timer patches, I have tested all the timers without any issues. So for all patch series, Acked-Reviewed-&-Tested-By: Vaibhav Hiremath Test code diff: Thanks, Vaibhav --- 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 =============== diff --git a/timer_test.c b/timer_test.c index e502881..c87a830 100644 --- a/timer_test.c +++ b/timer_test.c @@ -13,6 +13,7 @@ #define OMAP1_NUM_TIMERS 8 #define OMAP2_NUM_TIMERS 11 +#define AM33XX_NUM_TIMERS 7 #define OMAP_MAX_NUM_TIMERS 12 #define OMAP_TIMER_SRC_CLKS 2 #define TIMER_TIMEOUT (msecs_to_jiffies(1000)) @@ -113,6 +114,9 @@ static int omap_timer_interrupt_test(struct omap_dm_timer *gptimer) irq_data.gptimer = gptimer; init_completion(&irq_data.complete); + + omap_dm_timer_enable(gptimer); + omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); omap_dm_timer_set_load_start(gptimer, 0, 0xffffff00); @@ -128,6 +132,8 @@ static int omap_timer_interrupt_test(struct omap_dm_timer *gptimer) omap_dm_timer_stop(gptimer); omap_dm_timer_set_int_enable(gptimer, 0); + omap_dm_timer_disable(gptimer); + free_irq(timer_irq, &irq_data); return r; @@ -141,6 +147,8 @@ static u32 omap_timer_num_timers(void) max_num_timers = OMAP1_NUM_TIMERS; else if (cpu_is_omap34xx() && (omap_type() == OMAP2_DEVICE_TYPE_GP)) max_num_timers = OMAP2_NUM_TIMERS + 1; + else if (soc_is_am33xx()) + max_num_timers = AM33XX_NUM_TIMERS; else max_num_timers = OMAP2_NUM_TIMERS; @@ -222,6 +230,7 @@ static int omap_timer_test_all(void) } for (i = 0; i < count; i++) { + pr_info("\n\n"); r = omap_timer_run_tests(gptimers[i]); if (r) errors += r;