Subject: Re: Can not get PATA to work for Compact Flash with 2.6.28 kernel

From: "Steven A. Falco" <[email-masked]>
Date: Mon, 02 Feb 2009 09:59:50 -0500

Lixin Yao wrote:
> 
> 
> I use a San Disk compact flash (CF) card on a board with MPC8248
> processor. The CF is connected to data and address bus of the processor
> and operates in TRUE IDE mode. The registers are memory mapped. I can
> read the file system on the CF in u-boot (1.3.4). U-boot can identify
> the CF and mount file system correctly.
> 
> The hardware is known good hardware.
> 
> I use 2.6.28 kernel and configured support for PATA for the CF.

The second register set does not start at register 0.  It starts
at register 6.  We are using 1 chip select from the processor,
and generate two chip selects to the CF that are 0x80 apart (on
a sequoia board).

So here is what I am using on the modified sequoia board.  Note
the 0x00000098 - you might think it should be 0x00000080 as per
the discussion above, but because the second register set starts
at 6, you have to build that into the address.  

pata@1,0 {
compatible = "harris,hydra_temp-pata", "ata-generic";
bank-width = <2>;
reg = <0x00000001 0x00000000 0x00000020 0x00000001 0x00000098 0x00000004>;
reg-shift = <2>;
pio-mode = <6>;
interrupt-parent = <&UIC0>;
interrupts = <0x1b 0x4>;
};

	Steve