From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Chris Ruehl <chris.ruehl@gtsys.com.hk>,
alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3 v3] usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
Date: Sat, 30 Nov 2013 21:28:06 +0400 [thread overview]
Message-ID: <529A2026.4050605@cogentembedded.com> (raw)
In-Reply-To: <1385783513-22502-1-git-send-email-chris.ruehl@gtsys.com.hk>
Hello.
On 30-11-2013 7:51, Chris Ruehl wrote:
> usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
> * init the sts flag to 0 (missed)
> * Set PORTCS_STS only if VUSB_HS_PHY_TYPE > 1
> otherwise the register is ReadOnly
> * Set/Reset correct BIT(28)/BIT(29) for STS
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
The coding style is still wrong at places...
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 5075407..2c634c1 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
[...]
> @@ -273,10 +273,24 @@ static void hw_phymode_configure(struct ci_hdrc *ci)
>
> if (ci->hw_bank.lpm) {
> hw_write(ci, OP_DEVLC, DEVLC_PTS(7) | DEVLC_PTW, lpm);
> - hw_write(ci, OP_DEVLC, DEVLC_STS, sts);
> + if ( sts )
Remove spaces around 'sts', please.
> + hw_write(ci, OP_DEVLC, DEVLC_STS, BIT(28));
> + else
> + hw_write(ci, OP_DEVLC, DEVLC_STS, ~BIT(28));
> } else {
> hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc);
> - hw_write(ci, OP_PORTSC, PORTSC_STS, sts);
> + if (((portsc >> 30) & 0x3) > 1) {
> + if (sts) {
> + hw_write(ci, OP_PORTSC, PORTSC_STS, BIT(29));
> + }
> + else {
} else {
> + portsc = (ioread32(ci->hw_bank.regmap[OP_PORTSC])
> + & PORTSC_STS);
No need for outer (). And it's preferred that an operator is left at the
end of a first line, not starts the continuation line.
WBR, Sergei
next prev parent reply other threads:[~2013-11-30 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 3:51 [PATCH 2/3 v3] usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag Chris Ruehl
2013-11-30 10:20 ` Peter Chen
2013-12-02 1:49 ` Chris Ruehl
2013-12-02 5:10 ` Peter Chen
2013-12-02 5:17 ` Chris Ruehl
2013-11-30 17:28 ` Sergei Shtylyov [this message]
2013-12-02 1:57 ` Chris Ruehl
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=529A2026.4050605@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=chris.ruehl@gtsys.com.hk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.