diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2017-11-03 15:16:13 +0800 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-11-21 23:57:23 +0100 |
commit | f24e36dac38e520f79f8eb5d20ba3adbc987afb9 (patch) | |
tree | 64079a8b3b0a37f7c0b32f097cbc0257dc358acd /drivers/clk/rockchip/clk_rk3288.c | |
parent | f9ee57261f7f6cd83f6910cef66cd13bf880209f (diff) |
rockchip: clock: update sysreset driver binding
Using priv for new sysreset driver binding.
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/clk_rk3288.c')
-rw-r--r-- | drivers/clk/rockchip/clk_rk3288.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c index a133810bf6..ac53239363 100644 --- a/drivers/clk/rockchip/clk_rk3288.c +++ b/drivers/clk/rockchip/clk_rk3288.c @@ -859,11 +859,22 @@ static int rk3288_clk_probe(struct udevice *dev) static int rk3288_clk_bind(struct udevice *dev) { int ret; + struct udevice *sys_child; + struct sysreset_reg *priv; /* The reset driver does not have a device node, so bind it here */ - ret = device_bind_driver(gd->dm_root, "rk3288_sysreset", "reset", &dev); - if (ret) - debug("Warning: No RK3288 reset driver: ret=%d\n", ret); + ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset", + &sys_child); + if (ret) { + debug("Warning: No sysreset driver: ret=%d\n", ret); + } else { + priv = malloc(sizeof(struct sysreset_reg)); + priv->glb_srst_fst_value = offsetof(struct rk3288_cru, + cru_glb_srst_fst_value); + priv->glb_srst_snd_value = offsetof(struct rk3288_cru, + cru_glb_srst_snd_value); + sys_child->priv = priv; + } return 0; } |