]> git.sur5r.net Git - u-boot/blobdiff - drivers/misc/i2c_eeprom_emul.c
clk: uniphier: disable SPL_CLK
[u-boot] / drivers / misc / i2c_eeprom_emul.c
index 4410d0357ff37f63020a8e5820a3ca3d2ced7b13..52aa7d69e96cacb80e0c3c0aac19e9b862c1b9f9 100644 (file)
@@ -9,7 +9,6 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
-#include <fdtdec.h>
 #include <i2c.h>
 #include <malloc.h>
 #include <asm/test.h>
@@ -115,10 +114,8 @@ static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
 {
        struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
 
-       plat->size = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-                                   "sandbox,size", 32);
-       plat->filename = fdt_getprop(gd->fdt_blob, dev->of_offset,
-                                    "sandbox,filename", NULL);
+       plat->size = dev_read_u32_default(dev, "sandbox,size", 32);
+       plat->filename = dev_read_string(dev, "sandbox,filename");
        if (!plat->filename) {
                debug("%s: No filename for device '%s'\n", __func__,
                      dev->name);