2009-08-10 09:17:42 isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78559
hi everyone!
my target board is ezkit-bf533 and the usb host controller is isp 1362
// ezkit.c
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
static struct resource isp1362_hcd_resources[] = {
{
.start = 0x20330000,
.end = 0x20330000,
.flags = IORESOURCE_MEM,
}, {
.start = 0x20330004,
.end = 0x20330004,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_PF5,
.end = IRQ_PF5,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},
};
static struct isp1362_platform_data isp1362_priv = {
.sel15Kres = 1,
.clknotstop = 0,
.oc_enable = 0,
.int_act_high =0,
.int_edge_triggered =0,
.remote_wakeup_connected = 0,
.no_power_switching = 1,
.power_switching_mode = 0,
};
static struct platform_device isp1362_hcd_device = {
.name = "isp1362-hcd",
.id = 0,
.dev = {
.platform_data = &isp1362_priv,
},
.num_resources = ARRAY_SIZE(isp1362_hcd_resources),
.resource = isp1362_hcd_resources,
};
#endif
when I reboot the system,I found the error like this:
driver isp1362-hcd, 2005-04-04
isp1362-hcd isp1362-hcd.0: ISP1362 Host Controller
isp1362-hcd isp1362-hcd.0: new USB bus registered, assigned bus number 1
isp1362_hc_reset:
val=0
val=0
val=0
Clock not ready after 100ms
isp1362-hcd isp1362-hcd.0: can\'t setup
isp1362-hcd isp1362-hcd.0: USB bus 1 deregistered
init error, -19
after i added some debug information
I found that the return value of the function isp1362_read_data16 is always 0
I really don\'t know how to solve the problem.
//isp1362-hcd.c
clkrdy = isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_CLKRDY;
//isp1362.h
#define isp1362_read_reg16(d, r) ({ \\
u16 __v; \\
REG_WIDTH_TEST(ISP1362_REG_##r, REG_WIDTH_16); \\
isp1362_write_addr(d, ISP1362_REG_##r); \\
__v = isp1362_read_data16(d); \\
RDBG("%s: Read %04x from %s[%02x]\\n", __FUNCTION__, __v, #r, \\
ISP1362_REG_NO(ISP1362_REG_##r)); \\
__v; \\
})
static u16 isp1362_read_data16(struct isp1362_hcd *isp1362_hcd)
{
u16 val;
_BUG_ON(!irqs_disabled());
DUMMY_DELAY_ACCESS;
val = readw(isp1362_hcd->data_reg);
//printk("val= %d\\n",val);
return val;
}
after I remove the codes:
//isp1362-hcd.c
//if (!clkrdy) {
//ERR("Clock not ready after //%lums\\n", timeout);
//ret = -ENODEV;
//}
new problem appeared : Invalid chip ID 0000
//isp1362-hcd.c
spin_lock_irqsave(&isp1362_hcd->lock, flags);
chipid = isp1362_read_reg16(isp1362_hcd, HCCHIPID);
spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
if ((chipid & HCCHIPID_MASK) != HCCHIPID_MAGIC) {
ERR("%s: Invalid chip ID %04x\\n", __func__, chipid);
return -ENODEV;
}
TranslateQuoteReplyEditDelete
2009-08-10 09:47:43 isp1362_hc_reset: Clock not ready after 100ms
Michael Hennerich (GERMANY)
Message: 78561 Which release are you using?
What is your SCLK and EBIU setting? (kernel config)?
QuoteReplyEditDelete
2009-08-10 10:15:16 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78562
uClinux-dist-2009R1-RC1
and sclk is 12M
(0x7BB0) Bank 0 (AMBCTL0.L)
(0x7BB0) Bank 1 (AMBCTL0.H)
(0x7BB0) Bank 2 (AMBCTL1.L)
(0xAAC2) Bank 3 (AMBCTL1.H)
TranslateQuoteReplyEditDelete
2009-08-10 10:31:29 Re: isp1362_hc_reset: Clock not ready after 100ms
Michael Hennerich (GERMANY)
Message: 78563 >and sclk is 12M
I assume you meant 120MHz?
What hardware are you using?
I recently tested the ISP1362-hcd driver and it worked ok.
QuoteReplyEditDelete
2009-08-10 10:34:32 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78564
sorry! the sclk is 27M and the isp1362 clock is 12M.
TranslateQuoteReplyEditDelete
2009-08-10 11:20:46 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78569
very sorry!! when I reboot the system ,I found that the system clock is 118M and the core clock is 594M.
TranslateQuoteReplyEditDelete
2009-08-10 11:23:01 Re: isp1362_hc_reset: Clock not ready after 100ms
Michael Hennerich (GERMANY)
Message: 78570 What hardware are you using?
QuoteReplyEditDelete
2009-08-10 21:20:39 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78580
TranslateQuoteReplyEditDelete
2009-08-11 04:33:05 Re: isp1362_hc_reset: Clock not ready after 100ms
Michael Hennerich (GERMANY)
Message: 78603 Hi Fan,
So far you failed to tell me you're Hardware.
I tested the ISP1362-HCD driver on BF533-EZKIT with the Blackfin USB
Extender Card.
docs.blackfin.uclinux.org/doku.php?id=3Dhw:cards:usb_ez-extender
See my setup below - I jumpered JP3 to J2-44 for IRQ_PF14.
See config and kernel messages below - it works great.
What you're describing can be caused be two things -=20
1) No hardware present=20
2) You use the wrong base address=20
#if defined(CONFIG_USB_ISP1362_HCD) ||
defined(CONFIG_USB_ISP1362_HCD_MODULE)
static struct resource isp1362_hcd_resources[] =3D {
{
.start =3D 0x20360000,
.end =3D 0x20360000,
.flags =3D IORESOURCE_MEM,
}, {
.start =3D 0x20360004,
.end =3D 0x20360004,
.flags =3D IORESOURCE_MEM,
}, {
.start =3D IRQ_PF14,
.end =3D IRQ_PF14,
.flags =3D IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
},
};
static struct isp1362_platform_data isp1362_priv =3D {
.sel15Kres =3D 1,
.clknotstop =3D 0,
.oc_enable =3D 0,
.int_act_high =3D 0,
.int_edge_triggered =3D 0,
.remote_wakeup_connected =3D 0,
.no_power_switching =3D 1,
.power_switching_mode =3D 0,
};
static struct platform_device isp1362_hcd_device =3D {
.name =3D "isp1362-hcd",
.id =3D 0,
.dev =3D {
.platform_data =3D &isp1362_priv,
},
.num_resources =3D ARRAY_SIZE(isp1362_hcd_resources),
.resource =3D isp1362_hcd_resources,
};
#endif
Linux version 2.6.28.10-ADI-2009R1-svn7130 (michael@mhenneri-D02) (gcc
version 4.1.2 (ADI svn)) #319 Tue Aug 11 10:12:9
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode =3D 0x00000400-0x00000490
text =3D 0x00001000-0x00112ba0
rodata =3D 0x00112ba0-0x00165f88
bss =3D 0x00166000-0x00176930
data =3D 0x00176930-0x00186000
stack =3D 0x00184000-0x00186000
init =3D 0x00186000-0x0065d000
available =3D 0x0065d000-0x01eff000
DMA Zone =3D 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF533 Rev 0.5
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 594 MHz core clock and 118 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages:
7873 =20
Kernel command line: bootargs=3Droot=3D/dev/mtdblock0 rw =
clkin_hz=3D27000000
earlyprintk=3Dserial,uart0,57600 console=3DttyBF0,50
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real
[ttyBF0] =20
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 24936k/32768k RAM, (4956k init code, 1094k kernel
code, 462k data, 1024k dma, 292k reserved) =20
Calibrating delay loop... 1183.74 BogoMIPS (lpj=3D2367488)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 64 KB (52 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 48
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq =3D 21) is a BFIN-UART
brd: module loaded
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version
1.0, regs_base@ffc00500, dma channel@5 =20
driver isp1362-hcd, 2005-04-04
isp1362-hcd isp1362-hcd.0: ISP1362 Host Controller
isp1362-hcd isp1362-hcd.0: new USB bus registered, assigned bus number 1
isp1362_hc_reset:
isp1362-hcd isp1362-hcd.0: irq 47, io mem 0x20360000
isp1362_hc_start:
isp1362-hcd isp1362-hcd.0: ISP1362 Memory usage:
isp1362-hcd isp1362-hcd.0: ISTL: 2 * 256: 512 @ $0000:$0100
isp1362-hcd isp1362-hcd.0: INTL: 16 * ( 64+8): 1152 @ $0200
isp1362-hcd isp1362-hcd.0: ATL : 32 * ( 64+8): 2304 @ $0680
isp1362-hcd isp1362-hcd.0: USED/FREE: 3968 128
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb usb1: New USB device found, idVendor=3D1d6b, idProduct=3D0001
usb usb1: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1
usb usb1: Product: ISP1362 Host Controller
usb usb1: Manufacturer: Linux 2.6.28.10-ADI-2009R1-svn7130 isp1362-hcd
usb usb1: SerialNumber: isp1362-hcd.0
ISP1362 Host Controller, irq 47
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=3D20 sec (nowayout=3D0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:39 UTC (39)
Freeing unused kernel memory: 4956k freed
dma_alloc_init: dma_page @ 0x01a20000 - 256 pages at 0x01f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-08-03 11:06:48 CEST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> usb 1-2: new full speed USB device using isp1362-hcd and address
2
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: New USB device found, idVendor=3D0781, idProduct=3D5406
usb 1-2: New USB device strings: Mfr=3D1, Product=3D2, SerialNumber=3D3
usb 1-2: Product: U3 Cruzer Micro
usb 1-2: Manufacturer: SanDisk Corporation
usb 1-2: SerialNumber: 0000162443743A6D
QuoteReplyEditDelete
2009-08-11 07:04:38 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78620
hi,Michael
very sorry! I have uploaded the Schematic diagram ,but it didn't display on the web page.now I upload again!!
DM-KIT-CBBF533-I.pdf
DM-KIT-EXBSSK-BF5xx.pdf
sendpix0.jpg
TranslateQuoteReplyEditDelete
2009-08-11 07:15:46 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78621
hi,
just now ,I check the base address and the hardware , the base address is right and the hardware isp1362 is also
present.
TranslateQuoteReplyEditDelete
2009-08-11 07:21:13 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78622
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1
Created: 2009-08-11 10:40:13 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 3937824 Bytes = 3.8 MB
Load Address: 00001000
Entry Point: 001e9624
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001e9624
Linux version 2.6.28.10-ADI-2009R1 (vs@vs-laptop) (gcc version 4.1.2 (ADI svn))9
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 31MB due to hardware anomaly 05000263
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00151980
rodata = 0x00151980-0x001b30a4
bss = 0x001b4000-0x001cb828
data = 0x001cb840-0x001de000
stack = 0x001dc000-0x001de000
init = 0x001de000-0x0078e000
available = 0x0078e000-0x01eff000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF532 Rev 0.4
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 594 MHz core clock and 118 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7873
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=27000000 earlyprintk=seriaf
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 23716k/32768k RAM, (5824k init code, 1346k kernel code, 562k )
Calibrating delay loop... 1183.74 BogoMIPS (lpj=2367488)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Instruction SRAM: 32 KB (20 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) � 2001-2006 Red Hat, Inc.
msgmni has been set to 46
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART
brd: module loaded
dm9000 Ethernet Driver
eth0: dm9000 at 20320000,20320010 IRQ 38 MAC: 08:00:3e:26:0a:5b
Linux video capture interface: v2.00
usbcore: registered new interface driver dabusb
dabusb: v1.54:DAB-USB Interface Driver for Linux (c)1999
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_5
driver isp1362-hcd, 2005-04-04
isp1362-hcd isp1362-hcd.0: ISP1362 Host Controller
isp1362-hcd isp1362-hcd.0: new USB bus registered, assigned bus number 1
isp1362_hc_reset:
Clock not ready after 100ms
isp1362-hcd isp1362-hcd.0: can't setup
isp1362-hcd isp1362-hcd.0: USB bus 1 deregistered
init error, -19
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-02-06 00:58:30 UTC (3113910)
eth0: link down
IP-Config: Complete:
device=eth0, addr=192.168.0.15, mask=255.255.255.0, gw=192.168.0.1,
host=bf533-ezkit, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Freeing unused kernel memory: 5824k freed
dma_alloc_init: dma_page @ 0x001de000 - 256 pages at 0x01f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| e th __0:__ lM) in
k up|o|, |8810___0M/ bp s, | f _ ul__ l- du\ \pl/ ex ,
lp a
| | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-08-11 18:38:46 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
TranslateQuoteReplyEditDelete
2009-08-11 08:19:47 Re: isp1362_hc_reset: Clock not ready after 100ms
Michael Hennerich (GERMANY)
Message: 78660 >driver isp1362-hcd, 2005-04-04
>isp1362-hcd isp1362-hcd.0: ISP1362 Host Controller
>isp1362-hcd isp1362-hcd.0: new USB bus registered, assigned bus number
1
>isp1362_hc_reset:
>Clock not ready after 100ms
>isp1362-hcd isp1362-hcd.0: can't setup
>isp1362-hcd isp1362-hcd.0: USB bus 1 deregistered
>init error, -19
I get exactly the same thing in case I remove the ISP1362 card from my
EZKIT and then start the kernel.
Your ISP1362_CS chip select is controlled by some glue logic inside the
CPLD on your board - I would start looking there if the ISP1362_CS
really toggles when you access ISP1362 registers.
-Michael
QuoteReplyEditDelete
2009-08-11 09:48:50 Re: isp1362_hc_reset: Clock not ready after 100ms
Chunbo Fan (CHINA)
Message: 78662
OK.It works OK.just because the CS pin didn't toggle.
thank you very much Michael.
-Chunbo Fan
TranslateQuoteReplyEditDelete
2009-12-22 21:11:06 Re: isp1362_hc_reset: Clock not ready after 100ms
fengsheng xiang (CHINA)
Message: 83851
OK.It works OK.just because the CS pin didn't toggle.
thank you very much Michael.
-Chunbo Fan
---
Hi, Chunbo Fan, I'm using the same platform with and meet the same problem with you.
Can you explain the "CS pin didn't toggle" and how do you solve the problem??
Thanks very much,,,