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>
This commit is contained in:
parent
f9ee57261f
commit
f24e36dac3
@ -330,11 +330,22 @@ static int rk3036_clk_probe(struct udevice *dev)
|
|||||||
static int rk3036_clk_bind(struct udevice *dev)
|
static int rk3036_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3036_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
debug("Warning: No RK3036 reset driver: ret=%d\n", ret);
|
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 rk3036_cru,
|
||||||
|
cru_glb_srst_fst_value);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk3036_cru,
|
||||||
|
cru_glb_srst_snd_value);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -573,11 +573,22 @@ static int rk3188_clk_probe(struct udevice *dev)
|
|||||||
static int rk3188_clk_bind(struct udevice *dev)
|
static int rk3188_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3188_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
debug("Warning: No rk3188 reset driver: ret=%d\n", ret);
|
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 rk3188_cru,
|
||||||
|
cru_glb_srst_fst_value);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk3188_cru,
|
||||||
|
cru_glb_srst_snd_value);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -385,11 +385,22 @@ static int rk322x_clk_probe(struct udevice *dev)
|
|||||||
static int rk322x_clk_bind(struct udevice *dev)
|
static int rk322x_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk322x_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
debug("Warning: No RK322x reset driver: ret=%d\n", ret);
|
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 rk322x_cru,
|
||||||
|
cru_glb_srst_fst_value);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk322x_cru,
|
||||||
|
cru_glb_srst_snd_value);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -859,11 +859,22 @@ static int rk3288_clk_probe(struct udevice *dev)
|
|||||||
static int rk3288_clk_bind(struct udevice *dev)
|
static int rk3288_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3288_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
debug("Warning: No RK3288 reset driver: ret=%d\n", ret);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -597,11 +597,22 @@ static int rk3328_clk_ofdata_to_platdata(struct udevice *dev)
|
|||||||
static int rk3328_clk_bind(struct udevice *dev)
|
static int rk3328_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3328_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
printf("Warning: No RK3328 reset driver: ret=%d\n", ret);
|
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 rk3328_cru,
|
||||||
|
glb_srst_fst_value);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk3328_cru,
|
||||||
|
glb_srst_snd_value);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -526,11 +526,22 @@ static int rk3368_clk_ofdata_to_platdata(struct udevice *dev)
|
|||||||
static int rk3368_clk_bind(struct udevice *dev)
|
static int rk3368_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3368_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
pr_err("bind RK3368 reset driver failed: ret=%d\n", ret);
|
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 rk3368_cru,
|
||||||
|
glb_srst_fst_val);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk3368_cru,
|
||||||
|
glb_srst_snd_val);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1033,11 +1033,22 @@ static int rk3399_clk_ofdata_to_platdata(struct udevice *dev)
|
|||||||
static int rk3399_clk_bind(struct udevice *dev)
|
static int rk3399_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rk3399_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
printf("Warning: No RK3399 reset driver: ret=%d\n", ret);
|
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 rk3399_cru,
|
||||||
|
glb_srst_fst_value);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rk3399_cru,
|
||||||
|
glb_srst_snd_value);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -223,11 +223,22 @@ static int rv1108_clk_probe(struct udevice *dev)
|
|||||||
static int rv1108_clk_bind(struct udevice *dev)
|
static int rv1108_clk_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
struct udevice *sys_child;
|
||||||
|
struct sysreset_reg *priv;
|
||||||
|
|
||||||
/* The reset driver does not have a device node, so bind it here */
|
/* The reset driver does not have a device node, so bind it here */
|
||||||
ret = device_bind_driver(gd->dm_root, "rv1108_sysreset", "reset", &dev);
|
ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
|
||||||
if (ret)
|
&sys_child);
|
||||||
pr_err("No Rv1108 reset driver: ret=%d\n", ret);
|
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 rv1108_cru,
|
||||||
|
glb_srst_fst_val);
|
||||||
|
priv->glb_srst_snd_value = offsetof(struct rv1108_cru,
|
||||||
|
glb_srst_snd_val);
|
||||||
|
sys_child->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user