summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip
diff options
context:
space:
mode:
authorElaine Zhang <zhangqing@rock-chips.com>2017-12-19 18:22:38 +0800
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-01-09 11:13:32 +0100
commit538f67c33251187af6ddc3f9b1499e7f415e968a (patch)
tree82778f677cdbd89f210ec27a7fcbe7525b9f44e6 /drivers/clk/rockchip
parent760188c1aa5b8b474340d3e090b4adc9400c2238 (diff)
rockchip: clk: bind reset driver
Bind rockchip reset to clock-controller with rockchip_reset_bind(). Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/clk/rockchip')
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c7
-rw-r--r--drivers/clk/rockchip/clk_rk3188.c7
-rw-r--r--drivers/clk/rockchip/clk_rk322x.c7
-rw-r--r--drivers/clk/rockchip/clk_rk3288.c7
-rw-r--r--drivers/clk/rockchip/clk_rk3328.c7
-rw-r--r--drivers/clk/rockchip/clk_rk3368.c7
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c21
-rw-r--r--drivers/clk/rockchip/clk_rv1108.c7
8 files changed, 70 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 280ebb9ba2..510a00a3aa 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -347,6 +347,13 @@ static int rk3036_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3036_cru, cru_softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 9);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index fca6899d8b..6451c95a32 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -590,6 +590,13 @@ static int rk3188_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3188_cru, cru_softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 9);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index ff52b55229..c8a241355a 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -402,6 +402,13 @@ static int rk322x_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk322x_cru, cru_softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 9);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index ac53239363..b64c1071c1 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -876,6 +876,13 @@ static int rk3288_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3288_cru, cru_softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 12);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 4d522a7816..fa0c777044 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -614,6 +614,13 @@ static int rk3328_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3328_cru, softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 12);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return ret;
}
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index bfeef39d2a..a8319917bb 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -543,6 +543,13 @@ static int rk3368_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3368_cru, softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 15);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return ret;
}
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 2e85ac7df2..2f4c4e343c 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -1046,6 +1046,13 @@ static int rk3399_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3399_cru, softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 21);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}
@@ -1221,6 +1228,19 @@ static int rk3399_pmuclk_ofdata_to_platdata(struct udevice *dev)
return 0;
}
+static int rk3399_pmuclk_bind(struct udevice *dev)
+{
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ int ret;
+
+ ret = offsetof(struct rk3399_pmucru, pmucru_softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 2);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+ return 0;
+}
+
static const struct udevice_id rk3399_pmuclk_ids[] = {
{ .compatible = "rockchip,rk3399-pmucru" },
{ }
@@ -1234,6 +1254,7 @@ U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = {
.ofdata_to_platdata = rk3399_pmuclk_ofdata_to_platdata,
.ops = &rk3399_pmuclk_ops,
.probe = rk3399_pmuclk_probe,
+ .bind = rk3399_pmuclk_bind,
#if CONFIG_IS_ENABLED(OF_PLATDATA)
.platdata_auto_alloc_size = sizeof(struct rk3399_pmuclk_plat),
#endif
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index a1195486a9..224c81355e 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -240,6 +240,13 @@ static int rv1108_clk_bind(struct udevice *dev)
sys_child->priv = priv;
}
+#if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
+ ret = offsetof(struct rk3368_cru, softrst_con[0]);
+ ret = rockchip_reset_bind(dev, ret, 13);
+ if (ret)
+ debug("Warning: software reset driver bind faile\n");
+#endif
+
return 0;
}