From patchwork Wed Sep 14 20:09:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fu.wei@linaro.org X-Patchwork-Id: 9332403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C77F46077A for ; Wed, 14 Sep 2016 20:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B887428FDA for ; Wed, 14 Sep 2016 20:11:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC54629FEA; Wed, 14 Sep 2016 20:11:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 836DB29FE9 for ; Wed, 14 Sep 2016 20:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765199AbcINULd (ORCPT ); Wed, 14 Sep 2016 16:11:33 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35968 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765188AbcINUL2 (ORCPT ); Wed, 14 Sep 2016 16:11:28 -0400 Received: by mail-wm0-f54.google.com with SMTP id b187so64464074wme.1 for ; Wed, 14 Sep 2016 13:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vuC3Ya3G0R/JjUTbpVGXy6EjUBDsi/3qdGH4wOCuc0c=; b=XdOxKVOa+YSX8a0iJnlZihZ+7ebQTwcTAJULoPaYisO1nyGx6QUk9zDUN5/jneH+ZG F7n1VZ99XG8+VQMCpqiHK4u+5onpCWci4DaxhtsU+/PK5yLTjRXmScQQcWQPrsUdJ63a uUj7tauexmN9QD3567DWbd+MkdxS5MMvt+w80= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vuC3Ya3G0R/JjUTbpVGXy6EjUBDsi/3qdGH4wOCuc0c=; b=Kg3W5ucztEzqYJhsasMcqhPDVM+2IEMebaRUgF/R4HYjlOVgEla96mpSfJkezoIBx8 luT4uGBe6GrGgEvdpSit1MS6j4FnBoSIFcIk9wLceeQeshnHY+zEgAcBZX90BvSto0O7 mCqALshmjteO8+4u2pA3BzeoWiZ9P9dGraIP1j6cPkHhW9ThrNpE9ZinnkITddnLmfjz 7W0IWet0Or5E+u6K7Ig6u/X62LopnBk1HRboiJB5s/UOBl+0eYlbFZ3Inc4e9k6UsZwc qgC6vnKdIVbguSO9jkvbT5Mt9jd/9VIXnDYsL5+Bs9miWNMQ5+IJM5K+FAjglAPNPZwW 0/Ew== X-Gm-Message-State: AE9vXwOmychRUVuvUHj9WVIC5K2FalkiAo/s8B+aor49Cmy4CuiJS5oRLFCiG/QkZyBnL2m4 X-Received: by 10.194.18.202 with SMTP id y10mr4402874wjd.174.1473883887539; Wed, 14 Sep 2016 13:11:27 -0700 (PDT) Received: from Rei-Ayanami.localdomain.com ([59.58.254.106]) by smtp.googlemail.com with ESMTPSA id ab9sm1233449wjc.7.2016.09.14.13.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Sep 2016 13:11:26 -0700 (PDT) From: fu.wei@linaro.org To: rjw@rjwysocki.net, lenb@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de, marc.zyngier@arm.com, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, hanjun.guo@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linaro-acpi@lists.linaro.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, rruigrok@codeaurora.org, harba@codeaurora.org, cov@codeaurora.org, timur@codeaurora.org, graeme.gregory@linaro.org, al.stone@linaro.org, jcm@redhat.com, wei@redhat.com, arnd@arndb.de, catalin.marinas@arm.com, will.deacon@arm.com, Suravee.Suthikulpanit@amd.com, leo.duran@amd.com, wim@iguana.be, linux@roeck-us.net, linux-watchdog@vger.kernel.org, tn@semihalf.com, christoffer.dall@linaro.org, julien.grall@arm.com, Fu Wei Subject: [PATCH v13 2/8] clocksource/drivers/arm_arch_timer: Add a new enum for spi type Date: Thu, 15 Sep 2016 04:09:35 +0800 Message-Id: <1473883781-9571-3-git-send-email-fu.wei@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473883781-9571-1-git-send-email-fu.wei@linaro.org> References: <1473883781-9571-1-git-send-email-fu.wei@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fu Wei This patch add a new enum "spi_nr" and use it in the driver. Just for code's readability, no functional change. Signed-off-by: Fu Wei --- drivers/clocksource/arm_arch_timer.c | 4 ++-- include/clocksource/arm_arch_timer.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index aea6c10..059f7fb 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -861,9 +861,9 @@ static int __init arch_timer_mem_init(struct device_node *np) } if (arch_timer_mem_use_virtual) - irq = irq_of_parse_and_map(best_frame, 1); + irq = irq_of_parse_and_map(best_frame, VIRT_SPI); else - irq = irq_of_parse_and_map(best_frame, 0); + irq = irq_of_parse_and_map(best_frame, PHYS_SPI); ret = -EINVAL; if (!irq) { diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h index 6f06481..16dcd10 100644 --- a/include/clocksource/arm_arch_timer.h +++ b/include/clocksource/arm_arch_timer.h @@ -45,6 +45,12 @@ enum ppi_nr { MAX_TIMER_PPI }; +enum spi_nr { + PHYS_SPI, + VIRT_SPI, + MAX_TIMER_SPI +}; + #define ARCH_TIMER_PHYS_ACCESS 0 #define ARCH_TIMER_VIRT_ACCESS 1 #define ARCH_TIMER_MEM_PHYS_ACCESS 2