[PATCH 1/2] scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1

Sascha Hauer s.hauer at pengutronix.de
Sun Aug 21 23:02:19 PDT 2016


On Sun, Aug 21, 2016 at 10:18:36PM +0200, Alexander Kurz wrote:
> Do some cleanup which enables DCDv1 16 bit write access as side effect.
> 
> Signed-off-by: Alexander Kurz <akurz at blala.de>
> ---
>  scripts/imx/imx-usb-loader.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
> index 1732497..9f25ca6 100644
> --- a/scripts/imx/imx-usb-loader.c
> +++ b/scripts/imx/imx-usb-loader.c
> @@ -889,16 +889,11 @@ static int write_dcd_table_old(const struct imx_flash_header *hdr,
>  
>  		switch (type) {
>  		case 1:
> -			if (verbose > 1)
> -				printf("type=%08x *0x%08x = 0x%08x\n", type, addr, val);
> -			err = write_memory(addr, val, 1);
> -			if (err < 0)
> -				return err;
> -			break;
> +		case 2:
>  		case 4:
>  			if (verbose > 1)
>  				printf("type=%08x *0x%08x = 0x%08x\n", type, addr, val);
> -			err = write_memory(addr, val, 4);
> +			err = write_memory(addr, val, type);
>  			if (err < 0)
>  				return err;
>  			break;
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list