summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-08-01 19:38:23 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-01 19:38:23 (GMT)
commit5c6631beb27491f3f78b6a0ad888d38810e3d96b (patch)
tree3b02d26a83a2e58bbc0741f2b78474461f273b93 /common
parent6364a5d4bd55beeedc11171419acd0bdff17a599 (diff)
parent5c970013a661c630ab28ddc3dd6766fe6bf83ece (diff)
downloadu-boot-fsl-qoriq-5c6631beb27491f3f78b6a0ad888d38810e3d96b.tar.xz
Merge git://git.denx.de/u-boot-mmc
Diffstat (limited to 'common')
-rw-r--r--common/fdt_support.c7
-rw-r--r--common/spl/spl_mmc.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 5aa8e34..7ccf8b1 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -1464,14 +1464,11 @@ int fdt_verify_alias_address(void *fdt, int anode, const char *alias, u64 addr)
u64 fdt_get_base_address(const void *fdt, int node)
{
int size;
- u32 naddr;
const fdt32_t *prop;
- naddr = fdt_address_cells(fdt, node);
+ prop = fdt_getprop(fdt, node, "reg", &size);
- prop = fdt_getprop(fdt, node, "ranges", &size);
-
- return prop ? fdt_translate_address(fdt, node, prop + naddr) : 0;
+ return prop ? fdt_translate_address(fdt, node, prop) : 0;
}
/*
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index bb48cac..d95f94c 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -115,7 +115,7 @@ static int spl_mmc_get_device_index(u32 boot_device)
static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
{
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
struct udevice *dev;
#endif
int err, mmc_dev;
@@ -132,7 +132,7 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
return err;
}
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
err = uclass_get_device(UCLASS_MMC, mmc_dev, &dev);
if (!err)
*mmcp = mmc_get_mmc_dev(dev);