[Soekris] Linux and ATA DMA on net5501
Martin K. Petersen
mkp at mkp.net
Fri Sep 28 23:37:25 UTC 2007
I received a couple of net5501s this week and was initially a bit
disappointed about performance. The new boxes felt significantly
slower than the 180MHz machines they were replacing. It quickly
became obvious that the sluggishness was due to lack of disk DMA.
The ATA function on the CS5536 companion chip is a bit special in that
its registers are absent from PCI config space. The config registers
on the 5536 can only be reached via the special Geode MSRs.
Søren is working on emulating the PCI IDE config registers in his BIOS
so eventually the ATA function is going to look like a real AMD 74xx.
But being the impatient type I whipped up a driver that uses
rdmsr/wrmsr to configure the controller.
For some reason DMA is failing with a SATA disk connected. Drive
setup and speed negotiation works fine but I'm not getting the right
bits when reading from disk. Need to investigate.
Regular PATA drive DMA, however, is working nicely. And what a
difference that made:
Timing cached reads: 400 MB in 2.01 seconds = 199.50 MB/sec
Timing buffered disk reads: 4 MB in 3.22 seconds = 1.24 MB/sec
Timing cached reads: 388 MB in 2.00 seconds = 193.96 MB/sec
Timing buffered disk reads: 88 MB in 3.05 seconds = 28.88 MB/sec
The driver is against Linux 2.6.23-rc8 but should apply to any recent
kernel. Make sure you select CONFIG_ATA* and not the legacy
CONFIG_IDE* bits when you configure.
More information about the Soekris-tech