rockchip: pinctrl: use fdtdec_get_int_array() to get interrupt
Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk which add by mmc_bind(), if we use dev_read_u32_array(), the interface will use the ofnode directly and end with: assert(ofnode_valid(node)); Use fdtdec_get_int_array() instead. Change-Id: I1fc90ad0bd22451856e97be7728ba9996bf3bc0c Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
cf5771bef7
commit
95830dbaf7
|
|
@ -193,7 +193,8 @@ static int rk3036_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -370,7 +370,8 @@ static int rk3188_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -597,7 +597,8 @@ static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,8 @@ static int rk3328_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,8 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ static int rv1108_pinctrl_get_periph_id(struct udevice *dev,
|
|||
u32 cell[3];
|
||||
int ret;
|
||||
|
||||
ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
|
||||
ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
|
||||
"interrupts", cell, ARRAY_SIZE(cell));
|
||||
if (ret < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue