All of lore.kernel.org
 help / color / mirror / Atom feed
From: thaoth <thaoth@cybersoft-vn.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit
Date: Fri, 12 Sep 2008 03:05:23 -0700 (PDT)	[thread overview]
Message-ID: <19453016.post@talk.nabble.com> (raw)
In-Reply-To: <48CA0FC6.8020204@renesas.com>


Hi Yoshihiro Shimoda,
* Strategy 1:
I add usb_cpu_init following your tutorial:
int usb_cpu_init(void)
{	
	*STCBR3 = 0x18;
	*SRSTR = 0x18;		
	cpu_wait_ms(50);
	*EXCPGCR = 0x21;//0x28;
	*PECR = 0x1500;
	cpu_wait_ms(50);		
	*SRSTR = 0x00;
	*STCBR3 = 0x00;
	
	return 0;
}
now, I plug the USB2.0(mass storage) into board T-Engine(sh7727) and run
command "usb start", the u-boot can't get decription of usb device with the
errror following:

New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0
x8
set address 2
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x2 index 0x0 length
0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0
x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0
x8
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0
x20
get_conf_no 0 Result 32, wLength 32
if 0, ep 0
if 0, ep 1
##EP epmaxpacketin[1] = 64
* Strategy 2:
I add usb_cpu_init the same strategy 1, I only add instruction "printf("&ep
= %x\n",&ep);" into function usb_set_maxpacket of usb.c
int usb_set_maxpacket(struct usb_device *dev)
{
.................................................
...................................................
			ep = &dev->config.if_desc[i].ep_desc[ii];
			b=ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;			
			printf("&ep = %x\n",&ep);				
.....................................................
......................................................
}
in this strategy, when I run command "usb start", now I can get information
of USB device:
Manufacturer
Product      USB_DRIVE
SerialNumber 000000000000001000006886
2 USB Device(s) found
       scanning bus for storage devices... usb_control_msg: request: 0xFF,
reque
sttype: 0x21, value 0x0 index 0x0 length 0x0
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x81 length
0x0
usb_control_msg: request: 0x1, requesttype: 0x2, value 0x0 index 0x2 length
0x0
1 Storage Device(s) found

I don't know what is problem?why when I add instruction  "printf("&ep =
%x\n",&ep);", u-boot can get description of USB device
*Strategy 3:
I try replace the insctruction "printf("&ep = %x\n",&ep);" with one of these
instructions
- instruction 1: wait_ms(10)
- instruction 2:void * pointer = &ep;
- instruction 3: "printf("ep = %x\n",ep);"
But the result when run command "usb start" the same strategy 1, I can't get
information of USB2.0(mass storage)


Can you help me to resolve this bug?
Thank you very much for your supports!




Yoshihiro Shimoda wrote:
> 
> Hi, thaoth.
> 
> thaoth wrote:
>> 
>> 0x28: 00101000 -> 00 101 000 -> 
>> * 101: Using bus clock
>> * 000: Dividing Ratio Selection is 1/1
>> 
>> I know 
>> * Internal clock: 96Mhz
>> * Peripheral Clock: 24Mhz
>> * CPU Block: 144Mhz
>> 
>> http://www.nabble.com/file/p19449833/a.JPG a.JPG 
>> 
>> Please let me know the correct value of EXCPGCR ? Is 0x28 correct
>> initialize
>> value of USB clock?
> 
> I think that 0x21 is correct value of EXCPGCR for your board.
> 
> 0x21: 00101000 -> 00 100 001 ->
> * 100: Using Internal Clock
> * 001: Dividing Ratio Selection is 1/2
> (96MHz / 2 = 48MHz)
> 
>>> And I used my board, I set 0x1500 in PKCR.
>> I don't understand PKCR - Port control register so I don't know correct
>> initialize value of this register.
>> 
>> 0x1500 = 0001 0101 0000 0000
>> -> PK6 is port output
>> -> PK5 is port output
>> -> PK4 is port output
>> I don't know this value could be set for my board - TEngine/SH7727.
> 
> Oh, I am very sorry. This is PECR.
> This setting enable USB1_pwr_en and USB2_pwr_en pin.
> 
> Best regards,
> Yoshihiro Shimoda
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

-- 
View this message in context: http://www.nabble.com/-T-Engine--UBoot-configuration-for-T-Engine-SH7727-MS7727CP02-DevKit-tp18868090p19453016.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

  reply	other threads:[~2008-09-12 10:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 11:03 [U-Boot-Users] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit thaoth
2008-08-08  1:35 ` Nobuhiro Iwamatsu
2008-08-08  7:51   ` thaoth
2008-08-08  8:59     ` Nobuhiro Iwamatsu
2008-08-20  4:02       ` [U-Boot] " thaoth
2008-08-20  7:40         ` Nobuhiro Iwamatsu
2008-08-21  7:26           ` thaoth
2008-08-21  9:54             ` thaoth
2008-08-21 11:27               ` thaoth
2008-09-03  3:48           ` thaoth
2008-09-10 11:51       ` thaoth
2008-09-10 12:13         ` Nobuhiro Iwamatsu
2008-09-11  2:17           ` Yoshihiro Shimoda
2008-09-11  7:41             ` thaoth
2008-09-11 12:00               ` Yoshihiro Shimoda
2008-09-12  5:46                 ` thaoth
2008-09-12  6:44                   ` Yoshihiro Shimoda
2008-09-12 10:05                     ` thaoth [this message]
2008-09-12 10:53                       ` Yoshihiro Shimoda
2008-09-12 10:58                         ` thaoth

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=19453016.post@talk.nabble.com \
    --to=thaoth@cybersoft-vn.com \
    --cc=u-boot@lists.denx.de \
    /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.