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 Fu X-Patchwork-Id: 77088 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp577435qgf; Wed, 28 Sep 2016 11:18:40 -0700 (PDT) X-Received: by 10.66.77.170 with SMTP id t10mr59806590paw.105.1475086720495; Wed, 28 Sep 2016 11:18:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z89si9656929pff.2.2016.09.28.11.18.40 for ; Wed, 28 Sep 2016 11:18:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbcI1SSi (ORCPT ); Wed, 28 Sep 2016 14:18:38 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34799 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbcI1SSc (ORCPT ); Wed, 28 Sep 2016 14:18:32 -0400 Received: by mail-pf0-f173.google.com with SMTP id l25so19877041pfb.1 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=F4FVU/FJV7CXZSxvHLXnuq2DtrdWgPGSdDur4TVdqeWYybZjN3ICiZA71UWvWNthoM YhVj5jOALomsSNOuvhYXC6D/G43zW4x4vVZEvOYXUWt+bq5rgkiYiFODaeFfkaMWTRN1 l8C3BbqLSW4QaiWJeTzDZQ/zKeTHPOJ7ObmiSIhd/Ia0lgaaFIFeriUSihv0MZKycGmH EeqKq7o5e2vnPUNS2m51KnlRhw2Knf18rFFhlyP6RUL4XkMV3qUkWN/PTtA9tqcTNjPz oDMQAFtbm1aB/iD+BiZgsH1Murtu+lOumJ120ZaNsYfcrtXb39FsvIo5w9UpqCCTwxWU d6ag== X-Gm-Message-State: AA6/9Rl5z0oocQaSJ1gH9hooheNV/PEw7c051YPDqrbFPSNZ9d5siKkD1yW3bsp3+vNp3sc8 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 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 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> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org 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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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/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