[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openrisc] [PATCH] or1ksim



Hi,

The or1ksim build was broken here. Attached you will find a patch which
fixes this problem.

Cheers,

p2.
-- 
diff -urN or1k/or1ksim/peripheral/atadevice.c or1k.clean/or1ksim/peripheral/atadevice.c
--- or1k/or1ksim/peripheral/atadevice.c	2002-08-23 10:40:14.000000000 +0200
+++ or1k.clean/or1ksim/peripheral/atadevice.c	2002-10-17 11:54:11.000000000 +0200
@@ -174,31 +174,31 @@
     /* this one is simple, device0 is device0                         */
 
     /* 1) handle device1 first                                        */
-    ata_device_hw_reset(&devices->device1, reset_signal, \
-			1, \ /* assert dasp, this is device1          */
-			0, \ /* negate pdiag input, no more devices   */
+    ata_device_hw_reset(&devices->device1, reset_signal, 
+			1,  /* assert dasp, this is device1          */
+			0,  /* negate pdiag input, no more devices   */
 			0);  /* negate dasp input, no more devices    */
 
     /* 2) Then handle device0                                         */
-    ata_device_hw_reset(&devices->device0, reset_signal, \
-			0,                              \
-			devices->device1.sigs.pdiago,        \
+    ata_device_hw_reset(&devices->device0, reset_signal, 
+			0,                              
+			devices->device1.sigs.pdiago,        
 			devices->device1.sigs.daspo);
   }
   else if (devices->device0.stream)
   {
     /* device0 is device0, there's no device1                         */
-    ata_device_hw_reset(&devices->device0, reset_signal, \
-			0, \ /* negate dasp, this is device0          */
-			0, \ /* negate pdiag input, there's no device1*/
+    ata_device_hw_reset(&devices->device0, reset_signal, 
+			0,  /* negate dasp, this is device0          */
+			0,  /* negate pdiag input, there's no device1*/
 			0);  /* negate dasp input, there's no device1 */
   }
   else if (devices->device1.stream)
   {
     /* device1 is (logical) device0, there's no (physical) device0    */
-    ata_device_hw_reset(&devices->device1, reset_signal, \
-			0, \ /* negate dasp, this is device0          */
-			0, \ /* negate pdiag input, there's no device1*/
+    ata_device_hw_reset(&devices->device1, reset_signal, 
+			0,  /* negate dasp, this is device0          */
+			0,  /* negate pdiag input, there's no device1*/
 			0);  /* negate dasp input, there's no device1 */
   }
   else
@@ -208,7 +208,7 @@
   }
 }
 
-void ata_device_hw_reset(ata_device *device, int reset_signal, \
+void ata_device_hw_reset(ata_device *device, int reset_signal, 
   int daspo, int pdiagi, int daspi)
 {
     /* check ata-device state                                         */
diff -urN or1k/or1ksim/peripheral/atadevice_cmdi.c or1k.clean/or1ksim/peripheral/atadevice_cmdi.c
--- or1k/or1ksim/peripheral/atadevice_cmdi.c	2002-07-31 20:17:43.000000000 +0200
+++ or1k.clean/or1ksim/peripheral/atadevice_cmdi.c	2002-10-17 11:56:49.000000000 +0200
@@ -570,90 +570,90 @@
     /*
        word 82: Command set supported
     */
-    *buf++ = 0                           << 15 | \ /* obsolete        */
-             SUPPORT_NOP_CMD             << 14 | \
-	     SUPPORT_READ_BUFFER_CMD     << 13 | \
-	     SUPPORT_WRITE_BUFFER_CMD    << 12 | \
-	     0                           << 11 | \ /* obsolete        */
-	     SUPPORT_HOST_PROTECTED_AREA << 10 | \
-	     SUPPORT_DEVICE_RESET_CMD    << 9  | \
-	     SUPPORT_SERVICE_INTERRUPT   << 8  | \
-	     SUPPORT_RELEASE_INTERRUPT   << 7  | \
-	     SUPPORT_LOOKAHEAD           << 6  | \
-	     SUPPORT_WRITE_CACHE         << 5  | \
-	     0                           << 4  | \ /* cleared to zero */
-	     SUPPORT_POWER_MANAGEMENT    << 3  | \
-	     SUPPORT_REMOVABLE_MEDIA     << 2  | \
-	     SUPPORT_SECURITY_MODE       << 1  | \
+    *buf++ = 0                           << 15 |  /* obsolete        */
+             SUPPORT_NOP_CMD             << 14 | 
+	     SUPPORT_READ_BUFFER_CMD     << 13 | 
+	     SUPPORT_WRITE_BUFFER_CMD    << 12 | 
+	     0                           << 11 |  /* obsolete        */
+	     SUPPORT_HOST_PROTECTED_AREA << 10 | 
+	     SUPPORT_DEVICE_RESET_CMD    << 9  | 
+	     SUPPORT_SERVICE_INTERRUPT   << 8  | 
+	     SUPPORT_RELEASE_INTERRUPT   << 7  | 
+	     SUPPORT_LOOKAHEAD           << 6  | 
+	     SUPPORT_WRITE_CACHE         << 5  | 
+	     0                           << 4  |  /* cleared to zero */
+	     SUPPORT_POWER_MANAGEMENT    << 3  | 
+	     SUPPORT_REMOVABLE_MEDIA     << 2  | 
+	     SUPPORT_SECURITY_MODE       << 1  | 
 	     SUPPORT_SMART               << 0
     ;
 
     /*
        word 83: Command set supported
     */
-    *buf++ = 0                           << 15 | \ /* cleared to zero */
-             1                           << 14 | \ /* set to one      */
-	     0                           << 9  | \ /* reserved        */
-	     SUPPORT_SET_MAX             << 8  | \
-	     0                           << 7  | \ /* reserved for    */
-	                                           /* project 1407DT  */
-	     SET_FEATURES_REQUIRED_AFTER_POWER_UP << 6  | \
-	     SUPPORT_POWER_UP_IN_STANDBY_MODE     << 5  | \
-	     SUPPORT_REMOVABLE_MEDIA_NOTIFICATION << 4  | \
-	     SUPPORT_APM                 << 3  | \
-	     SUPPORT_CFA                 << 2  | \
-	     SUPPORT_READ_WRITE_DMA_QUEUED        << 1  | \
+    *buf++ = 0                           << 15 |  /* cleared to zero */
+             1                           << 14 |  /* set to one      */
+	     0                           << 9  |  /* reserved        */
+	     SUPPORT_SET_MAX             << 8  | 
+	     0                           << 7  |  /* reserved for    */
+	                                          /* project 1407DT  */
+	     SET_FEATURES_REQUIRED_AFTER_POWER_UP << 6  | 
+	     SUPPORT_POWER_UP_IN_STANDBY_MODE     << 5  | 
+	     SUPPORT_REMOVABLE_MEDIA_NOTIFICATION << 4  | 
+	     SUPPORT_APM                 << 3  | 
+	     SUPPORT_CFA                 << 2  | 
+	     SUPPORT_READ_WRITE_DMA_QUEUED        << 1  | 
 	     SUPPORT_DOWNLOAD_MICROCODE  << 0
     ;
 
     /*
        word 84: Command set/feature supported
     */
-    *buf++ = 0                           << 15 | \ /* cleared to zero */
+    *buf++ = 0                           << 15 |   /* cleared to zero */
              1                           << 14     /* set to one      */
     ;                                              /* 0-13 reserved   */
 
     /*
        word 85: Command set enabled FIXME
     */
-    *buf++ = 0                           << 15 | \ /* obsolete        */
-             SUPPORT_NOP_CMD             << 14 | \
-	     SUPPORT_READ_BUFFER_CMD     << 13 | \
-	     SUPPORT_WRITE_BUFFER_CMD    << 12 | \
-	     0                           << 11 | \ /* obsolete        */
-	     SUPPORT_HOST_PROTECTED_AREA << 10 | \
-	     SUPPORT_DEVICE_RESET_CMD    << 9  | \
-	     SUPPORT_SERVICE_INTERRUPT   << 8  | \
-	     SUPPORT_RELEASE_INTERRUPT   << 7  | \
-	     SUPPORT_LOOKAHEAD           << 6  | \
-	     SUPPORT_WRITE_CACHE         << 5  | \
-	     0                           << 4  | \ /* cleared to zero */
-	     SUPPORT_POWER_MANAGEMENT    << 3  | \
-	     SUPPORT_REMOVABLE_MEDIA     << 2  | \
-	     SUPPORT_SECURITY_MODE       << 1  | \
+    *buf++ = 0                           << 15 |   /* obsolete        */
+             SUPPORT_NOP_CMD             << 14 | 
+	     SUPPORT_READ_BUFFER_CMD     << 13 | 
+	     SUPPORT_WRITE_BUFFER_CMD    << 12 | 
+	     0                           << 11 |  /* obsolete        */
+	     SUPPORT_HOST_PROTECTED_AREA << 10 | 
+	     SUPPORT_DEVICE_RESET_CMD    << 9  | 
+	     SUPPORT_SERVICE_INTERRUPT   << 8  | 
+	     SUPPORT_RELEASE_INTERRUPT   << 7  | 
+	     SUPPORT_LOOKAHEAD           << 6  | 
+	     SUPPORT_WRITE_CACHE         << 5  | 
+	     0                           << 4  |  /* cleared to zero */
+	     SUPPORT_POWER_MANAGEMENT    << 3  | 
+	     SUPPORT_REMOVABLE_MEDIA     << 2  | 
+	     SUPPORT_SECURITY_MODE       << 1  | 
 	     SUPPORT_SMART               << 0
     ;
 
     /*
        word 86: Command set enables
     */
-    *buf++ = 0                           << 9  | \ /* 15-9 reserved   */
-	     SUPPORT_SET_MAX             << 8  | \
-	     0                           << 7  | \ /* reserved for    */
+    *buf++ = 0                           << 9  |  /* 15-9 reserved   */
+	     SUPPORT_SET_MAX             << 8  | 
+	     0                           << 7  |  /* reserved for    */
 	                                           /* project 1407DT  */
-	     SET_FEATURES_REQUIRED_AFTER_POWER_UP << 6  | \
-	     SUPPORT_POWER_UP_IN_STANDBY_MODE     << 5  | \
-	     SUPPORT_REMOVABLE_MEDIA_NOTIFICATION << 4  | \
-	     SUPPORT_APM                 << 3  | \
-	     SUPPORT_CFA                 << 2  | \
-	     SUPPORT_READ_WRITE_DMA_QUEUED        << 1  | \
+	     SET_FEATURES_REQUIRED_AFTER_POWER_UP << 6  | 
+	     SUPPORT_POWER_UP_IN_STANDBY_MODE     << 5  | 
+	     SUPPORT_REMOVABLE_MEDIA_NOTIFICATION << 4  | 
+	     SUPPORT_APM                 << 3  | 
+	     SUPPORT_CFA                 << 2  | 
+	     SUPPORT_READ_WRITE_DMA_QUEUED        << 1  | 
 	     SUPPORT_DOWNLOAD_MICROCODE  << 0
     ;
 
     /*
        word 87: Command set/feature supported
     */
-    *buf++ = 0                           << 15 | \ /* cleared to zero */
+    *buf++ = 0                           << 15 |  /* cleared to zero */
              1                           << 14     /* set to one      */
     ;                                              /* 0-13 reserved   */
 
@@ -715,14 +715,14 @@
     if (device->settings.dev)
     {
       /* this is device1, clear device0 bits                                         */
-      *buf++ = 0              << 15 | \
-               1              << 14 | \
-               0              << 13 | \ /* CBLIBD level (1=Vih, 0=Vil)               */
+      *buf++ = 0              << 15 | 
+               1              << 14 | 
+               0              << 13 |  /* CBLIBD level (1=Vih, 0=Vil)               */
                                         /* 12-8 Device 1 hardware reset result       */
-               0              << 12 | \ /* reserved                                  */
-               device->sigs.pdiago << 11 | \ /* 1: Device1 did assert PDIAG               */
+               0              << 12 |  /* reserved                                  */
+               device->sigs.pdiago << 11 |  /* 1: Device1 did assert PDIAG               */
                                         /* 0: Device1 did not assert PDIAG           */
-               3              <<  9 | \ /* Device1 determined device number by       */
+               3              <<  9 |  /* Device1 determined device number by       */
                                         /* 00: reserved                              */
                                         /* 01: a jumper was used                     */
                                         /* 10: the CSEL signal was used              */
@@ -733,15 +733,15 @@
     else
     { /* FIXME bit 6 */
       /* this is device0, clear device1 bits                                         */
-      *buf++ = 0              << 7 | \  /* reserved                                  */
-               0              << 6 | \  /* 1: Device0 responds for device 1          */
+      *buf++ = 0              << 7 |   /* reserved                                  */
+               0              << 6 |   /* 1: Device0 responds for device 1          */
                                         /* 0: Device0 does not respond for device1   */
-               device->sigs.daspi  << 5 | \  /* 1: Device0 did detected DASP assertion    */
+               device->sigs.daspi  << 5 |   /* 1: Device0 did detected DASP assertion    */
                                         /* 0: Device0 did not detect DASP assertion  */
-               device->sigs.pdiagi << 4 | \  /* Device0 did detect PDIAG assertion        */
+               device->sigs.pdiagi << 4 |   /* Device0 did detect PDIAG assertion        */
                                         /* Device0 did not detect PDIAG assertion    */
-               1              << 3 | \  /* Device0 did pass diagnostics              */
-               3              << 1 | \  /* Device0 determined device number by       */
+               1              << 3 |   /* Device0 did pass diagnostics              */
+               3              << 1 |   /* Device0 determined device number by       */
                                         /* 00: reserved                              */
                                         /* 01: a jumper was used                     */
                                         /* 10: the CSEL signal was used              */