[BACK]Return to emac3.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / playstation2 / dev

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

Diff for /src/sys/arch/playstation2/dev/emac3.c between version 1.2.16.2 and 1.3

version 1.2.16.2, 2008/01/21 09:38:15 version 1.3, 2005/12/11 12:18:35
Line 66  __KERNEL_RCSID(0, "$NetBSD$");
Line 66  __KERNEL_RCSID(0, "$NetBSD$");
 int     emac3_debug = 0;  int     emac3_debug = 0;
 #define DPRINTF(fmt, args...)                                           \  #define DPRINTF(fmt, args...)                                           \
         if (emac3_debug)                                                \          if (emac3_debug)                                                \
                 printf("%s: " fmt, __func__ , ##args)                  printf("%s: " fmt, __FUNCTION__ , ##args)
 #define DPRINTFN(n, arg)                                                \  #define DPRINTFN(n, arg)                                                \
         if (emac3_debug > (n))                                          \          if (emac3_debug > (n))                                          \
 n               printf("%s: " fmt, __func__ , ##args)  n               printf("%s: " fmt, __FUNCTION__ , ##args)
 #else  #else
 #define STATIC                  static  #define STATIC                  static
 #define DPRINTF(arg...)         ((void)0)  #define DPRINTF(arg...)         ((void)0)
Line 78  n  printf("%s: " fmt, __func__ , ##args)
Line 78  n  printf("%s: " fmt, __func__ , ##args)
   
 /* SMAP specific EMAC3 define */  /* SMAP specific EMAC3 define */
 #define EMAC3_BASE                      MIPS_PHYS_TO_KSEG1(0x14002000)  #define EMAC3_BASE                      MIPS_PHYS_TO_KSEG1(0x14002000)
 static inline u_int32_t  static __inline__ u_int32_t
 _emac3_reg_read_4(int ofs)  _emac3_reg_read_4(int ofs)
 {  {
         bus_addr_t a_ = EMAC3_BASE + ofs;          bus_addr_t a_ = EMAC3_BASE + ofs;
Line 86  _emac3_reg_read_4(int ofs)
Line 86  _emac3_reg_read_4(int ofs)
         return (_reg_read_2(a_) << 16) | _reg_read_2(a_ + 2);          return (_reg_read_2(a_) << 16) | _reg_read_2(a_ + 2);
 }  }
   
 static inline void  static __inline__ void
 _emac3_reg_write_4(int ofs, u_int32_t v)  _emac3_reg_write_4(int ofs, u_int32_t v)
 {  {
         bus_addr_t a_ = EMAC3_BASE + ofs;          bus_addr_t a_ = EMAC3_BASE + ofs;
Line 313  emac3_config(const u_int8_t *eaddr)
Line 313  emac3_config(const u_int8_t *eaddr)
 /*  /*
  * PHY/MII   * PHY/MII
  */   */
   int
   emac3_ifmedia_upd(struct ifnet *ifp)
   {
           struct emac3_softc *sc;
   
           sc = ifp->if_softc;
   
           return (mii_mediachg(&sc->mii));
   }
   
   void
   emac3_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
   {
           struct emac3_softc *sc;
   
           sc = ifp->if_softc;
   
           mii_pollstat(&sc->mii);
           ifmr->ifm_status = sc->mii.mii_media_status;
           ifmr->ifm_active = sc->mii.mii_media_active;
   }
   
 void  void
 emac3_phy_writereg(struct device *self, int phy, int reg, int data)  emac3_phy_writereg(struct device *self, int phy, int reg, int data)
 {  {

Legend:
Removed from v.1.2.16.2  
changed lines
  Added in v.1.3

CVSweb <webmaster@jp.NetBSD.org>