diff mbox

[U-Boot] don't touch non-existent EHCI regs on MPC837x.

Message ID 1289832783-18402-1-git-send-email-andre.schwarz@matrix-vision.de
State Superseded
Headers show

Commit Message

Andre Schwarz Nov. 15, 2010, 2:53 p.m. UTC
Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
---
 arch/powerpc/cpu/mpc83xx/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kumar Gala Nov. 15, 2010, 3:07 p.m. UTC | #1
On Nov 15, 2010, at 8:53 AM, Andre Schwarz wrote:

> 
> Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
> ---
> arch/powerpc/cpu/mpc83xx/cpu_init.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

This doesn't seem quite right, the MPC837x has USB controllers.

- k

> 
> diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> index 7a1cae7..cfead18 100644
> --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
> +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> @@ -327,7 +327,7 @@ void cpu_init_f (volatile immap_t * im)
> 	im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR;
> #endif
> #ifdef CONFIG_USB_EHCI_FSL
> -#ifndef CONFIG_MPC834x
> +#if !defined(CONFIG_MPC834x) && !defined(CONFIG_MPC837x)
> 	uint32_t temp;
> 	struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB_ADDR;
> 
> -- 
> 1.7.0.4
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Andre Schwarz Nov. 15, 2010, 3:14 p.m. UTC | #2
Kumar,
>> Signed-off-by: Andre Schwarz<andre.schwarz@matrix-vision.de>
>> ---
>> arch/powerpc/cpu/mpc83xx/cpu_init.c |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>      
> This doesn't seem quite right, the MPC837x has USB controllers.
>
> - k
>    

yes, it has - and it is working fine.
But USB register range 0x00-0xff is reserved and hangs the CPU.

With this patch USB is working fine on at least MPC8377.


>> diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
>> index 7a1cae7..cfead18 100644
>> --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
>> +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
>> @@ -327,7 +327,7 @@ void cpu_init_f (volatile immap_t * im)
>> 	im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR;
>> #endif
>> #ifdef CONFIG_USB_EHCI_FSL
>> -#ifndef CONFIG_MPC834x
>> +#if !defined(CONFIG_MPC834x)&&  !defined(CONFIG_MPC837x)
>> 	uint32_t temp;
>> 	struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB_ADDR;
>>
>> -- 
>> 1.7.0.4
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot@lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>      
>    

Regards,
André


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Wolfgang Denk Nov. 15, 2010, 3:29 p.m. UTC | #3
Dear Andre Schwarz,

In message <4CE14E3E.7060208@matrix-vision.de> you wrote:
>
> > This doesn't seem quite right, the MPC837x has USB controllers.
> 
> yes, it has - and it is working fine.
> But USB register range 0x00-0xff is reserved and hangs the CPU.
> 
> With this patch USB is working fine on at least MPC8377.

Then the commit message should make this clear.  At the moment it is
pretty much misleading.

Best regards,

Wolfgang Denk
Andre Schwarz Nov. 15, 2010, 3:52 p.m. UTC | #4
Wolfgang,

> Dear Andre Schwarz,
>
> In message<4CE14E3E.7060208@matrix-vision.de>  you wrote:
>    
>>      
>>> This doesn't seem quite right, the MPC837x has USB controllers.
>>>        
>> yes, it has - and it is working fine.
>> But USB register range 0x00-0xff is reserved and hangs the CPU.
>>
>> With this patch USB is working fine on at least MPC8377.
>>      
> Then the commit message should make this clear.  At the moment it is
> pretty much misleading.
>    

I didn't add this #ifdef but extended it to not only match 834x but also 
837x.

All I see is that the ifdef'ed code accesses registers which are 
explicitely reserved on MPC834x and at least MPC837x.

What would be an appropriate commit message from your point of view ?


Regards,
André

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
Wolfgang Denk Nov. 15, 2010, 4:16 p.m. UTC | #5
Dear Andre Schwarz,

In message <4CE1572C.6080804@matrix-vision.de> you wrote:
>
> >>> This doesn't seem quite right, the MPC837x has USB controllers.
> >>>        
> >> yes, it has - and it is working fine.
> >> But USB register range 0x00-0xff is reserved and hangs the CPU.
> >>
> >> With this patch USB is working fine on at least MPC8377.
> >>      
> > Then the commit message should make this clear.  At the moment it is
> > pretty much misleading.
> >    
> 
> I didn't add this #ifdef but extended it to not only match 834x but also 
> 837x.
> 
> All I see is that the ifdef'ed code accesses registers which are 
> explicitely reserved on MPC834x and at least MPC837x.

Yes, I don't think this was objected at all.

> What would be an appropriate commit message from your point of view ?

Well, above you wrote "USB register range 0x00-0xff is reserved and
hangs the CPU" - this probably explains the situation pretty well.
However, the subject "non-existent EHCI regs" suggests to me that
there are no USB registers at all.

Best regards,

Wolfgang Denk
Andre Schwarz Nov. 15, 2010, 4:21 p.m. UTC | #6
Am 15.11.2010 17:16, schrieb Wolfgang Denk:
> Dear Andre Schwarz,
>
> In message<4CE1572C.6080804@matrix-vision.de>  you wrote:
>>>>> This doesn't seem quite right, the MPC837x has USB controllers.
>>>>>
>>>> yes, it has - and it is working fine.
>>>> But USB register range 0x00-0xff is reserved and hangs the CPU.
>>>>
>>>> With this patch USB is working fine on at least MPC8377.
>>>>
>>> Then the commit message should make this clear.  At the moment it is
>>> pretty much misleading.
>>>
>> I didn't add this #ifdef but extended it to not only match 834x but also
>> 837x.
>>
>> All I see is that the ifdef'ed code accesses registers which are
>> explicitely reserved on MPC834x and at least MPC837x.
> Yes, I don't think this was objected at all.
>
>> What would be an appropriate commit message from your point of view ?
> Well, above you wrote "USB register range 0x00-0xff is reserved and
> hangs the CPU" - this probably explains the situation pretty well.
> However, the subject "non-existent EHCI regs" suggests to me that
> there are no USB registers at all.

understood - will wait for further comments and resubmit tomorrow.


Regards,
André

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 7a1cae7..cfead18 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -327,7 +327,7 @@  void cpu_init_f (volatile immap_t * im)
 	im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR;
 #endif
 #ifdef CONFIG_USB_EHCI_FSL
-#ifndef CONFIG_MPC834x
+#if !defined(CONFIG_MPC834x) && !defined(CONFIG_MPC837x)
 	uint32_t temp;
 	struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_FSL_USB_ADDR;