[U-Boot] [PATCH 3/5] mtd: rawnand: denali: add reset handling

Marek Vasut marex at denx.de
Sat Jan 26 08:58:38 UTC 2019


On 1/25/19 9:30 PM, Simon Goldschmidt wrote:
> This adds reset handling to the devicetree-enabled denalid nand driver.
> 
> For backwards compatibility, only a warning is printed when failing to
> get reset handles.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
> 
>  drivers/mtd/nand/raw/denali_dt.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
> index d384b974df..21c4540637 100644
> --- a/drivers/mtd/nand/raw/denali_dt.c
> +++ b/drivers/mtd/nand/raw/denali_dt.c
> @@ -9,6 +9,7 @@
>  #include <linux/io.h>
>  #include <linux/ioport.h>
>  #include <linux/printk.h>
> +#include <reset.h>
>  
>  #include "denali.h"
>  
> @@ -64,6 +65,7 @@ static int denali_dt_probe(struct udevice *dev)
>  	const struct denali_dt_data *data;
>  	struct clk clk, clk_x, clk_ecc;
>  	struct resource res;
> +	struct reset_ctl_bulk reset_bulk;
>  	int ret;
>  
>  	data = (void *)dev_get_driver_data(dev);
> @@ -131,6 +133,12 @@ static int denali_dt_probe(struct udevice *dev)
>  		denali->clk_x_rate = 200000000;
>  	}
>  
> +	ret = reset_get_bulk(bus, &reset_bulk);
> +	if (ret)
> +		dev_warn(bus, "Cant' get reset: %d\n", ret);

Can't , misplaced "'"

> +	else
> +		reset_deassert_bulk(&reset_bulk);
> +
>  	return denali_init(denali);
>  }
>  
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list