diff options
Diffstat (limited to 'drivers/gpio/bcm6345_gpio.c')
-rw-r--r-- | drivers/gpio/bcm6345_gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c index 1c46020aa4..b9100cdc58 100644 --- a/drivers/gpio/bcm6345_gpio.c +++ b/drivers/gpio/bcm6345_gpio.c @@ -9,10 +9,10 @@ */ #include <common.h> +#include <dm.h> #include <errno.h> #include <asm/gpio.h> #include <asm/io.h> -#include <dm/device.h> DECLARE_GLOBAL_DATA_PTR; @@ -64,6 +64,8 @@ static int bcm6345_gpio_direction_output(struct udevice *dev, unsigned offset, { struct bcm6345_gpio_priv *priv = dev_get_priv(dev); + bcm6345_gpio_set_value(dev, offset, value); + return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 0); } @@ -92,11 +94,11 @@ static int bcm6345_gpio_probe(struct udevice *dev) fdt_addr_t data_addr, dirout_addr; fdt_size_t data_size, dirout_size; - dirout_addr = dev_get_addr_size_index(dev, 0, &dirout_size); + dirout_addr = devfdt_get_addr_size_index(dev, 0, &dirout_size); if (dirout_addr == FDT_ADDR_T_NONE) return -EINVAL; - data_addr = dev_get_addr_size_index(dev, 1, &data_size); + data_addr = devfdt_get_addr_size_index(dev, 1, &data_size); if (data_addr == FDT_ADDR_T_NONE) return -EINVAL; |