]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/unican_cl2.c
Added delay required by Unican PCI cards detection code.
[lincan.git] / lincan / src / unican_cl2.c
index a3dd7f7663a7902737af5d6494f9f51da490a045..e0d30e18932dafd321869b903f6b4a94eb9f8986 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