+++ /dev/null
-{
- int i=0;
-
- DEBUGMSG("Resetting smartcan hardware ...\n");
- outb(0x00,candevices_p[card]->res_addr);
- while (i < 1000000) {
- i++;
- outb(0x01,candevices_p[card]->res_addr);
- }
- outb(0x00,candevices_p[card]->res_addr);
-
- /* Check hardware reset status */
- i=0;
- outb(candevices_p[card]->io_addr+iCPU,candevices_p[card]->io_addr);
- while ( (inb(candevices_p[card]->io_addr+1)&0x80) && (i<=15) ) {
- udelay(20000);
- i++;
- }
- if (i>=15) {
- CANMSG("Reset status timeout!\n");
- CANMSG("Please check your hardware.\n");
- return -ENODEV;
- }
- else
- DEBUGMSG("Chip0 reset status ok.\n");
-
- return 0;
-}