Added delay required by Unican PCI cards detection code.
authorppisa <ppisa>
Wed, 16 Jun 2004 17:52:49 +0000 (17:52 +0000)
committerppisa <ppisa>
Wed, 16 Jun 2004 17:52:49 +0000 (17:52 +0000)
This is clumsy workaround for hardware misfeature.

lincan/src/unican_cl2.c

index a3dd7f7..e0d30e1 100644 (file)
@@ -34,6 +34,7 @@ UCEL A FUNKCE:
 #include "../include/canmsg.h"\r
 #include "../include/unican_types.h"\r
 #include "../include/unican_cl2.h"\r
+#include "linux/delay.h"\r
 \r
 \r
 /*******************************************************************************\r
@@ -103,7 +104,9 @@ eCL2_RESULT cl2_test_card
    for ( i = 0; i < 10000; i++ )\r
    {\r
      if ( isAA && is55 ) return CL2_OK;\r
-     tmpWord = *((U16*)(card->baseAddressPtr));\r
+     tmpWord = *((volatile U16*)(card->baseAddressPtr));\r
+     /*printk("cl2_test_card: %08lx %04x\n", (long)card->baseAddressPtr, tmpWord);*/\r
+     udelay(100);\r
      if ( (tmpWord & 0x00FF) == 0x00AA ) isAA = TRUE;\r
      if ( (tmpWord & 0x00FF) == 0x0055 ) is55 = TRUE;\r
    }\r