From patchwork Wed Jul 13 17:49:36 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: 9228233 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 D0A656088F for ; Wed, 13 Jul 2016 17:50:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C717C27FBE for ; Wed, 13 Jul 2016 17:50:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBFCB28047; Wed, 13 Jul 2016 17:50:11 +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 1130527FBE for ; Wed, 13 Jul 2016 17:50:11 +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 1bNOIU-00051p-5G; Wed, 13 Jul 2016 17:50:10 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNOIR-0003oC-61 for linux-amlogic@lists.infradead.org; Wed, 13 Jul 2016 17:50:09 +0000 Received: by mail-wm0-x244.google.com with SMTP id o80so6701779wme.0 for ; Wed, 13 Jul 2016 10:49:47 -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=bK5q405Gd8X6jTfkcJIrgKMNskEqsemIctW/wl7FSlzrTZOC33sE0lKtKO+jDWtNo3 ATain+wkbOV/pf0V2gzOFL7aUydyAq5UAi597fC8WNILWQTjnEQi6MLPggfnJXo8d5Ra rrOTIyaeP2GoJWRTHGr+vuwzYz9IXb055BgtMq/tzA+y7JFlnLf4B+yyKG2Su0e4p6VM +W2vKcLChYH1szfGF65WlV9avhr9ZT6lCrUUl049HEVCaUkqKgD4/WgThhUJ2j05HdW8 c2kV+vTZJoeM0H5v74hfhs+hZqZJkEJg4hfogYxe170YYykA5RHkeD59I78ritPsF+bn 5m6A== 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=hzonOmfzYrHRe8vvhyLagdYI9Q3vT2565gSfLi9tY3uHAbum9AHkNmsMqXuDVjQWAY IXigEZr6OrB8+UC412B4PWQcffsmXPrKzr4OC1ykHspwEB3myCWkqOic4Cwn7yCekAlu k50Cwypbr224Xu1K4LUc0px/HvuYhzLjkMbIfaVFWv//jCa3SOsgKh/QoEz17nqM8V7/ oS1FSvhFzlI9iPDAAUj2Hp40yJN4cRMVvDYfLxhQlc8vSu009C8O+CEKrN0xwY+vQQN9 fXMtQ0OSdr450I/CHEtIQcHJOLKxG7RhU0I2VV2LKL1I8gN6t9uKunrXgvIMqbD43/w9 6iCA== X-Gm-Message-State: ALyK8tJ9qJKwfrK55mcJn+Bptoop6ldvX4cahk+gRzPaHtHWWGhC08R+BQeooHF/bVcAYw== X-Received: by 10.194.78.78 with SMTP id z14mr2284944wjw.152.1468432186645; Wed, 13 Jul 2016 10:49:46 -0700 (PDT) Received: from ubuntu.fritz.box (p4FC54F19.dip0.t-ipconnect.de. [79.197.79.25]) by smtp.gmail.com with ESMTPSA id c74sm4490526wme.1.2016.07.13.10.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jul 2016 10:49:45 -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 v2 2/7] meson: clk: Move register definitions to meson8b.h Date: Wed, 13 Jul 2016 19:49:36 +0200 Message-Id: <1468432181-9550-3-git-send-email-serveralex@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1468432181-9550-1-git-send-email-serveralex@gmail.com> References: <1468432181-9550-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-20160713_105007_484036_D3746708 X-CRM114-Status: GOOD ( 14.64 ) 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 */