diff mbox

USB doesn't work on ecovec24

Message ID CAO64nm4gSsfoCTW5m5W=UTQcLYzCFdTE+paD_S3t_wP2Qsn1YA@mail.gmail.com (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Daniel Palmer July 14, 2014, 3:56 a.m. UTC
I got one of these this morning. The kernel it has is pretty crusty so
I built a new one using the ecovec24 defconfig.
There are a few messages about not being able to get certain clocks
and this apparently breaks the USB port that the board uses to boot
from.

Wedging in a clock for it like this fixes it:

Debian from the USB stick now.
--
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

Comments

Kuninori Morimoto July 14, 2014, 4:38 a.m. UTC | #1
Hi Daniel

> I got one of these this morning. The kernel it has is pretty crusty so
> I built a new one using the ecovec24 defconfig.
> There are a few messages about not being able to get certain clocks
> and this apparently breaks the USB port that the board uses to boot
> from.
> 
> Wedging in a clock for it like this fixes it:
> 
> diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> index f579dd5..f67d8d1 100644
> --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
> @@ -347,6 +347,7 @@ static struct clk_lookup lookups[] = {
>         CLKDEV_CON_ID("veu0", &mstp_clks[HWBLK_VEU0]),
>         CLKDEV_CON_ID("vpu0", &mstp_clks[HWBLK_VPU]),
>         CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[HWBLK_LCDC]),
> +       CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB0]),
>  };
> 
> I'm pretty sure that's not the right way of fixing it but it's booted
> Debian from the USB stick now.

Ecovec usb0 port is using r8a66597_hcd driver,
and it requests "usb%d" CON ID clock if it had .on_chip = 1.
So, above seems sane fixup for me.

I guess,
8a87776dee0019bd87471c55121bb6934bd6d302
(sh: sh7724: fixup renesas_usbhs clock settings)
breaks Ecovec/7724 USB...

--
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
Daniel Palmer July 14, 2014, 8:23 a.m. UTC | #2
Hi,

sh_cmt on the ecovec24 is also currently broken because of a similar
issue it seems:

sh_cmt sh-cmt-32.0: cannot get clock
sh_cmt: probe of sh-cmt-32.0 failed with error -2

On Mon, Jul 14, 2014 at 1:38 PM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>
> Hi Daniel
>
>> I got one of these this morning. The kernel it has is pretty crusty so
>> I built a new one using the ecovec24 defconfig.
>> There are a few messages about not being able to get certain clocks
>> and this apparently breaks the USB port that the board uses to boot
>> from.
>>
>> Wedging in a clock for it like this fixes it:
>>
>> diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
>> b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
>> index f579dd5..f67d8d1 100644
>> --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
>> +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
>> @@ -347,6 +347,7 @@ static struct clk_lookup lookups[] = {
>>         CLKDEV_CON_ID("veu0", &mstp_clks[HWBLK_VEU0]),
>>         CLKDEV_CON_ID("vpu0", &mstp_clks[HWBLK_VPU]),
>>         CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[HWBLK_LCDC]),
>> +       CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB0]),
>>  };
>>
>> I'm pretty sure that's not the right way of fixing it but it's booted
>> Debian from the USB stick now.
>
> Ecovec usb0 port is using r8a66597_hcd driver,
> and it requests "usb%d" CON ID clock if it had .on_chip = 1.
> So, above seems sane fixup for me.
>
> I guess,
> 8a87776dee0019bd87471c55121bb6934bd6d302
> (sh: sh7724: fixup renesas_usbhs clock settings)
> breaks Ecovec/7724 USB...
>
--
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
Kuninori Morimoto July 14, 2014, 8:57 a.m. UTC | #3
Hi Daniel

> sh_cmt on the ecovec24 is also currently broken because of a similar
> issue it seems:
> 
> sh_cmt sh-cmt-32.0: cannot get clock
> sh_cmt: probe of sh-cmt-32.0 failed with error -2

Hmm...

latest patch which exchanges cmt is
9b17e48cd4df4e129976c37660cf9ec644c66059
(sh: Switch to new style CMT device)

Anyway, as 1st step, can you please send USB clock fixup patches ?
There is no SH maintainer today.
So, you can use "To:" 

    Andrew Morton <akpm@linux-foundation.org>
--
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
Daniel Palmer July 15, 2014, 2:08 a.m. UTC | #4
Hi,

Changing:

CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[HWBLK_CMT]),
to
CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[HWBLK_CMT]),

Makes that error go away. Doesn't seem actually change anything though. ;)
I have noticed a few other issues with the defconfig. Like it should
enable fixed regulators etc.
I'll probably put together a patch set that fixes these small issues
and updates the defconfig.
There are some problems with the SD card slots too.
The card mounts but resets itself after any activity.



On Mon, Jul 14, 2014 at 5:57 PM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>
> Hi Daniel
>
>> sh_cmt on the ecovec24 is also currently broken because of a similar
>> issue it seems:
>>
>> sh_cmt sh-cmt-32.0: cannot get clock
>> sh_cmt: probe of sh-cmt-32.0 failed with error -2
>
> Hmm...
>
> latest patch which exchanges cmt is
> 9b17e48cd4df4e129976c37660cf9ec644c66059
> (sh: Switch to new style CMT device)
>
> Anyway, as 1st step, can you please send USB clock fixup patches ?
> There is no SH maintainer today.
> So, you can use "To:"
>
>     Andrew Morton <akpm@linux-foundation.org>
--
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/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index f579dd5..f67d8d1 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -347,6 +347,7 @@  static struct clk_lookup lookups[] = {
        CLKDEV_CON_ID("veu0", &mstp_clks[HWBLK_VEU0]),
        CLKDEV_CON_ID("vpu0", &mstp_clks[HWBLK_VPU]),
        CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[HWBLK_LCDC]),
+       CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB0]),
 };

I'm pretty sure that's not the right way of fixing it but it's booted