summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:09:52 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:15 (GMT)
commit2dd57f5e47f20a387770e4ca4adca5427f819fe6 (patch)
treea1933d6ad08b68029f5b1dc48b69342b9671a7a2 /drivers/misc
parentbf501595cd5981b0196b51505ad50972b1c34cc4 (diff)
downloadu-boot-fsl-qoriq-2dd57f5e47f20a387770e4ca4adca5427f819fe6.tar.xz
dm: Update the I2C eeprom driver for livetree
Update this driver so that it works with livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/i2c_eeprom_emul.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 02de8d7..52aa7d6 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -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(dev),
- "sandbox,size", 32);
- plat->filename = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
- "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);