This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SATA functionality and performance with OMAPL-138

Other Parts Discussed in Thread: CDCM61001, OMAP-L138, AM1808
Hi folks,

I'm working with some folks with LogicPD's OMAPL-138 board, but we're
having a lot of trouble with SATA functionality and performance.

I posted these same questions and data in the davinci-linux development list,
but this also seemed like an appropriate place to ask.

For the impatient, let me start with several questions, with details following. To users or developers: * Is anyone successfully using SATA with any OMAPL-138 board? * If so, what kind of sustained write performance[1] are you seeing? * What kernel version/flavor are you using? * What board are you using? * Is anyone successfully using SATA on a LogicPD OMAPL-138 board? * If so, what board rev and OMAP SOM rev? * Are there any tricks or gotchas in using SATA with the OMAPL-138 that I should watch out for? To primarily developers: * Are there any known issues with SATA support or performance? * I understand there are two "paths" to SATA support: the TI SATA patchset, and the newer generic "platform AHCI" patches. Can anyone shed some light on the state of these? Now, here are some more details about my actual situation: First of all, I got SATA to work with the 2.6.31-rc7-davinci1 kernel from TI, but there were two main issues. First, SATA would only work with one of three types of drives I tried (details below). Second, I can only get -- in the very best case, after tweaking kernel IO schedulers, trying different filesystems vs. raw device access, etc -- is around 25 MB/s sustained write performance. This seems like a common performance number I've seen reported by various people, but it's incredibly slow compared to what SATA should be capable of. We need more like 50 MB/s or more, which is still quite conservative from a SATA perspective. Next, under recent TI kernel releases, I can't get any of the three types of SATA drives to work (error details below). I've tried many DaVinci-PSP-SDK releases (listed below), with port multiplier support on or off, etc. The usual symbols are either 1) SATA will fail during drive detection, give up, and refuse to work at all, or 2) the drives will be detected and mapped to block devices which can be used, but any access results in endless streams of error messages. The types of drives I have tried using are as follows. I have tested at least 3 of each of these drives to ensure that it's not just a drive problem, and each drive has been validated to work with a PC via a USB<->SATA adaptor. * COTS Super Talent SATA 1.8" 64 GB Flash Drive * OEM Apacer SATA 64 GB Flash SSD, AP-SAFD18DPA064GS-EM * Various non-Flash traditional platter-based HD SATA drives Each of the above was tested with at least 3 LogicPD base boards with at least 3 LogicPD OMAPL-138 SOMs, all with the same results. In my first experimentation, I was only able to get the OEM Apacer drive to work with the TI 2.6.31-rc7-davinci1 kernel after enabling SATA in the kernel configuration. With all other kernels I have never been able to get any drive to work, although different kernels fail in different ways with different drives. I have tried the following TI Davinci-PSP-SDK releases, none of which I have been able to get to work correctly with SATA: * 03.20.00.06 -- SATA doesn't work at all * 03.20.00.08 -- SATA fails immediately, no block devices allocated. * 03.20.00.11 -- SATA starts to work, assigns block devices, then fails. * 03.20.00.12 -- same as above * 03.20.00.13 -- ditto * 03.20.00.14 -- ditto Each of these fails in slightly different ways. I can post the actual and complete error messages, but mostly the behavior is along these lines: When it fails initially and doesn't allocate block devices, I get this during boot. It takes a minute or two to get through it, then it fails and everything works fine, except SATA: ata1: link is slow to respond, please be patient (ready=0) ata1: COMRESET failed (errno=-16) ... (repeats of the above) ... ata1: limiting SATA link speed to 1.5 Gbps ata1: COMRESET failed (errno=-16) ata1: reset failed, giving up When it "works" initially, and assigns usable block devices, but reports lots of errors (and slows to a crawl) when access is attempted, I get messages like this. But, for example, the actual contents of the SError messages change depending on what kernel version I'm using, and sometimes I get different errors instead, like a lot of "soft link reset" and "timeout" messages, etc. ahci ahci: version 3.0 ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci ata1: SATA max UDMA/133 irq 67 ... ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: ATA-7: 64GB SATA Flash Drive, SFDB103E, max UDMA/133 ata1.00: 126189568 sectors, multi 1: LBA48 ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA 64GB SATA Flash SFDB PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 126189568 512-byte logical blocks: (64.6 GB/60.1 GiB) sd 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sd 0:0:0:0: [sda] Attached SCSI disk ... ata1.00: exception Emask 0x12 SAct 0x0 SErr 0x1080500 action 0x6 frozen ata1.00: irq_stat 0x08000000, interface fatal error ata1: SError: { UnrecovData Proto 10B8B TrStaTrns } ata1.00: failed command: READ DMA ata1.00: cmd c8/00:20:f8:7e:85/00:00:00:00:00/e7 tag 0 dma 16384 in res 50/00:00:f8:7f:85/00:00:00:00:00/e7 Emask 0x12 (ATA bus error) ata1.00: status: { DRDY } ata1: hard resetting link ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: configured for UDMA/133 Remounting root file system... ata1: EH complete Caching udev devnodes Populating dev cache ata1.00: exception Emask 0x12 SAct 0x0 SErr 0x1080500 action 0x6 frozen ata1.00: irq_stat 0x08000000, interface fatal error ata1: SError: { UnrecovData Proto 10B8B TrStaTrns } ata1.00: failed command: READ DMA ata1.00: cmd c8/00:10:00:02:00/00:00:00:00:00/e0 tag 0 dma 8192 in res 50/00:00:10:02:00/00:00:00:00:00/e0 Emask 0x12 (ATA bus error) ata1.00: status: { DRDY } ata1: hard resetting link ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: configured for UDMA/133 ata1: EH complete NET: Registered protocol family 10 logger: mount: mount point /proc/bus/usb does not exist ata1.00: exception Emask 0x12 SAct 0x0 SErr 0x1080500 action 0x6 frozen ata1.00: irq_stat 0x08000000, interface fatal error ata1: SError: { UnrecovData Proto 10B8B TrStaTrns } ata1.00: failed command: READ DMA ata1.00: cmd c8/00:40:68:00:00/00:00:00:00:00/e0 tag 0 dma 32768 in res 50/00:00:00:00:00/00:00:00:00:00/e0 Emask 0x12 (ATA bus error) ata1.00: status: { DRDY } ata1: hard resetting link ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: configured for UDMA/133 ata1: EH complete ALSA: Restoring mixer settings... NOT configuring network interfaces: / is an NFS mount ata1: limiting SATA link speed to 1.5 Gbps ata1.00: exception Emask 0x12 SAct 0x0 SErr 0x1a00500 action 0x6 frozen ata1.00: irq_stat 0x08000000, interface fatal error ata1: SError: { UnrecovData Proto BadCRC LinkSeq TrStaTrns } ata1.00: failed command: READ DMA ata1.00: cmd c8/00:40:68:00:00/00:00:00:00:00/e0 tag 0 dma 32768 in res 50/00:46:00:00:00/00:00:00:00:00/a0 Emask 0x12 (ATA bus error) ata1.00: status: { DRDY } ata1: hard resetting link Thu Oct 14 21:40:00 UTC 2010 INIT: Entering runlevel: 5 ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310) ata1.00: configured for UDMA/133 ata1: EH complete Starting system message bus: dbus. Starting telnet daemon. Starting syslogd/klogd: done Starting thttpd. FAT: invalid media value (0x5c) VFS: Can't find a valid FAT filesystem on dev sda. FAT: bogus number of reserved sectors VFS: Can't find a valid FAT filesystem on dev sda1. After getting the above errors, the drive "sort of" works. If it has data on it, I can mount it and, for example, "cat hello.txt" and get the right data. I can run cfdisk and change partitions around without getting any more errors. But if I do something like "mkfs.ext2 /dev/sda1", I'll get more errors similar to the above. Of course, I can still go back to the one kernel that did work, the TI 2.6.31-rc7-davinci1, and it works ... as long as I use the OEM Apacer drive and only want 25 MB/s sustained write throughput. Any ideas, thoughts or suggestions? Am I doing something totally wrong? Thanks for any input you may have!
  • Hi,

    Can you give the revision of SOM and baseboard you are using (the serial number on each sticker would be helpful)? The EVM did have issues with the SATA interface up until the latest revision, so please check that first to confirm. Thanks

    Jeff

  • Hello Jeff,

    I work on the project with Wes Landaker.  We are using two different versions of the SOM...both having the SATA issue to which you are referring.  The issue has to do with a signal driven by the OMAP used to reset the SATA clock driver chip, CDCM61001, on the SOM.  When the SOM is configured to drive its IOs at 1.8V via the LogiPD experimenter kit baseboard dip switch, the OMAP's 1.8V signal does not meet the required HI to reliably take the SATA clock driver chip out of reset.  However, Wes is setting the LogicPD experimenter baseboard dip switch to the 3.3V IO setting.  This setting does produce the proper voltage level for HI to the SATA clock driver chip reset input.

    Jeffrey

  • Thanks for that information. So when you set the IOs to 3.3V you do not see any SATA issues anymore, correct? Can you also provide the serial numbers for the SOM and baseboard if possible? Thanks again

    Jeff

  • All of the I/Os were already at 3.3 V -- this is the default on the LogicPD boards. All of the trouble I described was already using 3.3V I/Os. Nothing has been changed.

    Here are the part & serial numbers of some of the base boards I've tried with:

    1013527 REV 5 / 2310M01954

    1013527 REV 4 / 4309M00540

    1013527 REV 5 / 2310M01854

    (I have several more.)

    Here are the part & serial numbers of some of the SOMs I've tried with:

    1013525 REV 5 / 4609M00862

    1014652 REV A / 2410M00661

    1014652 REV A / 2410M00624

    (Again, I have several more.)

     

    But before chasing this much further, I'm more interested in the actual sustained write performance that can be obtained with the OMAP-L138. If 25 MB/s, as we got in our initial measurements, and is stated on the TI PSP wiki, is the best that anyone can *concretely* claim (e.g. only empirical measurements, no theoretical numbers), then I'm not sure it's worth figuring out the other SATA instability problems I described.

  • All of the SOMs you have listed are Beta 2 SOMs, which we saw identical issues with here in the lab. The Pilot SOMs (1015xxx) fixed the issue by bringing the layout and board components in spec. Do you have any Pilot SOMs you can test this with?

    I will check up on what empirical throughput numbers we have achieved and let you know.

    Jeff

  • I got my hands on a  new SOM (1016639 "REV B"), and that change alone made it immediately work with the Apacer SATA drive, so the older SOMs definitely were causing most of the broken behavior I saw.

    There are still a couple issues:

    It still does not work with the other drives I have I tried so far (the SuperTalent Flash drives), but instead of failing with horrible streams of error message, this time it just fails to get through initialization -- it just sits forever and doesn't print anything. If I pull the SATA plug it makes it quit trying, gives a single error message, and continues booting.

    I still am only seeing ~25 MB/s sustained write performance. I still am trying to understand why only this very slow performance is the best that anyone has reported so far. We'd like to at least get double that.

     

  • Good to hear. I would suspect the problems with the Flash drives have to do something with the Linux configuration. Have you posted over there to see what might need to be done to get those working in Linux? I have not personally tested these.

    As for the throughput I will check up on this and let you know.

    Jeff

  • I am considering the L138 for a project and would also be interested to hear of any real world SATA performance figures.

    Thanks,

    Ben

  • Any update on the subject?

    I'm very interested in SATA performance info too.

    Thanks.

  • Hello;

    On the SATA performance; you may be looking at wrong expectations!

    The Speed is not just the Sata's 1.5 or 3 GHZ; Rather the Cpu load and Memory speed is also important.

    Ti has 3 separate lists of performance results done for L138, AM35, AM37 Cpus in the Wiki's site.

    As I recall; the Sata performance of above 20 MB/s; comes with 99% cpu Load!

    AM35/Omap35 gives similar results at about half the speed and AM37 gives similar results at 10% of the Cpu load.(rough numbers).

    So even at 20 or 25 mB/s; you don't have much cpu to process data.

    and remember the Ethernet will run at about 78 M bits/s, at Full Cpu load.

    So your acutual use will be even less than this. and this is expected; since this is Not a data-processing Cpu.

    Good luck.

     

     

  • So, if I want to write 200MB of data stored in external sdram, you think that I will get only 20MB/s ?

    But what about DMA? I don't need to calculate anything....

    Tiny nxp1768 can go at 15 MB/s using SD card, so I hope that omap can do a little more in this area....

  • No; that will be much faster; here you were talking about IO modules like SATA and USB.

    Here are some numbers:

    SATA IO Speed:

    AM1808 at 456 Mhz: 44.5 MB/s Read, 26.6 MB/s Write (99% cpu load!)

    marvel cpu at 1200 Mhz: 51 to 72 MB/s,

    Intel Atom at 1.6Mhz Dual core: 85 MB/s.

    while the Sata-II should be about 300 MB/s!!!

    and for the 1768: it's actually LPC1768 and it's at 100mhz, No sata and No high speed usb, I used that chip 3 years ago.

    in one project; I will be using another variation of it next month.

    currently on the market; there is no cpu that has all the io functionality of L138/am1808!

    Even TI's 1.5gig cpus can't do what L138/am18xx can do!

    but it needs to be used in the right applications.

    Also remember that the new AM's 1.5 gig cpus from TI have Dual Sata ports and much better performance.

    I like to compare them to the Marvel's; because the Core in the TI's performs about 1.x times faster per MHZ.(Cortex 8 and 9).

    asad

     

  • Thanks, I've got your point.

    But anyway. it would be perfect to get TI official response on the subject.