[Top] [All Lists]

Re: [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interfac

To: David Daney <>
Subject: Re: [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interface.
From: Alan Cox <>
Date: Fri, 21 Nov 2008 17:49:44 +0000
Cc:, linux-mips <>
In-reply-to: <>
Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903
Original-recipient: rfc822;
References: <> <> <>
> > Even if you wanted to do it this way you could just use arrays and lookup
> > tables as many other drivers do - ie
> > 
> >     pio = dev->pio_mode - XFER_PIO_0;
> >     t1 = data[pio];
> > 
> The timing calculations are based on the CPU clock rate, It is difficult 
> to encapsulate that in a table.

The lookup part of the switch you can however. If you can use the
ata_timing interface then it will also do the clock adjusting for you and
has a FIT() macro that can be quite handy for clipping.

> It appears to be broken.  One would expect ioread16 and ioread16_rep to 
> do endian swapping in the same manner.  On MIPS they do not.  Perhaps it 
> would be better to fix the problem at the source.

I think the MIPS tree needs fixing then.


<Prev in Thread] Current Thread [Next in Thread>