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

Steven A. Falco sfalco at harris.com
Tue Feb 3 03:37:38 EST 2009


Lixin Yao wrote:
> Hello, Steven,
> 
> I realized that and made change, I use reg-shift of 1 which u-boot uses
> and works for the CF.
> 
> localbus at f0010100 {
>       #address-cells = <2>;                   
>       #size-cells = <1>;
>       compatible = "fsl,mpc8248-localbus",    
>                    "fsl,pq2-localbus",
>                    "simple-bus"; 
>       reg = <0xf0010100 0x40>;                
>       ranges = <0x3 0x0 0x30000000 0x10000    
>                 0x4 0x0 0x40000000 0x10000>;  
> 
>       pata at 3,0 {
>          compatible = "fsl,tr5000v2-pata", "ata-generic";
>          reg = <0x3 0x0 0x10 0x4 0xC 0x2>;   
>          reg-shift = <1>;                    
>          pio-mode = <6>;                     
>          // interrupts = <0x19 0x8>;         
>          // interrupt-parent = <&PIC>;       
>       };
> 
> 
> U-Boot (1.3.4) shows this:
> 
> bus 0: OK
>   Device 0: Model: SanDisk SDCFJ-128 Firm: HDX 2.27 Ser#:
> 116904C2505X4026
>             Type: Removable Hard Disk
>             Capacity: 122.5 MB = 0.1 GB (250880 x 512)
> 
> 
> This is the console output after setting reg = <0x3 0x0 0x10 0x4 0xC
> 0x2>:
> 
> ata_host_alloc: ENTER
> ata_port_alloc: ENTER
> __ata_port_freeze: ata4294967295 port frozen
> scsi0 : pata_platform
> ata1: PATA max PIO6 no IRQ, using PIO polling mmio cmd 0x30000000 ctl
> 0x4000000c

On my board, I get the following:

ata1: PATA max PIO6 mmio cmd 0x1c1000000 ctl 0x1c1000098 irq 32

Note that the addresses I provided got turned into 36-bit addresses
because I am using a PPC440EPx chip.

I am suspicious of the addresses you got, but I don't know enough
about how the mpc8248 sets up its memory map.  Perhaps someone with
knowledge of that chip can comment.

Have you hooked a logic analyzer to the device?  You should be sure
that the chip selects are really responding at the reported addresses.

Since the CF works with Uboot, at least we know the hardware is good.

	Steve


> ata_host_register: probe begin
> ata_port_schedule_eh: port EH scheduled
> ata_scsi_error: ENTER
> ata_port_flush_task: ENTER
> ata_eh_link_autopsy: ENTER
> ata_eh_recover: ENTER
> __ata_port_freeze: ata1 port frozen
> ata_sff_softreset: ENTER
> ata_sff_softreset: about to softreset, devmask=0
> ata_bus_softreset: ata1: bus reset via SRST
> ata_sff_softreset: EXIT, classes[0]=9 [1]=9
> ata_eh_thaw_port: ata1 port thawed
> ata_std_postreset: ENTER
> ata_std_postreset: EXIT
> ata_sff_postreset: EXIT, no device
> ata_eh_revalidate_and_attach: ENTER
> ata_eh_recover: EXIT, rc=0
> ata_scsi_error: EXIT
> ata_host_register: host probe begin
> TCP cubic registered
> NET: Registered protocol family 10
> IPv6 over IPv4 tunneling driver
> NET: Registered protocol family 17
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> ics1893_config_init() successful
> ADDRCONF(NETDEV_UP): eth0: link is not ready
> ics1893_config_init() successful
> IP-Config: Complete:
>      device=eth0, addr=172.20.16.150, mask=255.255.255.0,
> gw=172.20.16.1,
>      host=tr5000v2, domain=, nis-domain=(none),
>      bootserver=10.15.34.196, rootserver=10.15.34.196, rootpath=
> Looking up port of RPC 100003/2 on 10.15.34.196
> ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> Looking up port of RPC 100005/1 on 10.15.34.196
> VFS: Mounted root (nfs filesystem).
> Freeing unused kernel memory: 164k init
> ### Application running ...
> 
>  
> The San Disk CF is still not found.
> 
> Any more insights/ideas?
> 
> Thank you and I appreciate your help!
> 
> Lixin



More information about the Linuxppc-dev mailing list