diff mbox

[U-Boot,RFC,1/4] rockchip: clk: rk3368: update for 32/64bit-aware OF_PLATDATA

Message ID 1502730333-63031-2-git-send-email-philipp.tomsich@theobroma-systems.com
State Superseded
Delegated to: Philipp Tomsich
Headers show

Commit Message

Philipp Tomsich Aug. 14, 2017, 5:05 p.m. UTC
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 <philipp.tomsich@theobroma-systems.com>

---

 drivers/clk/rockchip/clk_rk3368.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philipp Tomsich Aug. 18, 2017, 4:12 p.m. UTC | #1
> 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 <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/clk/rockchip/clk_rk3368.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Simon Glass Aug. 26, 2017, 1:38 p.m. UTC | #2
On 14 August 2017 at 11:05, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> 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 <philipp.tomsich@theobroma-systems.com>
>
> ---
>
>  drivers/clk/rockchip/clk_rk3368.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

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);