diff options
author | Tom Rini <trini@konsulko.com> | 2021-02-12 09:09:10 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-12 09:09:10 -0500 |
commit | 7c82e12cc4e9e25d7c89fe15bfeec4e9b0bb2b4d (patch) | |
tree | fa26858ef3ca931b31456045461e239cbe57719b | |
parent | 80c7e4cf76d204d4b726b0cc57a557a9d9c1c453 (diff) | |
parent | 65bde1c087f847a2e279501e27eeaddba16e3b51 (diff) | |
download | u-boot-7c82e12cc4e9e25d7c89fe15bfeec4e9b0bb2b4d.tar.gz |
Merge tag 'u-boot-atmel-fixes-2021.04-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmelWIP/12Feb2021
First set of u-boot-atmel fixes for 2021.04 cycle:
This small PR includes just two fixes but very important: one revert in
the clk subsystem which fixes the boot on many old boards
(sama5d2_xplained, sama5d4_xplained), which currently crash at boot; and
one small fix related to debug serial on sama7g5ek board.
-rw-r--r-- | arch/arm/dts/sama7g5ek.dts | 2 | ||||
-rw-r--r-- | drivers/clk/at91/compat.c | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/arch/arm/dts/sama7g5ek.dts b/arch/arm/dts/sama7g5ek.dts index ff9c9eb45c..3a4fdd38a5 100644 --- a/arch/arm/dts/sama7g5ek.dts +++ b/arch/arm/dts/sama7g5ek.dts @@ -122,7 +122,7 @@ pinctrl_flx3_default: flx3_default { pinmux = <PIN_PD16__FLEXCOM3_IO0>, <PIN_PD17__FLEXCOM3_IO1>; - bias-disable; + bias-pull-up; }; pinctrl_sdmmc0_cmd_data_default: sdmmc0_cmd_data_default { diff --git a/drivers/clk/at91/compat.c b/drivers/clk/at91/compat.c index e514f26656..dfdc3a6a92 100644 --- a/drivers/clk/at91/compat.c +++ b/drivers/clk/at91/compat.c @@ -62,30 +62,34 @@ static int at91_pmc_core_probe(struct udevice *dev) */ int at91_clk_sub_device_bind(struct udevice *dev, const char *drv_name) { - ofnode parent = dev_ofnode(dev); - ofnode node; + const void *fdt = gd->fdt_blob; + int offset = dev_of_offset(dev); bool pre_reloc_only = !(gd->flags & GD_FLG_RELOC); const char *name; int ret; - ofnode_for_each_subnode(node, parent) { - if (pre_reloc_only && !ofnode_pre_reloc(node)) + for (offset = fdt_first_subnode(fdt, offset); + offset > 0; + offset = fdt_next_subnode(fdt, offset)) { + if (pre_reloc_only && + !ofnode_pre_reloc(offset_to_ofnode(offset))) continue; /* * If this node has "compatible" property, this is not * a clock sub-node, but a normal device. skip. */ - if (ofnode_read_prop(node, "compatible", NULL)) + fdt_get_property(fdt, offset, "compatible", &ret); + if (ret >= 0) continue; if (ret != -FDT_ERR_NOTFOUND) return ret; - name = ofnode_get_name(node); + name = fdt_get_name(fdt, offset, NULL); if (!name) return -EINVAL; - ret = device_bind_driver_to_node(dev, drv_name, name, node, - NULL); + ret = device_bind_driver_to_node(dev, drv_name, name, + offset_to_ofnode(offset), NULL); if (ret) return ret; } |