From patchwork Fri Jun 10 00:27:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Turquette X-Patchwork-Id: 9168625 X-Patchwork-Delegate: mturquette@baylibre.com 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 0C88F604DB for ; Fri, 10 Jun 2016 00:27:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F39CF2835A for ; Fri, 10 Jun 2016 00:27:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E82D928365; Fri, 10 Jun 2016 00:27:52 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B55528364 for ; Fri, 10 Jun 2016 00:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750994AbcFJA1v (ORCPT ); Thu, 9 Jun 2016 20:27:51 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33015 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbcFJA1v (ORCPT ); Thu, 9 Jun 2016 20:27:51 -0400 Received: by mail-pa0-f47.google.com with SMTP id ec8so17967624pac.0 for ; Thu, 09 Jun 2016 17:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qDTbbZvnRUokU079auHeRxQpCoy+DV2yZ03IuJsszLo=; b=QMAQrKyQpvTNVnAonm87F2/4gInPH8JN9vTIGL8cc1px6c851xRGLL7dh9gQbzOq4l hUrImBN+DZjTMDgZFA/e+/CV1L9tSkcDQcLZgToJcYd6PVzUfFpnVw1zFoaSCM+J3L5r eNVev3dZGnZ/5b2PTRu7hN/ZiXoXTVniCAT6VrpScdeg8EEleRVOAxRp934J4jxfS9pq uZqBLBcK0WMSDyMVHPNcOEpUjYnXNWLP73ZbuPGKr80R/9FAg81jAl+bOG3q082zjupH LzSZyS4s/+bNnYC9mHjnRklPSIEssMJpJOsij3vbSftLzm49d7lyRiDd247RiCBSWR30 RDsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qDTbbZvnRUokU079auHeRxQpCoy+DV2yZ03IuJsszLo=; b=fd7S0OJSGdaT+hoQbVHmbiEioC9eiZrX98ezEz2pFgcZzSRp4NY5yzgb6ls4t1fiRP BUOlWmCrwhf8OriiUinzEljPVk/+4OAZUeeHNGPMpSo+lBLKXIgSEYQOstmgPB6onHvC YMHKj0vRX84ODKtOTyBJkjICGxe+W32XFdptcShh2M3oeYdOyHdU/RVXIqNAAAdKLeHL ixL4jGfef66+rP9Mqga/WwQteXyvh7QFgWVDvl06jBdlZ6Cy00hIyU3A+Gx6lv78uKj5 zZyuuLR78mlR1Xrt0coF6/QhnHgirZTa1p143toDLJyxT+koKoeduvrcyyTC7y1IE/Fg NNDA== X-Gm-Message-State: ALyK8tIfCU7L695RkkIAaTWFIAeAXu1xxhWNYfJrGcJ/hmq3LmcWbunkKZIT+/oWaIAxx2Gi X-Received: by 10.66.249.161 with SMTP id yv1mr15307720pac.39.1465518470281; Thu, 09 Jun 2016 17:27:50 -0700 (PDT) Received: from localhost (cpe-172-248-200-249.socal.res.rr.com. [172.248.200.249]) by smtp.gmail.com with ESMTPSA id 7sm12770638pfn.30.2016.06.09.17.27.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jun 2016 17:27:49 -0700 (PDT) From: Michael Turquette To: linux-clk@vger.kernel.org Cc: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@endlessm.com, victor.wan@amlogic.com, jerry.cao@amlogic.com, xing.xu@amlogic.com Subject: [PATCH 01/10] clk: meson8b: rectify reg offsets with datasheet Date: Thu, 9 Jun 2016 17:27:38 -0700 Message-Id: <1465518467-23939-2-git-send-email-mturquette@baylibre.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465518467-23939-1-git-send-email-mturquette@baylibre.com> References: <1465518467-23939-1-git-send-email-mturquette@baylibre.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The register offsets in the data sheet are confusing. Document them more thoroughly. Signed-off-by: Michael Turquette --- drivers/clk/meson/meson8b-clkc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/clk/meson/meson8b-clkc.c b/drivers/clk/meson/meson8b-clkc.c index 4d057b3..444ef94 100644 --- a/drivers/clk/meson/meson8b-clkc.c +++ b/drivers/clk/meson/meson8b-clkc.c @@ -24,10 +24,19 @@ #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_CTL0_ADDR 0x0000 -#define MESON8B_REG_SYS_CPU_CNTL1 0x015c -#define MESON8B_REG_HHI_MPEG 0x0174 -#define MESON8B_REG_MALI 0x01b0 +#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