mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-02 01:20:47 +09:00
rockchip: pinctrl: Update the rk3288 driver to support of-platdata
Add support for of-platdata with rk3288. This requires disabling access to the device tree and renaming the driver to match the string that of-platdata will search for. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2d143bd619
commit
d95b14ffab
@ -476,6 +476,7 @@ static int rk3288_pinctrl_request(struct udevice *dev, int func, int flags)
|
|||||||
static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
|
static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
|
||||||
struct udevice *periph)
|
struct udevice *periph)
|
||||||
{
|
{
|
||||||
|
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||||
u32 cell[3];
|
u32 cell[3];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -506,6 +507,7 @@ static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
|
|||||||
case 103:
|
case 103:
|
||||||
return PERIPH_ID_HDMI;
|
return PERIPH_ID_HDMI;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
@ -664,8 +666,12 @@ static struct pinctrl_ops rk3288_pinctrl_ops = {
|
|||||||
|
|
||||||
static int rk3288_pinctrl_bind(struct udevice *dev)
|
static int rk3288_pinctrl_bind(struct udevice *dev)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
/* scan child GPIO banks */
|
/* scan child GPIO banks */
|
||||||
return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
|
return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
@ -719,7 +725,7 @@ static const struct udevice_id rk3288_pinctrl_ids[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
U_BOOT_DRIVER(pinctrl_rk3288) = {
|
U_BOOT_DRIVER(pinctrl_rk3288) = {
|
||||||
.name = "pinctrl_rk3288",
|
.name = "rockchip_rk3288_pinctrl",
|
||||||
.id = UCLASS_PINCTRL,
|
.id = UCLASS_PINCTRL,
|
||||||
.of_match = rk3288_pinctrl_ids,
|
.of_match = rk3288_pinctrl_ids,
|
||||||
.priv_auto_alloc_size = sizeof(struct rk3288_pinctrl_priv),
|
.priv_auto_alloc_size = sizeof(struct rk3288_pinctrl_priv),
|
||||||
|
Loading…
Reference in New Issue
Block a user