<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE> Can not get PATA to work for Compact Flash with 2.6.28 kernel</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">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.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The hardware is known good hardware.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I use 2.6.28 kernel and configured support for PATA for the CF.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is the setup in DTS file:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">localbus@f0010100 {</FONT>
<BR><FONT SIZE=2 FACE="Arial">#address-cells = <2>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">#size-cells = <1>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">compatible = "fsl,mpc8248-localbus",</FONT>
<BR><FONT SIZE=2 FACE="Arial">"fsl,pq2-localbus",</FONT>
<BR><FONT SIZE=2 FACE="Arial">"simple-bus";</FONT>
<BR><FONT SIZE=2 FACE="Arial">reg = <0xf0010100 0x40>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">ranges = <0x3 0x0 0x30000000 0x10000</FONT>
<BR><FONT SIZE=2 FACE="Arial">0x4 0x0 0x40000000 0x10000>;</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">pata@3,0 {</FONT>
<BR><FONT SIZE=2 FACE="Arial">compatible = "fsl,tr5000v2-pata", "ata-generic";</FONT>
<BR><FONT SIZE=2 FACE="Arial">reg = <0x3 0x0 0x10 0x4 0x0 0x10>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">reg-shift = <1>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">pio-mode = <3>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">// interrupts = <23 0x8>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">// interrupt-parent = <&PIC>;</FONT>
<BR><FONT SIZE=2 FACE="Arial">};</FONT>
<BR><FONT SIZE=2 FACE="Arial">};</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Here are some of the related CONFIG items:</FONT>
<BR><FONT SIZE=2 FACE="Arial">#</FONT>
<BR><FONT SIZE=2 FACE="Arial"># UBI - Unsorted block images</FONT>
<BR><FONT SIZE=2 FACE="Arial">#</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_MTD_UBI is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_OF_DEVICE=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_OF_I2C=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_OF_SPI=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_OF_GPIO=y</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_PARPORT is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_BLK_DEV=y</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_FD is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_CPQ_DA is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_CPQ_CISS_DA is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_DAC960 is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_COW_COMMON is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_BLK_DEV_LOOP=y</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_CRYPTOLOOP is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_NBD is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_SX8 is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_BLK_DEV_RAM=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_BLK_DEV_RAM_COUNT=16</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_BLK_DEV_RAM_SIZE=4096</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_CDROM_PKTCDVD is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_ATA_OVER_ETH is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_BLK_DEV_HD is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_MISC_DEVICES is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">#CONFIG_HAVE_IDE=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">#CONFIG_IDE=y</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">#</FONT>
<BR><FONT SIZE=2 FACE="Arial"># SCSI device support</FONT>
<BR><FONT SIZE=2 FACE="Arial">#</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_RAID_ATTRS is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_SCSI=y</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_SCSI_DMA is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial"># CONFIG_SCSI_NETLINK is not set</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_SCSI_PROC_FS=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_ATA=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_ATA_SFF=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_PATA_PLATFORM=y</FONT>
<BR><FONT SIZE=2 FACE="Arial">CONFIG_PATA_OF_PLATFORM=y</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Here is the output at console:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Kernel command line: console=ttyCPM0,38400 root=/dev/nfs rw nfsroot=10.15.34.196</FONT>
<BR><FONT SIZE=2 FACE="Arial">:/home/lyao01/work/target_idu_nccv3 ip=172.20.16.150:10.15.34.196:172.20.16.1:25</FONT>
<BR><FONT SIZE=2 FACE="Arial">5.255.255.0:tr5000v2:eth0ff</FONT>
<BR><FONT SIZE=2 FACE="Arial">......</FONT>
<BR><FONT SIZE=2 FACE="Arial">NET: Registered protocol family 16</FONT>
<BR><FONT SIZE=2 FACE="Arial">SCSI subsystem initialized</FONT>
<BR><FONT SIZE=2 FACE="Arial">NET: Registered protocol family 2</FONT>
<BR><FONT SIZE=2 FACE="Arial">IP route cache hash table entries: 1024 (order: 0, 4096 bytes)</FONT>
<BR><FONT SIZE=2 FACE="Arial">TCP established hash table entries: 2048 (order: 2, 16384 bytes)</FONT>
<BR><FONT SIZE=2 FACE="Arial">TCP bind hash table entries: 2048 (order: 1, 8192 bytes)</FONT>
<BR><FONT SIZE=2 FACE="Arial">TCP: Hash tables configured (established 2048 bind 2048)</FONT>
<BR><FONT SIZE=2 FACE="Arial">TCP reno registered</FONT>
<BR><FONT SIZE=2 FACE="Arial">NET: Registered protocol family 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">NTFS driver 2.1.29 [Flags: R/O].</FONT>
<BR><FONT SIZE=2 FACE="Arial">msgmni has been set to 119</FONT>
<BR><FONT SIZE=2 FACE="Arial">alg: No test for stdrng (krng)</FONT>
<BR><FONT SIZE=2 FACE="Arial">io scheduler noop registered</FONT>
<BR><FONT SIZE=2 FACE="Arial">io scheduler anticipatory registered</FONT>
<BR><FONT SIZE=2 FACE="Arial">io scheduler deadline registered (default)</FONT>
<BR><FONT SIZE=2 FACE="Arial">f0011a80.serial: ttyCPM0 at MMIO 0xc500ea80 (irq = 16) is a CPM UART</FONT>
<BR><FONT SIZE=2 FACE="Arial">brd: module loaded</FONT>
<BR><FONT SIZE=2 FACE="Arial">loop: module loaded</FONT>
<BR><FONT SIZE=2 FACE="Arial">PPP generic driver version 2.4.2</FONT>
<BR><FONT SIZE=2 FACE="Arial">PPP Deflate Compression module registered</FONT>
<BR><FONT SIZE=2 FACE="Arial">eth0: fs_enet: 00:00:c3:ff:7a:af</FONT>
<BR><FONT SIZE=2 FACE="Arial">CPM2 Bitbanged MII: probed</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_host_alloc: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_port_alloc: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">__ata_port_freeze: ata4294967295 port frozen</FONT>
<BR><FONT SIZE=2 FACE="Arial">scsi0 : pata_platform</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata1: PATA max PIO3 no IRQ, using PIO polling mmio cmd 0x30000000 ctl 0x40000000</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_host_register: probe begin</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_port_schedule_eh: port EH scheduled</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_scsi_error: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_port_flush_task: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_eh_link_autopsy: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_eh_recover: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">__ata_port_freeze: ata1 port frozen</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_sff_softreset: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_sff_softreset: about to softreset, devmask=0</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_bus_softreset: ata1: bus reset via SRST</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_sff_softreset: EXIT, classes[0]=9 [1]=9</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_eh_thaw_port: ata1 port thawed</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_std_postreset: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_std_postreset: EXIT</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_sff_postreset: EXIT, no device</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_eh_revalidate_and_attach: ENTER</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_eh_recover: EXIT, rc=0</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_scsi_error: EXIT</FONT>
<BR><FONT SIZE=2 FACE="Arial">ata_host_register: host probe begin</FONT>
<BR><FONT SIZE=2 FACE="Arial">TCP cubic registered</FONT>
<BR><FONT SIZE=2 FACE="Arial">NET: Registered protocol family 10</FONT>
<BR><FONT SIZE=2 FACE="Arial">IPv6 over IPv4 tunneling driver</FONT>
<BR><FONT SIZE=2 FACE="Arial">NET: Registered protocol family 17</FONT>
<BR><FONT SIZE=2 FACE="Arial">RPC: Registered udp transport module.</FONT>
<BR><FONT SIZE=2 FACE="Arial">RPC: Registered tcp transport module.</FONT>
<BR><FONT SIZE=2 FACE="Arial">ics1893_config_init() successful</FONT>
<BR><FONT SIZE=2 FACE="Arial">ADDRCONF(NETDEV_UP): eth0: link is not ready</FONT>
<BR><FONT SIZE=2 FACE="Arial">ics1893_config_init() successful</FONT>
<BR><FONT SIZE=2 FACE="Arial">IP-Config: Complete:</FONT>
<BR><FONT SIZE=2 FACE="Arial">device=eth0, addr=172.20.16.150, mask=255.255.255.0, gw=172.20.16.1,</FONT>
<BR><FONT SIZE=2 FACE="Arial">host=tr5000v2, domain=, nis-domain=(none),</FONT>
<BR><FONT SIZE=2 FACE="Arial">bootserver=10.15.34.196, rootserver=10.15.34.196, rootpath=</FONT>
<BR><FONT SIZE=2 FACE="Arial">Looking up port of RPC 100003/2 on 10.15.34.196</FONT>
<BR><FONT SIZE=2 FACE="Arial">ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready</FONT>
<BR><FONT SIZE=2 FACE="Arial">Looking up port of RPC 100005/1 on 10.15.34.196</FONT>
<BR><FONT SIZE=2 FACE="Arial">VFS: Mounted root (nfs filesystem).</FONT>
<BR><FONT SIZE=2 FACE="Arial">Freeing unused kernel memory: 164k init</FONT>
<BR><FONT SIZE=2 FACE="Arial">### Application running ...</FONT>
<BR><FONT SIZE=2 FACE="Arial">#</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">The San Disk Compact Flash is not discovered.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I appreciate any insights or suggestions.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Lixin Yao</FONT>
<BR><FONT SIZE=2 FACE="Arial">Harris Stratex Networks Inc</FONT>
<BR><FONT SIZE=2 FACE="Arial">RTP, North Carolina, USA</FONT>
</P>
</BODY>
</HTML>