diff mbox

usb: phy: rcar-gen2-usb: Fix USBHS_UGSTS_LOCK value

Message ID 1427973754-4868-1-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Yoshihiro Shimoda April 2, 2015, 11:22 a.m. UTC
According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK
bit location is bit 8, not bits 9 and 8. So, this patch fixes the
USBHS_UGSTS_LOCK value.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/usb/phy/phy-rcar-gen2-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Felipe Balbi April 27, 2015, 7:45 p.m. UTC | #1
Hi,

On Thu, Apr 02, 2015 at 08:22:34PM +0900, Yoshihiro Shimoda wrote:
> According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK
> bit location is bit 8, not bits 9 and 8. So, this patch fixes the
> USBHS_UGSTS_LOCK value.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

this doesn't apply to v4.1-rc1, if it's still needed, please rebase.
Yoshihiro Shimoda April 28, 2015, 1:36 a.m. UTC | #2
Hi,

> Sent: Tuesday, April 28, 2015 4:45 AM
> 
> Hi,
> 
> On Thu, Apr 02, 2015 at 08:22:34PM +0900, Yoshihiro Shimoda wrote:
> > According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK
> > bit location is bit 8, not bits 9 and 8. So, this patch fixes the
> > USBHS_UGSTS_LOCK value.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> 
> this doesn't apply to v4.1-rc1, if it's still needed, please rebase.

Thank you for the notice. I found that this patch has been already merged in v4.1-rc1 by Greg.

Best regards,
Yoshihiro Shimoda

> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven April 28, 2015, 9:55 a.m. UTC | #3
Hi Shimoda-san,

On Tue, Apr 28, 2015 at 3:36 AM, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
>> Sent: Tuesday, April 28, 2015 4:45 AM
>> On Thu, Apr 02, 2015 at 08:22:34PM +0900, Yoshihiro Shimoda wrote:
>> > According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK
>> > bit location is bit 8, not bits 9 and 8. So, this patch fixes the
>> > USBHS_UGSTS_LOCK value.
>> >
>> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>>
>> this doesn't apply to v4.1-rc1, if it's still needed, please rebase.
>
> Thank you for the notice. I found that this patch has been already merged in v4.1-rc1 by Greg.

drivers/usb/phy/phy-rcar-gen2-usb.c (which supports legacy platform data only)
is unused since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove
legacy board support").

It's my understanding this driver has been replaced by a new driver, which
supports DT only (drivers/phy/phy-rcar-gen2.c).
That driver still has the wrong value:
#define USBHS_UGSTS_LOCK                0x00000300 /* The manuals have 0x3 */

So:
  1) Shouldn't drivers/phy/phy-rcar-gen2.c be fixed?
  2) Shouldn't drivers/usb/phy/phy-rcar-gen2-usb.c et al be removed?

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yoshihiro Shimoda April 28, 2015, 10:25 a.m. UTC | #4
Hi Geert-san,

Thank you for your comment!

> Sent: Tuesday, April 28, 2015 6:55 PM

> 

> Hi Shimoda-san,

> 

> On Tue, Apr 28, 2015 at 3:36 AM, Yoshihiro Shimoda

> <yoshihiro.shimoda.uh@renesas.com> wrote:

> >> Sent: Tuesday, April 28, 2015 4:45 AM

> >> On Thu, Apr 02, 2015 at 08:22:34PM +0900, Yoshihiro Shimoda wrote:

> >> > According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK

> >> > bit location is bit 8, not bits 9 and 8. So, this patch fixes the

> >> > USBHS_UGSTS_LOCK value.

> >> >

> >> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

> >>

> >> this doesn't apply to v4.1-rc1, if it's still needed, please rebase.

> >

> > Thank you for the notice. I found that this patch has been already merged in v4.1-rc1 by Greg.

> 

> drivers/usb/phy/phy-rcar-gen2-usb.c (which supports legacy platform data only)

> is unused since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove

> legacy board support").

> 

> It's my understanding this driver has been replaced by a new driver, which

> supports DT only (drivers/phy/phy-rcar-gen2.c).


Yes. You are correct.

> That driver still has the wrong value:

> #define USBHS_UGSTS_LOCK                0x00000300 /* The manuals have 0x3 */

> 

> So:

>   1) Shouldn't drivers/phy/phy-rcar-gen2.c be fixed?


I already submitted such a patch. However, the patch is not merged yet.
(I should have sent a ping or something about this patch.)
http://thread.gmane.org/gmane.linux.ports.sh.devel/45089

>   2) Shouldn't drivers/usb/phy/phy-rcar-gen2-usb.c et al be removed?


We should remove this code because legacy board codes were already removed.
(In other words, nobody uses this code now.)

Best regards,
Yoshihiro Shimoda

> Thanks!

> 

> Gr{oetje,eeting}s,

> 

>                         Geert

> 

> --

> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

> 

> In personal conversations with technical people, I call myself a hacker. But

> when I'm talking to journalists I just say "programmer" or something like that.

>                                 -- Linus Torvalds
Geert Uytterhoeven April 28, 2015, 11:21 a.m. UTC | #5
Hi Shimoda-san,

On Tue, Apr 28, 2015 at 12:25 PM, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
>> Sent: Tuesday, April 28, 2015 6:55 PM
>> On Tue, Apr 28, 2015 at 3:36 AM, Yoshihiro Shimoda
>> <yoshihiro.shimoda.uh@renesas.com> wrote:
>> >> Sent: Tuesday, April 28, 2015 4:45 AM
>> >> On Thu, Apr 02, 2015 at 08:22:34PM +0900, Yoshihiro Shimoda wrote:
>> >> > According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK
>> >> > bit location is bit 8, not bits 9 and 8. So, this patch fixes the
>> >> > USBHS_UGSTS_LOCK value.
>> >> >
>> >> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>> >>
>> >> this doesn't apply to v4.1-rc1, if it's still needed, please rebase.
>> >
>> > Thank you for the notice. I found that this patch has been already merged in v4.1-rc1 by Greg.
>>
>> drivers/usb/phy/phy-rcar-gen2-usb.c (which supports legacy platform data only)
>> is unused since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove
>> legacy board support").
>>
>> It's my understanding this driver has been replaced by a new driver, which
>> supports DT only (drivers/phy/phy-rcar-gen2.c).
>
> Yes. You are correct.
>
>> That driver still has the wrong value:
>> #define USBHS_UGSTS_LOCK                0x00000300 /* The manuals have 0x3 */
>>
>> So:
>>   1) Shouldn't drivers/phy/phy-rcar-gen2.c be fixed?
>
> I already submitted such a patch. However, the patch is not merged yet.
> (I should have sent a ping or something about this patch.)
> http://thread.gmane.org/gmane.linux.ports.sh.devel/45089

Right. Sorry, I forgot about that patch.

>>   2) Shouldn't drivers/usb/phy/phy-rcar-gen2-usb.c et al be removed?
>
> We should remove this code because legacy board codes were already removed.
> (In other words, nobody uses this code now.)

I'll remove it, while you can enjoy Golden Week...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c
index f838084..f81800b 100644
--- a/drivers/usb/phy/phy-rcar-gen2-usb.c
+++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
@@ -47,7 +47,7 @@  struct rcar_gen2_usb_phy_priv {
 
 /* USB General status register */
 #define USBHS_UGSTS_REG			0x88
-#define USBHS_UGSTS_LOCK		(3 << 8)
+#define USBHS_UGSTS_LOCK		(1 << 8)
 
 /* Enable USBHS internal phy */
 static int __rcar_gen2_usbhs_phy_enable(void __iomem *base)