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: Tue, 2 Sep 2008 20:48:14 -0700 (PDT)	[thread overview]
Message-ID: <19282461.post@talk.nabble.com> (raw)
In-Reply-To: <29ab51dc0808200040i70fe61d3t66fa1b8326332902@mail.gmail.com>


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@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.

  parent reply	other threads:[~2008-09-03  3:48 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 [this message]
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
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=19282461.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.