reset: bcm6345: convert to use live dt

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2018-03-22 19:39:31 +01:00 committed by Daniel Schwierzeck
parent 2902997b8b
commit 56d4b706d3

View File

@ -66,15 +66,11 @@ static const struct udevice_id bcm6345_reset_ids[] = {
static int bcm6345_reset_probe(struct udevice *dev) static int bcm6345_reset_probe(struct udevice *dev)
{ {
struct bcm6345_reset_priv *priv = dev_get_priv(dev); struct bcm6345_reset_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
fdt_size_t size;
addr = devfdt_get_addr_size_index(dev, 0, &size); priv->regs = dev_remap_addr(dev);
if (addr == FDT_ADDR_T_NONE) if (!priv->regs)
return -EINVAL; return -EINVAL;
priv->regs = ioremap(addr, size);
return 0; return 0;
} }