From patchwork Thu Jun 6 11:01:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 2679031 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 D7C9BDF23A for ; Thu, 6 Jun 2013 11:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589Ab3FFLDQ (ORCPT ); Thu, 6 Jun 2013 07:03:16 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:44678 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932561Ab3FFLDP (ORCPT ); Thu, 6 Jun 2013 07:03:15 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf10so1203690pab.10 for ; Thu, 06 Jun 2013 04:03:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=NtkyUqsFHu0JAo/uvDbXqq+gctO6pKNWSy06minB9hI=; b=MRqqk4u9AJuSVJjkHzgFez4SEi2Te5XtD65s37NWGeCKhOOZM+izDSqnQq0gTgDhIs fVjPqkmgClfQa5lzf6h3GdPKyOvTF+Y7PRYGbnyy9s5NJNwHEwH0UUmpbpgsg7e1baqO HijxEM/jh9JhwVcBo883CCYsL8MfX72UYllHgfK6vXhrxX9oRv2d8bHk+FFESLQBA9Ms qZ2M3vlOC7N3C7kkqixJ2U7XjR/9GYCdn35eXtStnvaTYFcYROqhQwKhUZOgoLoKIkm/ h3RGQvwLvDDMRNGxQzPrwqQVxboblfnWGp1TESeOV2Pyu18shYGLZCGzGcPW/2kOKYZH jJvQ== X-Received: by 10.68.248.100 with SMTP id yl4mr37592088pbc.125.1370516595033; Thu, 06 Jun 2013 04:03:15 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id qh4sm77248213pac.8.2013.06.06.04.03.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 04:03:14 -0700 (PDT) From: Chander Kashyap To: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, kgene.kim@samsung.com, t.figa@samsung.com, s.nawrocki@samsung.com, thomas.ab@samsung.com, Chander Kashyap Subject: [PATCH 11/13] clocksource: exynos_mct: extend local timer support for four cores Date: Thu, 6 Jun 2013 16:31:25 +0530 Message-Id: <1370516488-25860-11-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370516488-25860-1-git-send-email-chander.kashyap@linaro.org> References: <1370516488-25860-1-git-send-email-chander.kashyap@linaro.org> X-Gm-Message-State: ALoCoQlZP2+gG/+apK8NtPf3x7t9hhtYk8DSdhsXJTHrOn/vNxfQQwJT4uDxMwg1Gm4E9UwSV+ji Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Extend the local timer interrupt support for handling four local timers. Signed-off-by: Chander Kashyap --- drivers/clocksource/exynos_mct.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 662fcc0..6af17d4 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -412,6 +412,18 @@ static struct irqaction mct_tick1_event_irq = { .handler = exynos4_mct_tick_isr, }; +static struct irqaction mct_tick2_event_irq = { + .name = "mct_tick2_irq", + .flags = IRQF_TIMER | IRQF_NOBALANCING, + .handler = exynos4_mct_tick_isr, +}; + +static struct irqaction mct_tick3_event_irq = { + .name = "mct_tick3_irq", + .flags = IRQF_TIMER | IRQF_NOBALANCING, + .handler = exynos4_mct_tick_isr, +}; + static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) { struct mct_clock_event_device *mevt; @@ -439,11 +451,21 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) mct_tick0_event_irq.dev_id = mevt; evt->irq = mct_irqs[MCT_L0_IRQ]; setup_irq(evt->irq, &mct_tick0_event_irq); - } else { + } else if (cpu == 1) { mct_tick1_event_irq.dev_id = mevt; evt->irq = mct_irqs[MCT_L1_IRQ]; setup_irq(evt->irq, &mct_tick1_event_irq); irq_set_affinity(evt->irq, cpumask_of(1)); + } else if (cpu == 2) { + mct_tick2_event_irq.dev_id = mevt; + evt->irq = mct_irqs[MCT_L2_IRQ]; + setup_irq(evt->irq, &mct_tick2_event_irq); + irq_set_affinity(evt->irq, cpumask_of(2)); + } else if (cpu == 3) { + mct_tick3_event_irq.dev_id = mevt; + evt->irq = mct_irqs[MCT_L3_IRQ]; + setup_irq(evt->irq, &mct_tick3_event_irq); + irq_set_affinity(evt->irq, cpumask_of(3)); } } else { enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0); @@ -456,11 +478,16 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt) { unsigned int cpu = smp_processor_id(); evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); - if (mct_int_type == MCT_INT_SPI) + if (mct_int_type == MCT_INT_SPI) { if (cpu == 0) remove_irq(evt->irq, &mct_tick0_event_irq); - else + else if (cpu == 1) remove_irq(evt->irq, &mct_tick1_event_irq); + else if (cpu == 2) + remove_irq(evt->irq, &mct_tick2_event_irq); + else if (cpu == 3) + remove_irq(evt->irq, &mct_tick3_event_irq); + } else disable_percpu_irq(mct_irqs[MCT_L0_IRQ]); }