Am 03.04.2013 11:12, schrieb Stefano Babic:
On 21/03/2013 09:03, Dirk Behme wrote:
Reviewing the ECSPI reset handling shows two issues:
Hi Dirk,
agree completely, only a very minor question..
+
+ reg_ctrl = reg_read(®s->ctrl);
As you says, it makes no sense to read back the value of the register,
also because reg_ctrl is overwritten some lines later ;-)
Hmm, sorry if I overlooked something, but we have to initialize the
variable 'reg_ctrl' with the recent register content because it is
first used and _then_ overwritten in the next step:
reg_ctrl = (reg_ctrl & ~MXC_CSPICTRL_SELCHAN(3)) |
MXC_CSPICTRL_SELCHAN(cs);
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=drivers/spi/mxc_spi.c;h=d792d8d493c13c475ec8ca03694f4efd8fde0e7f;hb=HEAD#l170
(?)
Best regards
Dirk
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot