[U-Boot] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit

thaoth thaoth at cybersoft-vn.com
Wed Sep 3 05:48:14 CEST 2008


Hi Nobuhiro Iwamatsu,
Now I'm porting USB on board T-Engine(SH7727)
- My configure following :
#define CONFIG_CMD_USB
#define CONFIG_USB_OHCI_NEW	1
#define CONFIG_USB_STORAGE	1
#define CFG_USB_OHCI_REGS_BASE	0x04000400
#define CFG_USB_OHCI_SLOT_NAME	"s3c2400"
#define CFG_USB_OHCI_MAX_ROOT_PORTS	15
#define CONFIG_DOS_PARTITION	1
#define CONFIG_SYS_CLK_FREQ	33333333
#define TMU_CLK_DIVIDER		4	/* 4 (default), 16, 64, 256 or 1024 */
#define CFG_HZ			(CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
- And in lowlevel_init.S, I change USB clock following:
UCLKCR_A:	.long	0xA40A0008
UCLKCR_D:	.long	0xA5C0
mov.l	UCLKCR_A,r1
mov.l	UCLKCR_D,r0
mov.w	r0, at r1
- When I'm starting board with above configue, I  see the led of USB device
is blinking. Then I run command "usb start", the led turn off and u-boot
don't find any USB device, with following logs:
DEBUG: OHCI controller usb-s3c2400 state
DEBUG: control: 0x0000008f HCFS=operational IE PLE CBSR=3
DEBUG: cmdstatus: 0x00000000 SOC=0
DEBUG: intrstatus: 0x00000004 SF
DEBUG: intrenable: 0x00000053 RHSC UE WDH SO
DEBUG: hcca frame #0019
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b: 00000000 PPCM=0000 DR=0000
DEBUG: roothub.status: 00000000
DEBUG: roothub.portstatus [0] = 0x00000100 PPS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80
value 0x100 index 0x0 length 0x8
INFO: submit_control_msg
DEBUG: SUB URB:[  42] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x80000000
DEBUG: SUB(rh) URB:[  45] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x80000000
INFO: Root-Hub: adr:  0 cmd(8): 00000680 0001 0000 0800
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b: 00000000 PPCM=0000 DR=0000
DEBUG: roothub.status: 00000000
DEBUG: roothub.portstatus [0] = 0x00000100 PPS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
DEBUG: RET(rh) URB:[  56] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x2
usb_ohci.c: cmd(8): 80 06 01 00 00 00 00 08
usb_ohci.c: data(0/8):
      USB device not responding, giving up (status=2)
0 USB Device(s) found       scanning bus for storage devices... 0 Storage
Device
(s) found
- I don't know what is wrong in my configure, I think the
CONFIG_SYS_CLK_FREQ and CFG_HZ is incorrect and I can't start USB device,
and clock which I control in lowlevel_init.S following:
FRQCR_A:	.long	0xA415FF80	/* FRQCR Address(Frequency Control Register) */
FRQCR_D:	.long	0x1103		/* I:B:P=8:4:2 */
Can you help me about this problem and  tell me about any other wrong things
in my configure? why the led turn off when I run command "usb start"?

thanks

Nobuhiro Iwamatsu wrote:
> 
> Hi,
> 
> 2008/8/20 thaoth <thaoth at cybersoft-vn.com>:
>>
>> Hi Nobuhiro Iwamatsu,
>>
>> 1. Clock frequency of board.
>>
>> #define CONFIG_SYS_CLK_FREQ     33333333
>> #define TMU_CLK_DIVIDER         4       /* 4 (default), 16, 64, 256 or
>> 1024 */
>> #define CFG_HZ                  (CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
>>
>> I don't understand how to set CONFIG_SYS_CLK_FREQ value. From T-Engine
>> support, they said clock frequency of board is 144MHz.
> 
> 
> Please set outside clock to CONFIG_SYS_CLK_FREQ.
> 
>>
>> 2. Cross compiler tool chain : GCC vs T-Engine toolchain
>> There are two tool chains
>> -
>> http://www.superh-linux.org/archive/bsp/sh7721_se/toolchain_sh3_gcc4.2.tar.gz
>> support elf32-sh-linux target.
>> - Tool chain from T-Engine forum support elf32-sh-tkernel
>> Using both cross compilers, we could turn on LED on debug board by
>> setting
>> correct value LED_A and LED_B value.
>>
>> 3. ICE or JTAG debugger and LED debugging.
>> I don't have these debug tools, and so hard for debugging.
>> T-Engine/SH7727
>> DevKit has debug board with 8 LEDs. I could turn on/off these LEDs by
>> setting correct value to 0xA1600000 memory. But  C function turn on/off
>> LED
>> cannot work. For example
>>
>> int cpu_init(void)
>> {
>>        // Turn off LED 1 to notify cpu_init is called.
>>        outw(0x00 & 0xFF, 0xa1600000);
>>        return 0;
>> }
>>
>> I don't know why it isn't called?
> 
> I think that cpu_init is not carried out.
> I think that u-boot stopped on lowlevel_init function.
> 
>>
>> Would you please give me your ideas? Thank you a lot.
> 
> I will get T-Engine board ......
> Please wait.
> 
> Best regards,
>  Nobuhiro
> _______________________________________________
> 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-tp18868090p19282461.html
Sent from the Uboot - Users mailing list archive at Nabble.com.



More information about the U-Boot mailing list