mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-04 18:40:42 +09:00
pl01x: Convert to dev_read
The fdtdec API is deprecated, convert the pl010 and pl011 devices to use the dev_read API instead. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
9dfeffe2f9
commit
b31116308c
@ -20,7 +20,6 @@
|
|||||||
#include <dm/platform_data/serial_pl01x.h>
|
#include <dm/platform_data/serial_pl01x.h>
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include "serial_pl01x_internal.h"
|
#include "serial_pl01x_internal.h"
|
||||||
#include <fdtdec.h>
|
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
@ -354,11 +353,10 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
plat->base = addr;
|
plat->base = addr;
|
||||||
plat->clock = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "clock",
|
plat->clock = dev_read_u32_default(dev, "clock", 1);
|
||||||
1);
|
|
||||||
plat->type = dev_get_driver_data(dev);
|
plat->type = dev_get_driver_data(dev);
|
||||||
plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
|
plat->skip_init = dev_read_bool(dev, "skip-init");
|
||||||
"skip-init");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user