Hi everybody,
as always i'm a little bit behind everyone (...) with my work on the
ISP1160 driver :-/

I've managed to incorporate Olav's code (especially the one used in
ohci-isp1xxx-emu.c) in mine, but there still is something not going
well, that keeps me from reaching your status. I'll describe my problem,
hoping that someone has a better understanding of my situation:

In summary, my HCD never reaches USBOperational state. I have a good IO
with my hardware, every R/W command reaches it's target, so I can say
that the command that is issued to HcControl to put the HC in
Operational Mode works fine. Here is the output of my syslog when
loading the driver (part of it):

Nov 23 18:45:47 naousa kernel: ohci_write_control: HCCONTROL
00000000->00000083
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]

As you can see, the masking works well, and HCFS is instructed to get
the correct value for USBOperational. Then the driver keeps on as
described in hc_start() function of ohci-hcd.c and sets up the Root Hub:

Nov 23 18:45:47 naousa kernel: hc_start: roothub.status
00000000->00008000
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: ohci_write_intrenable: Enabling OHCI
Interrupts: 8000001a
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: hc_start: roothub.a 05000010->05000210
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: hc_start: roothub.status
00008000->00010000
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]

Notice the last command, a read operation to HcControl, intended to
flush the pci writes as stated in the comments of the source code.
Shouldn't this return 0x80?

Then the HCD keeps on going and after registering the Root Hub, it goes
on to list the contents of the registers:

Nov 23 18:45:47 naousa kernel: usb usb3: new device strings: Mfr=3,
Product=2, SerialNumber=1
Nov 23 18:45:47 naousa kernel: usb usb3: default language 0x0409
Nov 23 18:45:47 naousa kernel: usb usb3: Manufacturer: Linux 2.6.8
ohci-isp1160_hcd
Nov 23 18:45:47 naousa kernel: usb usb3: SerialNumber: 0000:00:0e.0
Nov 23 18:45:47 naousa kernel: usb usb3: hotplug
Nov 23 18:45:47 naousa kernel: usb usb3: adding 3-0:1.0 (config #1,
interface 0)
Nov 23 18:45:47 naousa kernel: usb 3-0:1.0: hotplug
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: usb_probe_interface
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: usb_probe_interface - got id
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: USB hub found
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: 2 ports detected
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: standalone hub
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: individual port power
switching
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: individual port over-current
protection
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: power on to power good time:
10ms
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: local power source is good
Nov 23 18:45:47 naousa kernel: hub 3-0:1.0: enabling power on all ports
Nov 23 18:45:47 naousa kernel: __ohci_write_roothub_portstatus:
Portstatus[0]: 00000000->00000100
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: __ohci_write_roothub_portstatus:
Portstatus[1]: 00000000->00000100
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: ohci-isp1160_hcd 0000:00:0e.0: created
debug files
Nov 23 18:45:47 naousa kernel: ohci-isp1160_hcd 0000:00:0e.0: OHCI
controller state
Nov 23 18:45:47 naousa kernel: ohci-isp1160_hcd 0000:00:0e.0: OHCI 0.0,
NO legacy support registers
Nov 23 18:45:47 naousa kernel: A>[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: D<[EMAIL PROTECTED]
Nov 23 18:45:47 naousa kernel: ohci-isp1160_hcd 0000:00:0e.0: control
0x003 HCFS=reset CBSR=3

So, the last lines show the status of HcControl. Don't mind the "OHCI
0.0, NO legacy support registers" thing, it was something temporary in
reading the HcRevision (and I don't see how it can be connected to my
problem). Now, can anybody please tell me why my HC is still in
USBReset?


And another thing, pretty useless to me until I get the HC to work, but
is something that keeps on troubling me from the very first days of my
work. Take a look at the manual of ISP1160, paragraph "9.5 HC
Operational Model" on page 29. In the 3rd and 4th paragraphs, we read
that SOFITLint is issued first, followed by ATLint. Now, take a look at
document AN10003-01 Embedded Programming Guide, paragraph "5.4.4
Configuring Interrupts", on page 22. There is a note, just before the
end of 5.4.4, that states that we cannot use both ATLint and SOFITLint
together. Isn't this controversial to the manual's 9.5 paragraph? What
is the correct procedure? If the AN10003-01 document is correct, why did
they introduce ATLint in the first place?

Anyway, thanks a lot in advance (again...)
-- 
Dimitris Lampridis <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to