[U-Boot] [PATCH 1/8] Blackfin: spi: make cs deassert function deterministic

Wolfgang Denk wd at denx.de
Mon Apr 6 10:29:08 CEST 2009


Dear Mike Frysinger,

In message <1239004434-13962-2-git-send-email-vapier at gentoo.org> you wrote:
...
> diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c
> index bc3394a..bc255cc 100644
> --- a/drivers/spi/bfin_spi.c
> +++ b/drivers/spi/bfin_spi.c
> @@ -52,6 +52,7 @@ void spi_cs_activate(struct spi_slave *slave)
>  		(read_SPI_FLG(bss) &
>  		~((!bss->flg << 8) << slave->cs)) |
>  		(1 << slave->cs));
> +	SSYNC();

Should this sync not be integral part of the write_SPI_FLG() accessor?

> +	 */
> +	flg = read_SPI_FLG(bss) | ((!bss->flg << 8) << slave->cs);
> +	write_SPI_FLG(bss, flg);
> +	SSYNC();

Ditto here.

> +	debug("%s: SPI_FLG:%x\n", __func__, read_SPI_FLG(bss));
> +
> +	flg &= ~(1 << slave->cs);
> +	write_SPI_FLG(bss, flg);
> +	SSYNC();

And here.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I'd rather be led to hell than managed to heaven.


More information about the U-Boot mailing list