[BACK]Return to ahc_isa.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / isa

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/isa/ahc_isa.c between version 1.14.6.2 and 1.15

version 1.14.6.2, 2002/10/10 18:33:31 version 1.15, 2001/11/15 07:03:32
Line 173  int ahc_isa_probe __P((struct device *, 
Line 173  int ahc_isa_probe __P((struct device *, 
 void    ahc_isa_attach __P((struct device *, struct device *, void *));  void    ahc_isa_attach __P((struct device *, struct device *, void *));
 void    aha2840_load_seeprom __P((struct ahc_softc *ahc));  void    aha2840_load_seeprom __P((struct ahc_softc *ahc));
   
 CFATTACH_DECL(ahc_isa, sizeof(struct ahc_softc),  struct cfattach ahc_isa_ca = {
     ahc_isa_probe, ahc_isa_attach, NULL, NULL);          sizeof(struct ahc_softc), ahc_isa_probe, ahc_isa_attach
   };
   
 /*  /*
  * This keeps track of which slots are to be checked next if the   * This keeps track of which slots are to be checked next if the
Line 287  ahc_isa_match(ia, iobase)
Line 288  ahc_isa_match(ia, iobase)
         if (irq < 0)          if (irq < 0)
                 return (0);                  return (0);
   
         if (ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT &&          if (ia->ia_irq != IRQUNK &&
             ia->ia_irq[0].ir_irq != irq) {              ia->ia_irq != irq) {
                 printf("ahc_isa_match: irq mismatch (kernel %d, card %d)\n",                  printf("ahc_isa_match: irq mismatch (kernel %d, card %d)\n",
                     ia->ia_irq[0].ir_irq, irq);                      ia->ia_irq, irq);
                 return (0);                  return (0);
         }          }
   
         /* We have a match */          /* We have a match */
         ia->ia_nio = 1;          ia->ia_iobase = iobase;
         ia->ia_io[0].ir_addr = iobase;          ia->ia_irq = irq;
         ia->ia_io[0].ir_size = AHC_ISA_IOSIZE;          ia->ia_iosize = AHC_ISA_IOSIZE;
           ia->ia_msize = 0;
         ia->ia_nirq = 1;  
         ia->ia_irq[0].ir_irq = irq;  
   
         ia->ia_ndrq = 0;  
         ia->ia_niomem = 0;  
   
         return (1);          return (1);
 }  }
   
Line 327  ahc_isa_probe(parent, match, aux)
Line 322  ahc_isa_probe(parent, match, aux)
                 ahc_isa_slot_initialized = 1;                  ahc_isa_slot_initialized = 1;
         }          }
   
         if (ia->ia_nio < 1)          if (ia->ia_iobase != IOBASEUNK)
                 return (0);                  return (ahc_isa_match(ia, ia->ia_iobase));
         if (ia->ia_nirq < 1)  
                 return (0);  
   
         if (ISA_DIRECT_CONFIG(ia))  
                 return (0);  
   
         if (ia->ia_io[0].ir_addr != ISACF_PORT_DEFAULT)  
                 return (ahc_isa_match(ia, ia->ia_io[0].ir_addr));  
   
         /*          /*
          * Find this bus's state.  If we don't yet have a slot           * Find this bus's state.  If we don't yet have a slot
Line 386  ahc_isa_attach(parent, self, aux)
Line 373  ahc_isa_attach(parent, self, aux)
         const char *intrtypestr;          const char *intrtypestr;
         char idstring[EISA_IDSTRINGLEN];          char idstring[EISA_IDSTRINGLEN];
   
         if (bus_space_map(iot, ia->ia_io[0].ir_addr, ia->ia_io[0].ir_size,          if (bus_space_map(iot, ia->ia_iobase, ia->ia_iosize, 0, &ioh)) {
             0, &ioh)) {  
                 printf(": can't map i/o space\n");                  printf(": can't map i/o space\n");
                 return;                  return;
         }          }
Line 468  ahc_isa_attach(parent, self, aux)
Line 454  ahc_isa_attach(parent, self, aux)
 free_ahc:  free_ahc:
         ahc_free(ahc);          ahc_free(ahc);
 free_io:  free_io:
         bus_space_unmap(iot, ioh, ia->ia_io[0].ir_size);          bus_space_unmap(iot, ioh, ia->ia_iosize);
 }  }
   
 /*  /*

Legend:
Removed from v.1.14.6.2  
changed lines
  Added in v.1.15

CVSweb <webmaster@jp.NetBSD.org>