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: 9332437 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 2187E6077A for ; Wed, 14 Sep 2016 20:14:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 113CC28FDA for ; Wed, 14 Sep 2016 20:14:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04BB729FEA; Wed, 14 Sep 2016 20:14:36 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 96AC228FDA for ; Wed, 14 Sep 2016 20:14:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkGYK-0006M6-GF; Wed, 14 Sep 2016 20:13:04 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkGX7-00053j-IR for linux-arm-kernel@lists.infradead.org; Wed, 14 Sep 2016 20:12:02 +0000 Received: by mail-wm0-x232.google.com with SMTP id i130so66718914wmf.0 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=USnGLsz/ahmCC1/NnhvCB6oUWq905PGJbjx7W8yTc28fd+kZeTAICBaNY2Jq29ijGJ WdiXhWOYKV+//LXng3lUvwXiOy7FJe8Cb+5W4BnV0Jz5Zx2fMuBI34vdK2/mp4/DBNJa APufrr96BBujYLO5bPmZ4G2bjMVbvUVvR79sSeY++3k62MuTZ2dR7DvkUEigiaXjdx2d GD698d/HKg5+5VWryCu2HrywyXz+30970ghD/ujgpFiEQugg1iqvmqttQViluqeYrm4N n/LbLaRcfVm38z9Esl/qTZbScwAe9VZx5Btu6JKlrMNZJNVGV2Wtu0qq7HiyNF3SYFyY EuKQ== X-Gm-Message-State: AE9vXwPzUHd3eAu6TXwcqlW3F1q3XxSygq8AqpelHv5MRQLa7gCNuOR4LGjT0K1eTyFTHRgs 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160914_131150_165287_21655260 X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-acpi@lists.linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, wim@iguana.be, Fu Wei , wei@redhat.com, al.stone@linaro.org, tn@semihalf.com, timur@codeaurora.org, linux-acpi@vger.kernel.org, linux@roeck-us.net, harba@codeaurora.org, julien.grall@arm.com, linux-watchdog@vger.kernel.org, arnd@arndb.de, jcm@redhat.com, cov@codeaurora.org, linux-arm-kernel@lists.infradead.org, graeme.gregory@linaro.org, rruigrok@codeaurora.org, leo.duran@amd.com, Suravee.Suthikulpanit@amd.com, christoffer.dall@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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