IDE: Support x86, Alpha, and ARM use of the IDE controller.
authorAli Saidi <Ali.Saidi@ARM.com>
Mon, 4 Apr 2011 16:42:23 +0000 (11:42 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Mon, 4 Apr 2011 16:42:23 +0000 (11:42 -0500)
src/dev/ide_ctrl.cc

index 95b13bc7a74ee425194866cd69d07ab6ecb49b82..8e9b673ac3ce9c4c4e584fbed1e20daa4dd63bad 100644 (file)
@@ -107,11 +107,11 @@ IdeController::IdeController(Params *p)
     primary.select(false);
     secondary.select(false);
 
-    if ((BARAddrs[0] & ~BAR_IO_MASK) && !legacyIO[0]){
+    if ((BARAddrs[0] & ~BAR_IO_MASK) && (!legacyIO[0] || ioShift)) {
         primary.cmdAddr = BARAddrs[0];  primary.cmdSize = BARSize[0];
         primary.ctrlAddr = BARAddrs[1]; primary.ctrlSize = BARAddrs[1];
     }
-    if ((BARAddrs[2] & ~BAR_IO_MASK) && !legacyIO[2]){
+    if ((BARAddrs[2] & ~BAR_IO_MASK) && (!legacyIO[2] || ioShift)) {
         secondary.cmdAddr = BARAddrs[2];  secondary.cmdSize = BARSize[2];
         secondary.ctrlAddr = BARAddrs[3]; secondary.ctrlSize = BARAddrs[3];
     }