2009-01-16 08:09:28     CompactFlash on bf533 uning PATA hangs

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2009-01-16 08:09:28     CompactFlash on bf533 uning PATA hangs

paul zawalnyski (UNITED KINGDOM)

Message: 68029   

 

I am trying to get CompactFlash cards to work with a bf533.

 

I have started with the pata_platform.c driver.

 

It detects the card and identifies the drive, command 0xec, ok.

 

It hangs when trying to initialise drive parameters, command 0x91 and returns a time out message

 

ata1.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)

I cannot find where the data transfer is actually taking place to see why it is timing out, is this interrupt controlled or polled,

 

Thanks Paul

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-16 13:01:51     Re: CompactFlash on bf533 uning PATA hangs

Mike Frysinger (UNITED STATES)

Message: 68038   

 

what version of software are you using ?  and what changes exactly did you make ?

 

you arent supposed to copy/modify the pata_platform.c driver ... that's the point of it.  all settings are in the boards file.

QuoteReplyEditDelete

 

 

2009-01-16 15:04:27     Re: CompactFlash on bf533 uning PATA hangs

paul zawalnyski (UNITED KINGDOM)

Message: 68046   

 

Hi

 

I am using 2008R1-RC8, boots as 2.6.22.18.

 

The only change I made to pata_platform.c was to detect the CF card and then call  platform_driver_register.

 

Where does the data come into from the ATA card if I could debug this I would be able to determine why it is not comming returning after the op.

 

Paul

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-16 15:16:32     Re: CompactFlash on bf533 uning PATA hangs

Mike Frysinger (UNITED STATES)

Message: 68047   

 

if you're using a CF IDE card, then you should be doing it like this:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bfin_cf_pcmcia

QuoteReplyEditDelete

 

 

2009-01-16 15:20:09     Re: CompactFlash on bf533 uning PATA hangs

Michael Hennerich (GERMANY)

Message: 68048   

 

 

I know the old IDE driver definitely required the IRQ.

IIRC I think the new PATA driver can work in register poll and irq mode, depending whether you provide and IRQ source in platform data or not.

 

Using the IRQ for CF Cards is kind of pointless since it asserts on read operations almost instantly – and the overhead actually taking the interrupt is huge compared …

 

In case you specified an Interrupt and it actually doesn’t match the HW – this would explain the behavior you experience.

 

-Michael 

QuoteReplyEditDelete

 

 

2009-01-16 15:34:08     Re: CompactFlash on bf533 uning PATA hangs

paul zawalnyski (UNITED KINGDOM)

Message: 68049   

 

Hi Mike

 

Thanks for the feed back, but when you try to install an ide it says you should use the pata driver and not the old ide driver. I was just doing what  wat told to.

 

But, I still dont know why I hangs, as the card works and also where the data transfer is happening, can some one tell me this.

 

Paul

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-16 15:37:51     Re: CompactFlash on bf533 uning PATA hangs

paul zawalnyski (UNITED KINGDOM)

Message: 68050   

 

Hi Mike

 

This is the path I have being going down. The interrupt is not being enable because it it doing a port probe and not a bus probe?

 

Paul

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-17 13:05:14     Re: CompactFlash on bf533 uning PATA hangs

paul zawalnyski (UNITED KINGDOM)

Message: 68063   

 

in libata-core.c the code takes this path and hangs

 

        if ((flags & ATA_READID_POSTRESET) && class == ATA_DEV_ATA) {

                /*

                 * The exact sequence expected by certain pre-ATA4 drives is:

                 * SRST RESET

                 * IDENTIFY

                 * INITIALIZE DEVICE PARAMETERS

                 * anything else..

                 * Some drives were very specific about that exact sequence.

                 */

 

How can I make it into a ATA_DEV_ATAPI

 

This would definately help.

 

Paul

Attachments

    Outcomes