From patchwork Sat Aug 27 17:40:50 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: 9302497 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 3AD75608A7 for ; Sat, 27 Aug 2016 17:41:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AEEE28A36 for ; Sat, 27 Aug 2016 17:41:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FFAD28A3A; Sat, 27 Aug 2016 17:41:30 +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 7E64C28A37 for ; Sat, 27 Aug 2016 17:41:29 +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 1bdhbh-000780-5m; Sat, 27 Aug 2016 17:41:25 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bdhbd-000756-UG for linux-amlogic@lists.infradead.org; Sat, 27 Aug 2016 17:41:23 +0000 Received: by mail-wm0-x243.google.com with SMTP id i138so3781769wmf.3 for ; Sat, 27 Aug 2016 10:41:01 -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=7kMoy6pMM8tdT/fmOgoMBcCdM0KGn/5PKN6C8xly1js=; b=bRW4A9oR0va1afWiDeTqb3W8eK8JCp2lSUuKgASuxWitCPrVxVvEI3bLcn8/FmPOyw XeYp6A3p4W+dqvpbMjd5xISeSTA7z53AlBfUb0bp68dp2HiHyPtz7WEiuYTNLCmmflat Nu4ClkKhCl0R8ifrloYpKko4aF1Izd9TUsEtCqcAntIumny6Y0BRu7ESXYyLj79zfikv q7Fs8UOAVro4+oqE8IuXiv1Mg5c0g8L9XDp7XvP9KbeSAdKrTBcLSYewAvDBRuQHvWTP cdQjOYExOM2ssHZ9n8UeeHvBK0VsCUNNbW6GU5wOMakBrxw0cLls98GtTsT6Y5MH7sgE zHaQ== 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=7kMoy6pMM8tdT/fmOgoMBcCdM0KGn/5PKN6C8xly1js=; b=Ax4JuPJi/tDhUO5A0zY6JNmW4zPA7YYhbGtsDlrTW98Wy2dZKnhfBiCiDvS+dV2Gke XvGVUsCjaRz5TSOWqmWOUBRqk7aczO8KEWDtvNCosjAjwhWIyltSIIomZTpbogbSnnmx oaZlDfGpTNgyAf7MJiX7f8AunhPukbt3jYF7CHcA+JEK69+4zfMEjiXUpsPuKS26XmQk 9owZx6XLG0oomuhbTmLWuTrGsV0damwQWRLuGV21yGx+vL56xaiGiDk5WLKkaevZBBAE IhUpYL1ei+vmqndFhOSdhdzv3bks+BNzwU69hLvUOujI80Nevanxbn+qYQjxeF9LzDah XLuQ== X-Gm-Message-State: AE9vXwM1HWDHoeLWjWXkDjuxFt8DxRv0vK9Hz6wvaJJxebR/MsotNNgFz5UyVBAdMINMQg== X-Received: by 10.28.191.14 with SMTP id p14mr3972238wmf.39.1472319659941; Sat, 27 Aug 2016 10:40:59 -0700 (PDT) Received: from ubuntu.fritz.box (p4FC549B9.dip0.t-ipconnect.de. [79.197.73.185]) by smtp.gmail.com with ESMTPSA id v189sm4701628wmv.12.2016.08.27.10.40.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Aug 2016 10:40:59 -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 v5 2/6] meson: clk: Move register definitions to meson8b.h Date: Sat, 27 Aug 2016 19:40:50 +0200 Message-Id: <1472319654-59048-3-git-send-email-serveralex@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1472319654-59048-1-git-send-email-serveralex@gmail.com> References: <1472319654-59048-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-20160827_104122_254986_7A78AC90 X-CRM114-Status: GOOD ( 14.92 ) 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 4c9413c..d52ae53 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -28,22 +28,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 */