[BACK]Return to nslm7x.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / ic

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

Diff for /src/sys/dev/ic/nslm7x.c between version 1.46.4.1 and 1.46.4.2

version 1.46.4.1, 2008/05/16 02:24:05 version 1.46.4.2, 2009/05/04 08:12:43
Line 1625  lm_generic_banksel(struct lm_softc *lmsc
Line 1625  lm_generic_banksel(struct lm_softc *lmsc
   
 /*  /*
  * bus independent probe   * bus independent probe
    *
    * prerequisites:  lmsc contains valid lm_{read,write}reg() routines
    * and associated bus access data is present in attachment's softc
  */   */
 int  int
 lm_probe(bus_space_tag_t iot, bus_space_handle_t ioh)  lm_probe(struct lm_softc *lmsc)
 {  {
         uint8_t cr;          uint8_t cr;
         int rv;          int rv;
   
         /* Check for some power-on defaults */  
         bus_space_write_1(iot, ioh, LMC_ADDR, LMD_CONFIG);  
   
         /* Perform LM78 reset */          /* Perform LM78 reset */
         /* bus_space_write_1(iot, ioh, LMC_DATA, 0x80); */          /*(*lmsc->lm_writereg)(lmsc, LMD_CONFIG, 0x80); */
   
         /* XXX - Why do I have to reselect the register? */          cr = (*lmsc->lm_readreg)(lmsc, LMD_CONFIG);
         bus_space_write_1(iot, ioh, LMC_ADDR, LMD_CONFIG);  
         cr = bus_space_read_1(iot, ioh, LMC_DATA);  
   
         /* XXX - spec says *only* 0x08! */          /* XXX - spec says *only* 0x08! */
         if ((cr == 0x08) || (cr == 0x01) || (cr == 0x03))          if ((cr == 0x08) || (cr == 0x01) || (cr == 0x03) || (cr == 0x06))
                 rv = 1;                  rv = 1;
         else          else
                 rv = 0;                  rv = 0;
Line 1653  lm_probe(bus_space_tag_t iot, bus_space_
Line 1651  lm_probe(bus_space_tag_t iot, bus_space_
         return rv;          return rv;
 }  }
   
   
 /*  
  * pre:  lmsc contains valid busspace tag and handle  
  */  
 void  void
 lm_attach(struct lm_softc *lmsc)  lm_attach(struct lm_softc *lmsc)
 {  {

Legend:
Removed from v.1.46.4.1  
changed lines
  Added in v.1.46.4.2

CVSweb <webmaster@jp.NetBSD.org>