TI Davinci and MUSB
I've been trying to get usbtty working on a DM355 (still isn't working...) and ran into a bug(?).
In drivers/usb/musb/davinci.h:
struct davinci_usb_regs {
u32 version;
u32 ctrlr;
u32 reserved[0x20];
u32 intclrr;
u32 intmskr;
u32 intmsksetr;
};Shouldn't this be reserved[0x20/4] ?
--
Neal Tew
Gupta
Quoted 23 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Neal Tew
Sent: Friday, February 05, 2010 3:33 AM
To: u-boot at lists.denx.de
Subject: [U-Boot] TI Davinci and MUSBI've been trying to get usbtty working on a DM355 (still isn't working...) and ran into a bug(?).
In
drivers/usb/musb/davinci.h:struct davinci_usb_regs { u32 version; u32 ctrlr; u32 reserved[0x20]; u32 intclrr; u32 intmskr; u32 intmsksetr; };
Quoted 1 line
Shouldn't this be reserved[0x20/4] ?
Yes, this is a bug. Though the correct fix is,
- u32 reserved[0x20];
+ u32 reserved[5];
Please refer musb Davinci (DM6446) document (page-74) at,
http://focus.ti.com/lit/ug/sprue35f/sprue35f.pdf
-->4h CTRLR Control Register Section 4.1
8h STATR Status Register Section 4.2
10h RNDISR RNDIS Register Section 4.3
14h AUTOREQ Autorequest Register Section 4.4
20h INTSRCR USB Interrupt Source Register Section 4.5 24h INTSETR USB Interrupt Source Set Register Section 4.6 -->28h INTCLRR USB Interrupt Source Clear Register
-Ajay
Quoted 7 lines
--
Neal Tew
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
[5]? I don't think that's right. Look at the offsets.
-Neal
Quoted 14 lines
I've been trying to get usbtty working on a DM355 (still isn't working...) and ran into a bug(?).
In
drivers/usb/musb/davinci.h:struct davinci_usb_regs { u32 version; u32 ctrlr; u32 reserved[0x20]; u32 intclrr; u32 intmskr; u32 intmsksetr; };
Quoted 1 line
Shouldn't this be reserved[0x20/4] ?
Yes, this is a bug. Though the correct fix is,
- u32 reserved[0x20];
+ u32 reserved[5];
Please refer musb Davinci (DM6446) document (page-74) at,
http://focus.ti.com/lit/ug/sprue35f/sprue35f.pdf
-->4h CTRLR Control Register Section 4.1
8h STATR Status Register Section 4.2
10h RNDISR RNDIS Register Section 4.3
14h AUTOREQ Autorequest Register Section 4.4
20h INTSRCR USB Interrupt Source Register Section 4.5 24h INTSETR USB Interrupt Source Set Register Section 4.6 -->28h INTCLRR USB Interrupt Source Clear Register
-Ajay
Quoted 3 lines
--
Neal Tew
Gupta
Quoted 25 lines
-----Original Message-----
From: Neal Tew [mailto:loopy at mm.st]
Sent: Friday, February 05, 2010 11:20 AM
To: u-boot at lists.denx.de
Cc: Gupta, Ajay Kumar
Subject: Re: [U-Boot] TI Davinci and MUSB[5]? I don't think that's right. Look at the offsets.
-Neal
Quoted 14 lines
I've been trying to get usbtty working on a DM355 (still isn't working...) and ran into a bug(?).
In
drivers/usb/musb/davinci.h:struct davinci_usb_regs { u32 version; u32 ctrlr; u32 reserved[0x20]; u32 intclrr; u32 intmskr; u32 intmsksetr; };
Quoted 5 lines
Quoted 1 line
Shouldn't this be reserved[0x20/4] ?
Yes, this is a bug. Though the correct fix is,
- u32 reserved[0x20];
+ u32 reserved[5];
Opps, there are actually 32 intermediate register each of 32 bits.
So the correct one is as Neal suggested.
- u32 reserved[0x20];
+ u32 reserved[020/4];
-Ajay
Quoted 16 lines
Please refer musb Davinci (DM6446) document (page-74) at,
http://focus.ti.com/lit/ug/sprue35f/sprue35f.pdf-->4h CTRLR Control Register Section 4.1
8h STATR Status Register Section 4.2
10h RNDISR RNDIS Register Section 4.3
14h AUTOREQ Autorequest Register Section 4.4
20h INTSRCR USB Interrupt Source Register Section 4.5 24h INTSETR USB Interrupt Source Set Register Section 4.6 -->28h INTCLRR USB Interrupt Source Clear Register-Ajay
Quoted 3 lines
--
Neal Tew
Dear "Gupta, Ajay Kumar",
Quoted 7 lines · In message <[email protected]> you…
Opps, there are actually 32 intermediate register each of 32 bits.
So the correct one is as Neal suggested.
- u32 reserved[0x20];
+ u32 reserved[020/4];
0x20 / 4 = 8
020 / 4 = 4
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de One difference between a man and a machine is that a machine is quiet when well oiled.
Gupta
Quoted 16 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Friday, February 05, 2010 12:12 PM
To: Gupta, Ajay Kumar
Cc: Neal Tew; u-boot at lists.denx.de
Subject: Re: [U-Boot] TI Davinci and MUSBDear "Gupta, Ajay Kumar",
In message <[email protected]>
Quoted 3 lines · you
Opps, there are actually 32 intermediate register each of 32 bits.
Quoted 8 lines
Quoted 4 lines
So the correct one is as Neal suggested.
- u32 reserved[0x20];
+ u32 reserved[020/4];
0x20/ 4 = 8020 / 4 = 4
It was typing mistake...
Thanks,
Ajay
Quoted 11 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de One difference between a man and a machine is that a machine is quiet when well oiled.
Dear "Gupta, Ajay Kumar",
Review
Quoted 12 lines · In message <[email protected]> you…
Quoted 8 lines
u32 reserved[0x20]; u32 intclrr; u32 intmskr; u32 intmsksetr; };Shouldn't this be reserved[0x20/4] ?
Yes, this is a bug. Though the correct fix is,
(quoted diff) +1
-1- u32 reserved[0x20]; + u32 reserved[5];
Umm...
Quoted 10 lines
Please refer musb Davinci (DM6446) document (page-74) at,
http://focus.ti.com/lit/ug/sprue35f/sprue35f.pdf-->4h CTRLR Control Register Section 4.1
8h STATR Status Register Section 4.2
10h RNDISR RNDIS Register Section 4.3
14h AUTOREQ Autorequest Register Section 4.4
20h INTSRCR USB Interrupt Source Register Section 4.5 24h INTSETR USB Interrupt Source Set Register Section 4.6 -->28h INTCLRR USB Interrupt Source Clear Register
Why don't we add these fields to he struct above if they are not actually reserved, but have a documented use?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de panic: kernel trap (ignored)