Commit 2dd57f5e47f20a387770e4ca4adca5427f819fe6
1 parent
bf501595cd
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
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>
Showing 1 changed file with 2 additions and 5 deletions Side-by-side Diff
drivers/misc/i2c_eeprom_emul.c
... | ... | @@ -9,7 +9,6 @@ |
9 | 9 | #include <common.h> |
10 | 10 | #include <dm.h> |
11 | 11 | #include <errno.h> |
12 | -#include <fdtdec.h> | |
13 | 12 | #include <i2c.h> |
14 | 13 | #include <malloc.h> |
15 | 14 | #include <asm/test.h> |
... | ... | @@ -115,10 +114,8 @@ |
115 | 114 | { |
116 | 115 | struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev); |
117 | 116 | |
118 | - plat->size = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), | |
119 | - "sandbox,size", 32); | |
120 | - plat->filename = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), | |
121 | - "sandbox,filename", NULL); | |
117 | + plat->size = dev_read_u32_default(dev, "sandbox,size", 32); | |
118 | + plat->filename = dev_read_string(dev, "sandbox,filename"); | |
122 | 119 | if (!plat->filename) { |
123 | 120 | debug("%s: No filename for device '%s'\n", __func__, |
124 | 121 | dev->name); |