Re: [U-Boot] [PATCH 1/2] watchdog: orion_wdt: support SPL usage

2019-02-15 Thread Stefan Roese

On 15.02.19 03:12, Chris Packham wrote:

When run from the SPL the mvebu targets are using the hardware default
offset for the SoC peripherals. devfdt_get_addr_size_index() understands
how to deal with this via dm_get_translation_offset() so use this
instead of fdtdec_get_addr_size_auto_noparent().

Signed-off-by: Chris Packham 


Reviewed-by: Stefan Roese 

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] watchdog: orion_wdt: support SPL usage

2019-02-14 Thread Chris Packham
When run from the SPL the mvebu targets are using the hardware default
offset for the SoC peripherals. devfdt_get_addr_size_index() understands
how to deal with this via dm_get_translation_offset() so use this
instead of fdtdec_get_addr_size_auto_noparent().

Signed-off-by: Chris Packham 
---

 drivers/watchdog/orion_wdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index a0df02d10382..c1add3e7c121 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -114,9 +114,7 @@ static inline bool save_reg_from_ofdata(struct udevice 
*dev, int index,
fdt_addr_t addr;
fdt_size_t off;
 
-   addr = fdtdec_get_addr_size_auto_noparent(
-   gd->fdt_blob, dev_of_offset(dev), "reg", index, , true);
-
+   addr = devfdt_get_addr_size_index(dev, index, );
if (addr == FDT_ADDR_T_NONE)
return false;
 
-- 
2.20.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot