From patchwork Sun Jul 17 18:44:47 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: 9233807 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 EE0546075D for ; Sun, 17 Jul 2016 18:45:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E00CA205AD for ; Sun, 17 Jul 2016 18:45:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4A9E212F2; Sun, 17 Jul 2016 18:45:28 +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 7B64C26A5C for ; Sun, 17 Jul 2016 18:45:27 +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 1bOr43-0004Oz-AZ; Sun, 17 Jul 2016 18:45:19 +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 1bOr3z-0003Bt-Du for linux-amlogic@lists.infradead.org; Sun, 17 Jul 2016 18:45:17 +0000 Received: by mail-wm0-x241.google.com with SMTP id o80so9591261wme.0 for ; Sun, 17 Jul 2016 11:44:57 -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=L0IVvGPu/siZBqLZe9FzIvFOuxIiYjAhZd2Bny8GYhg=; b=0vZkkzwgZaZQc/AtU3LgQFHdK7bngqw5HKKchGbk2FJdO91ZCRh6Wvl6yaeWgIzml1 EAZt89IJgD882qSSEDLB4Avh/IfAWN1jIECYL4nk5615EmAs5UO9TChsLQOQgup8oGJ7 rIo6ZYVaeRc3vnu4/d9ineZdsyJ3DJQ6SIWeT2eEMjDiyzuVJ5A1uZYhGbzhfnnI31E4 u0O9fRHEnXK1a9fO6I/PDgg7qGb7g3IiI/7wY06WNVNTN7cu5LqsZ16R9kxm5vqbwPaa zRQ0zVIKmibxBeoMhoPk7vpJjq+y4OO+FY+NaN/p2bYQ+pMWF/XXlEKUEdQQM+EBgEp/ D8og== 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=L0IVvGPu/siZBqLZe9FzIvFOuxIiYjAhZd2Bny8GYhg=; b=HCgx+jGtZKNuB3NMm4YvOVWYWAdIGECR/qV99oPyprrbeoMAK+L8p1ETP0lg5i1Qnc 5SIs2Vh6cDyihrzifyPQ+JaZ5M7rl9rZ97Zki4E9p+Hxnx3TyUfUxM+NihMFP9efYIUz yBJgr+6z3xGNbHRd9vhPw7HcvJQbt54AVAKh1n6bFpPF95DUy7UXna+PHV72D5mAKIf+ RpJizarhc+qq8EK1hD4tzZ6XeflqbbZvk2ajvpjDjoK5WTT0zgGjfSNDZaLRoh8a+8tU Pm1i7A4NWnOZfpY8syLG+Vph0FKzJ0aTQEKDdJdWZLbGak09InsM50Q6YLfaG0Ev0huR mC3g== X-Gm-Message-State: ALyK8tJjdVWWYm/HPMCZo3e2eKlxtccHzHm6LNWBVTRMMRi3te+TlrVn19InJAap+tcFqw== X-Received: by 10.28.98.197 with SMTP id w188mr38223311wmb.45.1468781096222; Sun, 17 Jul 2016 11:44:56 -0700 (PDT) Received: from ubuntu.fritz.box (p5DCD7945.dip0.t-ipconnect.de. [93.205.121.69]) by smtp.gmail.com with ESMTPSA id i66sm10448245wmg.9.2016.07.17.11.44.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jul 2016 11:44:55 -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 v3 2/6] meson: clk: Move register definitions to meson8b.h Date: Sun, 17 Jul 2016 20:44:47 +0200 Message-Id: <1468781091-39119-3-git-send-email-serveralex@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1468781091-39119-1-git-send-email-serveralex@gmail.com> References: <1468781091-39119-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-20160717_114515_709493_61436045 X-CRM114-Status: GOOD ( 15.21 ) 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 Move the register definitions into a separate header file to reflect the gxbb implementation. 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 */