I just noticed that the harddrive on my Geode sc2200 system is running in pio mode. What do I need to do to turn on dma support for this chip? John
John Allen wrote:
I just noticed that the harddrive on my Geode sc2200 system is running in pio mode. What do I need to do to turn on dma support for this chip? John
Pages 148 - 151, 267 - 272 in the NSC SC2200 data sheet have the Ultra DMA/33 and IDE Controller Register info and settings.
Bari
On Thu, 2 Jan 2003, Bari Ari wrote:
Pages 148 - 151, 267 - 272 in the NSC SC2200 data sheet have the Ultra DMA/33 and IDE Controller Register info and settings.
where should we set these? in the mainboard setup? in linux?
ron
I don't think we should wait until the kernel loads. For instance, I sometimes load the kernel from the hard drive with BOOT_IDE. The drive and controller should be in dma mode beofre this. Mainboard setup sounds good.. John
Ronald G. Minnich wrote:
On Thu, 2 Jan 2003, Bari Ari wrote:
Pages 148 - 151, 267 - 272 in the NSC SC2200 data sheet have the Ultra DMA/33 and IDE Controller Register info and settings.
where should we set these? in the mainboard setup? in linux?
ron
On Fri, 3 Jan 2003, John Allen wrote:
I don't think we should wait until the kernel loads. For instance, I sometimes load the kernel from the hard drive with BOOT_IDE. The drive and controller should be in dma mode beofre this. Mainboard setup sounds good..
send code or patch, I will apply.
ron
John Allen jallen@integraltech.com writes:
I don't think we should wait until the kernel loads. For instance, I sometimes load the kernel from the hard drive with BOOT_IDE. The drive and controller should be in dma mode beofre this. Mainboard setup sounds good..
Put it in the southbridge code, and only call it from mainboard_setup if you can.
I don't have a large problem with IDE setup in LinuxBIOS but for the most part I think it is wasted effort, and quite possibly wasted time during boot up. DMA setup is not as easy as just turning on DMA. You have to probe the IDE channel, and verify the drive/drives supports the kind of DMA you wan to do. And even in PIO mode you get 3MB/s.
Also look at the etherboot IDE code. It was initially derived from what is in LinuxBIOS but I think it is a little cleaner. At the very least I haven't run across a drive it has spin up issues with.
For the most part if you can get/write a Linux driver for this kind of things and it is satisfactory I don't see a problem.
Eric
Eric, You raise a good point. We would have to determine if the drives support the dma mode we want. I have done a little experimentation and found that it is probably best to let the kernel handle the dma setup. After all, having LinuxBIOS do the minimal initialization is the goal of LinuxBIOS. John
Eric W. Biederman wrote:
John Allen jallen@integraltech.com writes:
I don't think we should wait until the kernel loads. For instance, I sometimes load the kernel from the hard drive with BOOT_IDE. The drive and controller should be in dma mode beofre this. Mainboard setup sounds good..
Put it in the southbridge code, and only call it from mainboard_setup if you can.
I don't have a large problem with IDE setup in LinuxBIOS but for the most part I think it is wasted effort, and quite possibly wasted time during boot up. DMA setup is not as easy as just turning on DMA. You have to probe the IDE channel, and verify the drive/drives supports the kind of DMA you wan to do. And even in PIO mode you get 3MB/s.
Also look at the etherboot IDE code. It was initially derived from what is in LinuxBIOS but I think it is a little cleaner. At the very least I haven't run across a drive it has spin up issues with.
For the most part if you can get/write a Linux driver for this kind of things and it is satisfactory I don't see a problem.
Eric
On Mon, 6 Jan 2003, John Allen wrote:
You raise a good point. We would have to determine if the drives support the dma mode we want. I have done a little experimentation and found that it is probably best to let the kernel handle the dma setup. After all, having LinuxBIOS do the minimal initialization is the goal of LinuxBIOS.
Well I am glad to hear you say this, as I did not like the idea of putting all that DMA support into linuxbios -- the kernel can always do a better job of configuring IDE, I think.
ron
John Allen jallen@integraltech.com writes:
I just noticed that the harddrive on my Geode sc2200 system is running in pio mode. What do I need to do to turn on dma support for this chip?
You need support for the SC2200 DMA engine in your Linux kernel. Download a recent 2.5 kernel or Alan Cox' linux-2.2.20-ac2 kernel and turn on:
CONFIG_BLK_DEV_SC1200
I don't know how well it works though, I just got back after christmas and haven't had time to test it out yet.
/Christer