From patchwork Fri Sep 25 02:14:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7262061 Return-Path: X-Original-To: patchwork-linux-arm@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 0332FBEEC1 for ; Fri, 25 Sep 2015 02:17:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C2D420B17 for ; Fri, 25 Sep 2015 02:17:37 +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 4476220B16 for ; Fri, 25 Sep 2015 02:17:36 +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 1ZfIYO-0000n2-0N; Fri, 25 Sep 2015 02:16:04 +0000 Received: from mail-pa0-f52.google.com ([209.85.220.52]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZfIYA-0000Um-NA; Fri, 25 Sep 2015 02:15:51 +0000 Received: by padhy16 with SMTP id hy16so90338578pad.1; Thu, 24 Sep 2015 19:15:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JEr/xW91SpDAxix7YoU6jp4ujg8uUlzO0xXWkjA3kxY=; b=HZ0gRwlIHKonpRwO/my6SzkURbDjjmlzL/dXZAhjMklX1vwVxDyYu1mDiOEjXtjaS6 6TibjKhTk8Xry2RgZvzuRcd/BultsLO7exz9+w/jo7fRYQoW4eOjOfC7VwVoPzxa41UC b77l36GJJ/7PY5T4FxsgHTFgmQSIAYdRT971qb+pCfI033EXoMf+NgenZW5U7Bu3qHPf 45Q6KmLAQ6Xlm1Koe5PgT/GDMAZwptfjIZit9Bhmp/kJtRiH1+0ppss2n+UKZz/8u9x6 AgsXHwDzb88hTf6fYfSn0djt/lQ+cuZUGE6uoo7wMb6kg3X2VOMjFd046FZR1luwB3s9 UMwA== X-Received: by 10.66.233.164 with SMTP id tx4mr3690100pac.21.1443147330056; Thu, 24 Sep 2015 19:15:30 -0700 (PDT) Received: from localhost.localdomain ([103.47.144.164]) by smtp.gmail.com with ESMTPSA id bk8sm876722pad.18.2015.09.24.19.15.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Sep 2015 19:15:29 -0700 (PDT) From: Caesar Wang To: heiko@sntech.de, daniel.lezcano@linaro.org, will.deacon@arm.com, catalin.marinas@arm.com Subject: [PATCH v2 2/4] clocksource: rockchip: trivial: Make the driver more readability Date: Fri, 25 Sep 2015 10:14:56 +0800 Message-Id: <1443147298-12603-3-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443147298-12603-1-git-send-email-wxt@rock-chips.com> References: <1443147298-12603-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150924_191550_796184_4F6EFCF0 X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: -2.6 (--) 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: devicetree@vger.kernel.org, Caesar Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Let's checkstyle to clean up the macros with such trivial details. Signed-off-by: Caesar Wang Acked-by: Daniel Lezcano --- Changes in v2: None Changes in v1: None 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 3ace7ac..9ed662a 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);