mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-30 15:11:43 +01:00
gpio: dwapb_gpio: Change to use dev_read_addr()
This changes the driver to use dev_read_addr() which is safe both for flat trees and live trees. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
This commit is contained in:
parent
db6a158bc3
commit
9ea354444d
@ -159,7 +159,7 @@ static int gpio_dwapb_bind(struct udevice *dev)
|
|||||||
if (plat)
|
if (plat)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
base = fdtdec_get_addr(blob, dev_of_offset(dev), "reg");
|
base = dev_read_addr(dev);
|
||||||
if (base == FDT_ADDR_T_NONE) {
|
if (base == FDT_ADDR_T_NONE) {
|
||||||
debug("Can't get the GPIO register base address\n");
|
debug("Can't get the GPIO register base address\n");
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user