mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 12:01:31 +00:00
dm: sandbox: spi: Convert driver to support livetree
Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
656f29d1ca
commit
a11817999f
1 changed files with 2 additions and 4 deletions
|
@ -515,11 +515,9 @@ static int sandbox_sf_xfer(struct udevice *dev, unsigned int bitlen,
|
||||||
int sandbox_sf_ofdata_to_platdata(struct udevice *dev)
|
int sandbox_sf_ofdata_to_platdata(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct sandbox_spi_flash_plat_data *pdata = dev_get_platdata(dev);
|
struct sandbox_spi_flash_plat_data *pdata = dev_get_platdata(dev);
|
||||||
const void *blob = gd->fdt_blob;
|
|
||||||
int node = dev_of_offset(dev);
|
|
||||||
|
|
||||||
pdata->filename = fdt_getprop(blob, node, "sandbox,filename", NULL);
|
pdata->filename = dev_read_string(dev, "sandbox,filename");
|
||||||
pdata->device_name = fdt_getprop(blob, node, "compatible", NULL);
|
pdata->device_name = dev_read_string(dev, "compatible");
|
||||||
if (!pdata->filename || !pdata->device_name) {
|
if (!pdata->filename || !pdata->device_name) {
|
||||||
debug("%s: Missing properties, filename=%s, device_name=%s\n",
|
debug("%s: Missing properties, filename=%s, device_name=%s\n",
|
||||||
__func__, pdata->filename, pdata->device_name);
|
__func__, pdata->filename, pdata->device_name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue