From patchwork Wed Sep 28 18:17:10 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: 9354469 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 0A26C60757 for ; Wed, 28 Sep 2016 18:20:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDFD529688 for ; Wed, 28 Sep 2016 18:20:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0C62297A6; Wed, 28 Sep 2016 18:20:49 +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 7CC0E29688 for ; Wed, 28 Sep 2016 18:20:49 +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 1bpJRU-0005WK-TE; Wed, 28 Sep 2016 18:18:52 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bpJRP-0005Tx-T7 for linux-arm-kernel@lists.infradead.org; Wed, 28 Sep 2016 18:18:48 +0000 Received: by mail-pf0-x233.google.com with SMTP id 21so19921107pfy.0 for ; Wed, 28 Sep 2016 11:18:32 -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=ZX5ql6KWJQkWD5slzfjaBtwikkbtZoHDVUvs2a9i5TDljKhG2UacqdW7Wgom3MnbdP GAhIvV5w7fFMvYFi8FwRKoV12HwasetntvKM2PnLZmOvwIbFRbWpnDzFFVVYlHcK2M4+ vq3OPuFBR5XeTaOgKT7c397Y8qP8JN0JlRRwQ= 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=f6iqn6+0whDadnepy4Ncf6rihcFyE1Rp9mAiKU4K7OQyBC8V3xoVmZVTWnH7fCCV6g qM2Q4nna3CE6vxcdStQsqfDGL8cnPKU9VVrTioCfcAuqwIneJxjGFBrww/qnMXxHjokb WHjzihkA2ynVEwdfaviylQm3FY3B0PoottmsrdBBaELaDhxRpZHy0U1qg02kvCeHNC+/ nvB81xQwyVUQeMJ/N8MEaQOH6fTCl2H2bWoCJbOPyd/NsD+MqiHzOCIf90KbiahkLskV dK2kJA1SBn5N6PaesyKEq4JcVEl1HoPl8VJ2A7vKfhQyjbhqRPxxgdjiQCaSmCTrmUFT 22eQ== X-Gm-Message-State: AA6/9RnTTzxOvV65xQpFE6wwbPXcJXpDSMKXiRV9f8N0wwoNbq3fiiwiEZoZ2XMdCQ2gMoSC X-Received: by 10.98.133.132 with SMTP id m4mr47733792pfk.133.1475086711739; Wed, 28 Sep 2016 11:18:31 -0700 (PDT) Received: from Rei-Ayanami.localdomain.localdomain ([67.238.99.186]) by smtp.googlemail.com with ESMTPSA id ak3sm14226365pad.19.2016.09.28.11.18.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 11:18:31 -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 v14 2/9] clocksource/drivers/arm_arch_timer: Add a new enum for spi type Date: Thu, 29 Sep 2016 02:17:10 +0800 Message-Id: <1475086637-1914-3-git-send-email-fu.wei@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475086637-1914-1-git-send-email-fu.wei@linaro.org> References: <1475086637-1914-1-git-send-email-fu.wei@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160928_111848_034581_6BD3BCEB X-CRM114-Status: GOOD ( 11.82 ) 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 Acked-by: Mark Rutland --- 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