The Philips Application Note AN10003_1.pdf actually indicates the need for
delays in Section 5.6.2 for both read and write operation.  I am not sure if
the same delays apply to all register accesses or only buffer accesses.  In
my code I've made iodelay 1 us.  The timing diagram in the 1160 DataSheet
don't really provide enough detail.


void writeToATLBuffer (char * pbuffer, ULONG uTotalBytes)
{
        ULONG uTotalDoubleWord;
        ULONG * puBuffer;
        ULONG uData1, uData2, uIndex;

        // Write the length of write to the HcTransferCount register in number 
of
bytes.
        WRITE_32BIT_REG(HcTransferCount, uTotalBytes)

        // Access data four bytes at a time and typecast the buffer pointer
accordingly.
        uTotalDoubleWord = uTotalBytes >> 2;
        puBuffer = (ULONG *) pbuffer;

        // Send the write index of the HcATLBufferPort register to the Host
Controller.
        outw(COMMAND_PORT, 0xC1)

        // Delay for 3 system ticks.
        iodelay()
        iodelay()
        iodelay()

        // Critical section. Disable all interrupts */
        DISABLE_INTERRUPTS();
        for (uIndex=0; uIndex < uTotalDoubleWord; ++uIndex)
        {
                // Get lower and higher half words.
                uData1 = puBuffer[uIndex] & 0x0000FFFF;
                uData2 = puBuffer[uIndex] & 0xFFFF0000;
                // Write lower-half word followed by higher-half word to the 
ATL buffer
                outw(DATA_PORT, uData1);
                outw(DATA_PORT, uData2);
                iodelay();
        }
        // Out of the critical section. Allow interrupts to happen again.
        ENABLE_INTERRUPTS();
}



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Olav
Kongas
Sent: Wednesday, November 10, 2004 12:49 PM
To: Dimitris Lampridis
Cc: Linux USB List
Subject: Re: [linux-usb-devel] Re: more on ohci-isp1362


On Wed, 10 Nov 2004, Dimitris Lampridis wrote:

> So, what is your status?

I'm stuck in a state, where the driver is sometimes able to
detect and configure storage devices to the point where they
are recognized as scsi devices by usb core. I haven't tried
mounting them though. But with majority of devices I have
tested with (both full and low speed), the configuration
process fails every now and then. I still don't know whether
this is a hardware or software problem. For the detailed
description of the problems, see:

http://sourceforge.net/mailarchive/forum.php?thread_id=5872506&forum_id=5398

> after that. The subsequent ohci_read_control() call and all the rest IO
> to come, read D<ffffffff !
> Did you see anything similar?

I did not see exactly similar thing. But I had to add delay
after register accesses into the functions like
HC_ISP1362_READ_DATA32. I used ndelay(150) though it
resolves to mdelay(1) on my architecture.

Olav



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to