From patchwork Tue Jul 5 17:56:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexander_M=C3=BCller?= X-Patchwork-Id: 9215033 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 866AF6048B for ; Tue, 5 Jul 2016 17:57:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C18927F9A for ; Tue, 5 Jul 2016 17:57:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7118827FA1; Tue, 5 Jul 2016 17:57:02 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 DCE3027F9A for ; Tue, 5 Jul 2016 17:57:01 +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 1bKUaj-0000U7-6z; Tue, 05 Jul 2016 17:57:01 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKUag-0000PG-Gc for linux-amlogic@lists.infradead.org; Tue, 05 Jul 2016 17:56:59 +0000 Received: by mail-wm0-x241.google.com with SMTP id 187so30433434wmz.1 for ; Tue, 05 Jul 2016 10:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7HkXoROzZ+UFZ1Rt/YY6IeFkXnvlypjRBg7Z7Mo2WgA=; b=i0zC3qjYKuToi6LSdey0fHNRvFvB9o16K4CdjQ5hs+pcQZRc1tovbjyHDvJ3gTNjHR e4pl3LQkWSXTLJQmzLQYn3+vn/k9Rjf1JQPg5wCzgutn0WJdjusZF4Yk+WPHhFXqhdKD so6Y09SRCXilWaMM8dxqFsjnIHGiugSaVP+4tz2RQDqrmPwRuFoXn97Z/yGhAvIv563y dewHVkfR9tdsIrXppWO420GvgsnRwZl/xXua2t5pyX/hNniHwj+1tYdP8725M4QMeqQG qw3RFxH1QrNlMK78xH9zk9U2MX91xucV3IsCV1axiC/lx0rs4peIam0ctrFEHWhMQzuc 8kHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7HkXoROzZ+UFZ1Rt/YY6IeFkXnvlypjRBg7Z7Mo2WgA=; b=PiF0d2wTIFpD6JhKuYpDo3pXg/3WqAKz13349gZwK7hQCoXfhpZmm9teBaa2xZ+IpI EKLxiaL5fwuvSNt6Ac1svatP3iUrtUda7sYHE390X0HqM8rz0bRfHNKIYWJAbpMnFFGQ LtGbqgAvqEcXHc6Tgqr4HaguLGOejem8BX9ZMviHfKfaOl8z5u7FKNLWiDouWkFDdsZY 7SAHKDWCD9tzbs4MJxpbdwER58PR7uX4IBCGK2QKKDZYymdjNYIgBqIywx3RuNiTwA7G fCiXC73I66EGgTTwpGNnUHDQXxGDgkiEobLWMA415fcdbL/BRCcwX3uhzil1ukMEwo/S O5iA== X-Gm-Message-State: ALyK8tK5dNOFGo5KWV74o8rDMLHUljhPRtgIrDEMEAbhwF2cgkrWAnq26RLMru9Ok7aSxA== X-Received: by 10.194.85.34 with SMTP id e2mr15330902wjz.153.1467741397113; Tue, 05 Jul 2016 10:56:37 -0700 (PDT) Received: from ubuntu.fritz.box (p4FFB95B0.dip0.t-ipconnect.de. [79.251.149.176]) by smtp.gmail.com with ESMTPSA id km8sm4086264wjc.43.2016.07.05.10.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 10:56:36 -0700 (PDT) From: =?UTF-8?q?Alexander=20M=C3=BCller?= To: mturquette@baylibre.com, linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 2/7] meson: clk: Move register definitions to meson8b.h Date: Tue, 5 Jul 2016 19:56:26 +0200 Message-Id: <1467741391-60534-3-git-send-email-serveralex@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467741391-60534-1-git-send-email-serveralex@gmail.com> References: <1467741391-60534-1-git-send-email-serveralex@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160705_105658_696198_8AE50665 X-CRM114-Status: GOOD ( 14.63 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alexander Müller --- drivers/clk/meson/meson8b.c | 17 +---------------- drivers/clk/meson/meson8b.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 drivers/clk/meson/meson8b.h diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index b1902e9..537cc53 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -26,22 +26,7 @@ #include #include "clkc.h" - -/* - * Clock controller register offsets - * - * Register offsets from the HardKernel[0] data sheet are listed in comment - * blocks below. Those offsets must be multiplied by 4 before adding them to - * the base address to get the right value - * - * [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf - */ -#define MESON8B_REG_SYS_CPU_CNTL1 0x015c /* 0x57 offset in data sheet */ -#define MESON8B_REG_HHI_MPEG 0x0174 /* 0x5d offset in data sheet */ -#define MESON8B_REG_MALI 0x01b0 /* 0x6c offset in data sheet */ -#define MESON8B_REG_PLL_FIXED 0x0280 -#define MESON8B_REG_PLL_SYS 0x0300 -#define MESON8B_REG_PLL_VID 0x0320 +#include "meson8b.h" static DEFINE_SPINLOCK(clk_lock); diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h new file mode 100644 index 0000000..5b9cb9f --- /dev/null +++ b/drivers/clk/meson/meson8b.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Endless Mobile, Inc. + * Author: Carlo Caione + * + * Copyright (c) 2016 BayLibre, Inc. + * Michael Turquette + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef __MESON8B_H +#define __MESON8B_H + +/* + * Clock controller register offsets + * + * Register offsets from the HardKernel[0] data sheet are listed in comment + * blocks below. Those offsets must be multiplied by 4 before adding them to + * the base address to get the right value + * + * [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf + */ +#define MESON8B_REG_SYS_CPU_CNTL1 0x015c /* 0x57 offset in data sheet */ +#define MESON8B_REG_HHI_MPEG 0x0174 /* 0x5d offset in data sheet */ +#define MESON8B_REG_MALI 0x01b0 /* 0x6c offset in data sheet */ +#define MESON8B_REG_PLL_FIXED 0x0280 +#define MESON8B_REG_PLL_SYS 0x0300 +#define MESON8B_REG_PLL_VID 0x0320 + +#endif /* __MESON8B_H */