Re: [U-Boot] Run hello world with Uboot !

2008-10-09 Thread thaoth

Hi Nobuhiro,
I have tested your patch and it works well.

Thank you for great work.
-- 
View this message in context: 
http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19894599.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Run hello world with Uboot !

2008-10-08 Thread thaoth

Hi All,

Following guide at http://www.denx.de/wiki/DULG/UBootStandalone

1. Load hello_world.srec into SDRAM

= loads
## Ready for S-Record download ...

## First Load Addr = 0x8E00
## Last  Load Addr = 0x8E000157
## Total Size  = 0x0158 = 344 Bytes
## Start Addr  = 0x8E00

2. And Run

= go 8e00
## Starting application at 0x8E00 ...


U-Boot 1.3.4-00404-gab00e7a-dirty (Oct  8 2008 - 11:47:35)


3. hello_world crash and UBoot reset.

4. Here is information of hello_world

#nm examples/hello_world
8e010158 A __bss_start
8e010158 A __data_start
8e010158 A _edata
8e010158 A _end
8e000126 T app_startup
8ed8 T do_reset
8e38 T dummy
8ea8 T free
8e90 T free_hdlr
8ec0 T get_timer
8e3c T get_version
8e48 T getc
8ee4 T getenv
8e00 T hello_world
8e84 T install_hdlr
8e9c T malloc
8e78 T printf
8e60 T putc
8e6c T puts
8ef0 T setenv
8e000108 T simple_strtol
8efc T simple_strtoul
8e000114 T strcmp
8e54 T tstc
8eb4 T udelay
8ecc T vprintf

5. Physical start address of SDRAM is 8c00 and 

#define CONFIG_LOADADDR 0x8e00

6. I didn't have JTAG interface so I couldn't debug it. 

Could I have a help? Anyone had same issue please tell me your idea? Thank
you alot.

This same the porting of UBoot on TEngine/SH7727 has the issue. But we don't
know what trouble shooting steps. 

Regards,
-- 
View this message in context: 
http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19873020.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Run hello world with Uboot !

2008-10-06 Thread thaoth

Hi,

I'm working on SH7727 T-Engine Board (MS7727CP02)(sh3) and I'm trying to
load Hello World example in U-boot (use Serial, ymodem and hello_world.bin), 
...
= loady 0x8e00
## Ready for binary (ymodem) download to 0x8E00 at 115200 bps...
CCCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 5 retries
## Total Size  = 0x000112ec = 70380 Bytes
= go 0x8e00
## Starting application at 0x8E00 ...
...
but my board reset when I run Hello world. I also try with hello_world.srec
(serial, Kermit mode) and an uboot image:
mkimage -A sh -O u-boot -T standalone -C none -a 0x8c00 -e 0x8c00
-n 'Hello Image' -d examples/hello_world hello.img
...
= loady
## Ready for binary (ymodem) download to 0x8E00 at 115200 bps...
CCxyzModem - CRC mode, 2(SOH)/69(STX)/0(CAN) packets, 4 retries
## Total Size  = 0x0001132c = 70444 Bytes
= bootm 0x8e00
*  kernel: cmdline image address = 0x8e00
## Booting kernel from Legacy Image at 8e00 ...
   Image Name:   Hello Image
   Image Type:   SuperH U-Boot Standalone Program (uncompressed)
   Data Size:70380 Bytes = 68.7 kB
   Load Address: 8c00
   Entry Point:  8c00
   Verifying Checksum ... OK
Wrong Image Type for bootm command
ERROR: can't get kernel image!
...
Could you give me an advice?
I think i have wrong image format? But how can I get correct format ?

Best regards.
-- 
View this message in context: 
http://www.nabble.com/Run-hello-world-with-Uboot-%21-tp19851315p19851315.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [UBoot] Hows to boot Linux Kernel from USB

2008-10-03 Thread thaoth

Hi Michael,

Have you try to load your image using tftpboot and put it in memory?
My board don't have Eth port, so we can't try tftpboot 
Are you sure that you don't have any problem with memory initialization?
i think i don't have any problem with memory initialization, because i can
see my image(using iminfo) on memory.

Best regards,
-- 
View this message in context: 
http://www.nabble.com/-UBoot--Hows-to-boot-Linux-Kernel-from-USB-tp19740267p19792984.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [UBoot] Hows to boot Linux Kernel from USB

2008-10-01 Thread thaoth

Can you retry and copy-paste the console output?

...
(Re)start USB...
USB:   scanning bus for devices... cannot reset port 1!?
2 USB Device(s) found
   scanning bus for storage devices... 1 Storage Device(s) found
= fatload usb 0:1 0x8e00 uImage
reading uImage
.
.
.
.



1278020 bytes read
= bootm
*  kernel: default image load address = 0x8e00
Wrong Image Format for bootm command
ERROR: can't get kernel image!
...

can you do a 'file uImage' and copy the result ?

...
[EMAIL PROTECTED] boot]# file uImage
uImage: PPCBoot image
...

I tried and send you its log.

Thank you for answer 
Best regards,
-- 
View this message in context: 
http://www.nabble.com/-UBoot--Hows-to-boot-Linux-Kernel-from-USB-tp19740267p19755115.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [UBoot] Hows to boot Linux Kernel from USB

2008-10-01 Thread thaoth

I think I made a mistake; I didn’t describe my problem clearly. So, now I fix
it.
My purpose is: find out a way to boot a Linux Kernel from USB (FAT16). 

Here are the steps I‘ve made:

 1. Get some kernel images (zImage, uImage) which I built (kernel version
2.6.22.11).
 2. Go to the board (T-Engine/SH7727) which is ported U-boot and try some
commands:
 a. usb start
 b. fatload usb 0:1 0x0020 uimage
 c. bootm 0x0020

And I always get this error:
Wrong Image Format for bootm command
ERROR: can't get kernel image!

I didn’t set ‘bootargs’ and root file system because I think they will have
no effect 
NOTE: 
CFG_SDRAM_BASE = 0x8c00
CFG_LOAD_ADDR = 0x8e00
Some results, I checked: 
 [EMAIL PROTECTED] boot]# file uImage 
 uImage: PPCBoot image

I also tried: mkimage -A sh -O linux -T kernel -C gzip -a 0x8e00 -e
0x8e00 -n Linux  -d linux.bin.gz uImage

best regards

-- 
View this message in context: 
http://www.nabble.com/-UBoot--Hows-to-boot-Linux-Kernel-from-USB-tp19740267p19772124.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [UBoot] Hows to boot Linux Kernel from USB

2008-09-30 Thread thaoth

Hi All,

I would like to know how to boot linux kernel from USB. I have ported UBoot
(support serial, USB driver) but didn't support CF card. 

Would you please tell me how to boot Linux Kernel from USB Flash memory? I
have many guide could help hows to boot Linux kernel from CF card or network
but  I didn't see help for USB Flash memory.

Here is step by step I did but didn't work.
- First initialization USB

= usb start

- List file on USB Flash memory

= fatls usb 0:1
  3876248   vmlinux.srec
  1348231   vmlinux
  2207942   vmlinux.bin
.
  1277956   zimage

- load zImage into SDRAM memory at base address 0x8c00 + 20 

= fatload usb 0:1 20 zimage
reading zimage
.
.
.
.



1277956 bytes read

= bootm
Wrong Image Format for bootm command
ERROR: can't get kernel image!

This seems here is wrong command. I should load uImage (not zImage) into
SDRAM memory. Google booting kernel from USB on the internet but I didn't
see any help. :(

Thank you for answer
Best regards,
-- 
View this message in context: 
http://www.nabble.com/-UBoot--Hows-to-boot-Linux-Kernel-from-USB-tp19740267p19740267.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-09-12 Thread thaoth

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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-09-12 Thread thaoth

Hi,


Yoshihiro Shimoda wrote:
 
 
 diff --git a/common/usb.c b/common/usb.c
 index 9502f39..1acf51d 100644
 --- a/common/usb.c
 +++ b/common/usb.c
 @@ -250,7 +250,10 @@ int usb_set_maxpacket(struct usb_device *dev)
 
   for(i=0; idev-config.bNumInterfaces;i++) {
   for(ii=0; iidev-config.if_desc[i].bNumEndpoints; ii++) {
 - ep = dev-config.if_desc[i].ep_desc[ii];
 + struct usb_endpoint_descriptor tmp;
 + memcpy(tmp, dev-config.if_desc[i].ep_desc[ii],
 + sizeof(struct usb_endpoint_descriptor));
 + ep = tmp;
   b=ep-bEndpointAddress  USB_ENDPOINT_NUMBER_MASK;
 
   if((ep-bmAttributes 
 USB_ENDPOINT_XFERTYPE_MASK)==USB_ENDPOINT_XFER_CONTROL) { /* Control =
 bidirectional */
 

Thank you a lot, it worked well. :jumping::jumping::jumping::jumping:

Thank you for good instruction.
Best regards,

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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-09-11 Thread thaoth

Hi,

 
 Following your instruction, I did
 int usb_board_init(void)
 {
 printf(usb_board_init\n);
 
 outw(0x18, STBCR3);
 outw(0x18, SRSTR);
 udelay(10);
 
 outw(0x28, EXCPGCR);
 udelay(10);
   
 outw(0x00, STBCR3);
 outw(0x00, SRSTR);
 return 0;
 }

 These registers are 8-bit width. So please use outb() macro.
They are the same. It is still problem.

 I am sorry, my explanation was short. This EXCPGCR value was for an
 another board.
 In the case of your board, it may be necessary to make it a defferent
 value.
As specification of SH7727, value of EXCPGCR is 0x28 and this means


The SH7727 has an on-chip USB interface (USB) which requires a fixed 48-MHz
clock source.

The extend clock pulse generator (EXCPG) generates a divided clock from the
internal clock (Iφ),
the bus clock (Bφ), or the external clock (UCLK).

Because the clock sources, which can be a candidate to be used by EXCPG,
vary from CPG
setting or external clock source, user of SH7727 must adjust the divided
clock, carefully to be 48
MHz.

* Bits 5 to 3—Clock Select (USBCKSEL2 to USBCKSEL0):
000: Peripheral Clock (Pφ) (Initial value)
100: Internal Clock (Iφ)
101: Bus Clock (Bφ)
110: External clock (UCLK)
***: Another value Reserved (setting prohibited)

* Bits 2 to 0—: Divider Select (USBDIVSEL2 to USBDIVSEL0):
000: 1/1 - Dividing Ratio Selection
001: 1/2
010: 1/3
1**: Internal clock (Iφ), bus clock (Bφ), external clock (UCLK) halted

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?

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

I am appreciating your helping :)

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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-09-10 Thread thaoth

Hi,

I got USB issue and here is an error message:

ERROR: CTL:TIMEOUT
USB device not responding, giving up (status=20)
3 USB Device(s) found
   scanning bus for storage devices... 
0 Storage Device(s) found

For detail, TEngine/SH7727 has one USB host controller, when I plugged USB
Flash Memory there were 3 devices. And No unplugged USB device, they said 2
devices.

= usb info
1: Hub,  USB Revision 1.10
 -  OHCI Root Hub
 - Class: Hub
 - PacketSize: 8  Configurations: 1
 - Vendor: 0x  Product 0x Version 0.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
 Interface: 0
 - Alternate Setting 0, Endpoints: 1
 - Class Hub
 - Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms

   Configuration: 0
   - Interfaces: 0 Bus Powered 0mA

   Configuration: 0
   - Interfaces: 0 Bus Powered 0mA

The problem sounded USB host controller driver could work well but
submit_common_msg couldn't get description of USB flash memory device and it
said No storage device.

Here is configuration of USB on UBoot

/* USB Mass Storage Support*/
#define CONFIG_CMD_USB
#define CONFIG_USB_OHCI_NEW 1
#define CONFIG_USB_STORAGE  1

#define CFG_USB_OHCI_REGS_BASE  0xA4000400
#define CFG_USB_OHCI_SLOT_NAME  s3c2400
#define CFG_USB_OHCI_MAX_ROOT_PORTS 15

Could I have help? Please tell me if you have any idea. Thank you for your
helping. =)

Here is a log data

U-Boot 1.3.4-00404-gab00e7a-dirty (Sep 10 2008 - 16:30:38)

CPU: SH3
BOARD: Hitachi UL MS7727SE
DRAM:  32MB
FLASH: 8MB
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
= usb start
(Re)start USB...
USB:   INFO: aligned ghcca 8e01ad00
DEBUG: hc_reset

DEBUG: USB HC reset_hc usb-s3c2400: ctrl = 0x0 ;

DEBUG: OHCI controller usb-s3c2400 state
DEBUG: control: 0x008f HCFS=operational IE PLE CBSR=3
DEBUG: cmdstatus: 0x SOC=0
DEBUG: intrstatus: 0x0004 SF
DEBUG: intrenable: 0x0053 RHSC UE WDH SO
DEBUG: hcca frame #000d
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x0100 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 0
x8
INFO: submit_control_msg
DEBUG: SUB URB:[   d] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x8000

DEBUG: SUB(rh) URB:[   d] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x8000
INFO: Root-Hub: adr:  0 cmd(8): 0680 0100  0008
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x0100 PPS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
DEBUG: RET(rh) URB:[   d] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x0
usb_ohci.c: cmd(8): 80 06 00 01 00 00 08 00
usb_ohci.c: data(0/8):
set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length
0x0
INFO: submit_control_msg
DEBUG: SUB URB:[   d] dev: 0,ep: 0-O,type:CTRL,len:0/0 stat:0x8000
usb_ohci.c: cmd(8): 00 05 01 00 00 00 00 00

DEBUG: SUB(rh) URB:[   d] dev: 0,ep: 0-O,type:CTRL,len:0/0 stat:0x8000
usb_ohci.c: cmd(8): 00 05 01 00 00 00 00 00
INFO: Root-Hub: adr:  1 cmd(8): 0500 0001  
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x00010101 CSC PPS CCS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
DEBUG: RET(rh) URB:[   d] dev: 0,ep: 0-O,type:CTRL,len:0/0 stat:0x0
usb_ohci.c: cmd(8): 00 05 01 00 00 00 00 00
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0
x12
INFO: submit_control_msg
DEBUG: SUB URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/18 stat:0x8000

DEBUG: SUB(rh) URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/18 stat:0x8000
INFO: Root-Hub: adr:  1 cmd(8): 0680 0100  0012
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x00010101 CSC PPS CCS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
DEBUG: RET(rh) URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/18 stat:0x0
usb_ohci.c: cmd(8): 80 06 00 01 00 00 12 00
usb_ohci.c: data(0/18):
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0
x8
INFO: submit_control_msg
DEBUG: SUB URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/8 stat:0x8000

DEBUG: SUB(rh) URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/8 stat:0x8000
INFO: Root-Hub: adr:  1 cmd(8): 0680 0200  0008
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x00010101 CSC PPS CCS
DEBUG: roothub.portstatus [1] = 0x00010101 CSC PPS CCS
DEBUG: RET(rh) URB:[   d] dev: 1,ep: 0-I,type:CTRL,len:0/8 stat:0x0

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

2008-09-02 Thread thaoth

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_PARTITION1
#define CONFIG_SYS_CLK_FREQ 
#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,@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: 0x008f HCFS=operational IE PLE CBSR=3
DEBUG: cmdstatus: 0x SOC=0
DEBUG: intrstatus: 0x0004 SF
DEBUG: intrenable: 0x0053 RHSC UE WDH SO
DEBUG: hcca frame #0019
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x0100 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:0x8000
DEBUG: SUB(rh) URB:[  45] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x8000
INFO: Root-Hub: adr:  0 cmd(8): 0680 0001  0800
DEBUG: roothub.a: 02001202 POTPGT=2 NOCP NPS NDP=2
DEBUG: roothub.b:  PPCM= DR=
DEBUG: roothub.status: 
DEBUG: roothub.portstatus [0] = 0x0100 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 [EMAIL PROTECTED]:

 Hi Nobuhiro Iwamatsu,

 1. Clock frequency of board.

 #define CONFIG_SYS_CLK_FREQ 
 #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 0xA160 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, 0xa160);
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@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.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-08-21 Thread thaoth

Hi Nobuhiro Iwamatsu,

I have checked sequence initialization functions in sh_generic_init and the
problem is serial library cannot work correctly. The result is output to
console cannot display.

Regards.

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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-08-19 Thread thaoth

Hi Nobuhiro Iwamatsu,

1. Clock frequency of board.

#define CONFIG_SYS_CLK_FREQ 
#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.

CPU:   SH7727 144 MHz
Flash ROM: 8000 - 807F : 8 MB (64 KB blk x 128)
   8000 - 8000 : Monitor Area (64 KB)
   8001 - 8001007F : RomInfo Area (128 B)
SDRAM: 8C00 - 8DFF : 32 MB
   8C00 - 8C001FFF : Monitor  System Area (8 KB)

Could I set CFG_HZ to 144?
#define CFG_HZ 144

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 0xA160 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, 0xa160);
return 0;
}

I don't know why it isn't called?

Would you please give me your ideas? Thank you a lot.
Regards,
-- 
View this message in context: 
http://www.nabble.com/-T-Engine--UBoot-configuration-for-T-Engine-SH7727-MS7727CP02-DevKit-tp18868090p19062634.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot