mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 16:10:24 +09:00
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>
This commit is contained in:
parent
bf501595cd
commit
2dd57f5e47
@ -9,7 +9,6 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fdtdec.h>
|
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <asm/test.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);
|
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
|
||||||
|
|
||||||
plat->size = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
|
plat->size = dev_read_u32_default(dev, "sandbox,size", 32);
|
||||||
"sandbox,size", 32);
|
plat->filename = dev_read_string(dev, "sandbox,filename");
|
||||||
plat->filename = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
|
|
||||||
"sandbox,filename", NULL);
|
|
||||||
if (!plat->filename) {
|
if (!plat->filename) {
|
||||||
debug("%s: No filename for device '%s'\n", __func__,
|
debug("%s: No filename for device '%s'\n", __func__,
|
||||||
dev->name);
|
dev->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user