From: Dirk Behme <dirk.behme@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spi: mxc_spi: Fix ECSPI reset handling
Date: Wed, 03 Apr 2013 18:54:52 +0200 [thread overview]
Message-ID: <515C5EDC.8000109@gmail.com> (raw)
In-Reply-To: <515BF27F.2030404@denx.de>
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
next prev parent reply other threads:[~2013-04-03 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 8:03 [U-Boot] [PATCH] spi: mxc_spi: Fix ECSPI reset handling Dirk Behme
2013-04-03 9:12 ` Stefano Babic
2013-04-03 16:54 ` Dirk Behme [this message]
2013-04-04 8:29 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515C5EDC.8000109@gmail.com \
--to=dirk.behme@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox