From patchwork Fri Dec 18 14:17:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 7884731 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64056BEEE5 for ; Fri, 18 Dec 2015 14:19:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C7B62043C for ; Fri, 18 Dec 2015 14:19:48 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id F1E11202BE for ; Fri, 18 Dec 2015 14:19:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9vsi-0007bo-Mm; Fri, 18 Dec 2015 14:19:40 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9vrz-000770-AO for linux-rockchip@lists.infradead.org; Fri, 18 Dec 2015 14:18:56 +0000 Received: by mail-wm0-x232.google.com with SMTP id l126so67167965wml.1 for ; Fri, 18 Dec 2015 06:18:35 -0800 (PST) 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=ft0cXNXOZGg3P7WJldY5xvuqwQq8f0FAYvYmP49myR4=; b=ZowuIRyXU5GtOo/4CQJXTxIDdW2QBsDmlUu/vlkO/NMNv2l6j1+IIEPp5q59q5ZcbQ 0kQCzKu/ITE/GwiwGOYfOVdFNqKIyOaa1SY27Ux8kEC5EuTzkOX5hwksvF+wnv9zJf9z 5BcUOZt2NK2C9YwlgndtSES1is29nmEHoMyf4= 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=ft0cXNXOZGg3P7WJldY5xvuqwQq8f0FAYvYmP49myR4=; b=IcUH2e1qtgVy2N3vwQxwYeSumUcZvXG9HQYr1Pmdw5Jm4zukFus+bX/ZxCuQG/hh96 fb4/yUVBAoStmlWCRnEHK58t40nMQIl0vwRqhLKi/9sNsaruXQkd14YdNUG1txwTaUr8 PiDG7wWKs4euIbs+Nqy0ob1D6jaAC+p5RZJU1stB/5XkrD/Zq2WthZJd9CL70X7lf33q PGNUjBP7uKFCTheNsdTWUihSDXOvW0DtVO1aLMuQuZ+/5eCgCKslSInoqwJZTjOwxWU2 URaBNVPDWdM8vtLeTio7M1uItrCubpYyefmWI+hsjVQEuwtDWsthDP1TceG7NY04ilHz M5Aw== X-Gm-Message-State: ALoCoQnSyh5Zn0hEuEr6nbM0hjM8//u/X+KfQHaRaOIvGmQtQw9QuSqvkuXQLfL3wlEbC45KN1kFGis2Yu4Sc/yZd8FLJL0a0w== X-Received: by 10.194.200.227 with SMTP id jv3mr4470001wjc.20.1450448314215; Fri, 18 Dec 2015 06:18:34 -0800 (PST) Received: from localhost.localdomain ([78.210.255.2]) by smtp.gmail.com with ESMTPSA id ql10sm15010027wjc.23.2015.12.18.06.18.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 06:18:33 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Subject: [PATCH 05/69] clocksource/drivers/rockchip: Make the driver more readable Date: Fri, 18 Dec 2015 15:17:18 +0100 Message-Id: <1450448302-27429-5-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450448302-27429-1-git-send-email-daniel.lezcano@linaro.org> References: <5672CB9E.7090707@linaro.org> <1450448302-27429-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151218_061855_576135_68EAEC6B X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-kernel@vger.kernel.org, "open list:ARM/Rockchip SoC..." , mingo@kernel.org, linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Caesar Wang Let's checkstyle to clean up the macros with such trivial details. Signed-off-by: Caesar Wang Signed-off-by: Daniel Lezcano --- drivers/clocksource/rockchip_timer.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c index d3c1742..b14716b6 100644 --- a/drivers/clocksource/rockchip_timer.c +++ b/drivers/clocksource/rockchip_timer.c @@ -17,16 +17,16 @@ #define TIMER_NAME "rk_timer" -#define TIMER_LOAD_COUNT0 0x00 -#define TIMER_LOAD_COUNT1 0x04 -#define TIMER_CONTROL_REG 0x10 -#define TIMER_INT_STATUS 0x18 +#define TIMER_LOAD_COUNT0 0x00 +#define TIMER_LOAD_COUNT1 0x04 +#define TIMER_CONTROL_REG 0x10 +#define TIMER_INT_STATUS 0x18 -#define TIMER_DISABLE 0x0 -#define TIMER_ENABLE 0x1 -#define TIMER_MODE_FREE_RUNNING (0 << 1) -#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1) -#define TIMER_INT_UNMASK (1 << 2) +#define TIMER_DISABLE 0x0 +#define TIMER_ENABLE 0x1 +#define TIMER_MODE_FREE_RUNNING (0 << 1) +#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1) +#define TIMER_INT_UNMASK (1 << 2) struct bc_timer { struct clock_event_device ce; @@ -173,4 +173,5 @@ static void __init rk_timer_init(struct device_node *np) clockevents_config_and_register(ce, bc_timer.freq, 1, UINT_MAX); } + CLOCKSOURCE_OF_DECLARE(rk_timer, "rockchip,rk3288-timer", rk_timer_init);