From patchwork Mon Aug 14 17:05:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 801275 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xWMW221BYz9t2h for ; Tue, 15 Aug 2017 03:07:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8C102C21E30; Mon, 14 Aug 2017 17:06:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 161B1C21DD4; Mon, 14 Aug 2017 17:05:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3B12AC21DAC; Mon, 14 Aug 2017 17:05:46 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id 6F5F2C21D63 for ; Mon, 14 Aug 2017 17:05:46 +0000 (UTC) Received: from [86.59.122.178] (port=60345 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1dhIoA-0004I2-1j; Mon, 14 Aug 2017 19:05:42 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Mon, 14 Aug 2017 19:05:30 +0200 Message-Id: <1502730333-63031-2-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1502730333-63031-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1502730333-63031-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Andy Yan , Klaus Goger Subject: [U-Boot] [RFC PATCH 1/4] rockchip: clk: rk3368: update for 32/64bit-aware OF_PLATDATA X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With dtoc emitting fdt64_t for addresses (and region sizes), the array indices for accessing the reg[] array needs to be adjusted. This adjusts the clk_rk3368 driver to correctly handle OF_PLATDATA given this new structure layout. Signed-off-by: Philipp Tomsich Acked-by: Philipp Tomsich Reviewed-by: Simon Glass --- drivers/clk/rockchip/clk_rk3368.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c index 2be1f57..0160d50 100644 --- a/drivers/clk/rockchip/clk_rk3368.c +++ b/drivers/clk/rockchip/clk_rk3368.c @@ -471,7 +471,7 @@ static int rk3368_clk_probe(struct udevice *dev) #if CONFIG_IS_ENABLED(OF_PLATDATA) struct rk3368_clk_plat *plat = dev_get_platdata(dev); - priv->cru = map_sysmem(plat->dtd.reg[1], plat->dtd.reg[3]); + priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); #endif #if IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_TPL_BUILD) rkclk_init(priv->cru);