[BACK]Return to sunxi_usbphy.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / arm / sunxi

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

Diff for /src/sys/arch/arm/sunxi/sunxi_usbphy.c between version 1.8 and 1.9

version 1.8, 2017/09/09 11:58:34 version 1.9, 2017/10/06 22:25:05
Line 74  static int sunxi_usbphy_match(device_t, 
Line 74  static int sunxi_usbphy_match(device_t, 
 static void sunxi_usbphy_attach(device_t, device_t, void *);  static void sunxi_usbphy_attach(device_t, device_t, void *);
   
 enum sunxi_usbphy_type {  enum sunxi_usbphy_type {
           USBPHY_A10 = 1,
         USBPHY_A13,          USBPHY_A13,
           USBPHY_A20,
         USBPHY_A31,          USBPHY_A31,
         USBPHY_H3,          USBPHY_H3,
         USBPHY_A64,          USBPHY_A64,
 };  };
   
 static const struct of_compat_data compat_data[] = {  static const struct of_compat_data compat_data[] = {
           { "allwinner,sun4i-a10-usb-phy",        USBPHY_A10 },
         { "allwinner,sun5i-a13-usb-phy",        USBPHY_A13 },          { "allwinner,sun5i-a13-usb-phy",        USBPHY_A13 },
         { "allwinner,sun6i-a31-usb-phy",        USBPHY_A31 },          { "allwinner,sun6i-a31-usb-phy",        USBPHY_A31 },
           { "allwinner,sun7i-a20-usb-phy",        USBPHY_A20 },
         { "allwinner,sun8i-h3-usb-phy",         USBPHY_H3 },          { "allwinner,sun8i-h3-usb-phy",         USBPHY_H3 },
         { "allwinner,sun50i-a64-usb-phy",       USBPHY_A64 },          { "allwinner,sun50i-a64-usb-phy",       USBPHY_A64 },
         { NULL }          { NULL }
Line 135  sunxi_usbphy_write(struct sunxi_usbphy_s
Line 139  sunxi_usbphy_write(struct sunxi_usbphy_s
         uint32_t val;          uint32_t val;
   
         switch (sc->sc_type) {          switch (sc->sc_type) {
           case USBPHY_A10:
         case USBPHY_A13:          case USBPHY_A13:
           case USBPHY_A20:
         case USBPHY_A31:          case USBPHY_A31:
                 reg = PHYCTL_A10;                  reg = PHYCTL_A10;
                 break;                  break;
Line 213  sunxi_usbphy_enable(device_t dev, void *
Line 219  sunxi_usbphy_enable(device_t dev, void *
                 disc_thresh = 0x2;                  disc_thresh = 0x2;
                 phy0_reroute = false;                  phy0_reroute = false;
                 break;                  break;
           case USBPHY_A10:
           case USBPHY_A20:
         case USBPHY_A31:          case USBPHY_A31:
                 disc_thresh = 0x3;                  disc_thresh = 0x3;
                 phy0_reroute = false;                  phy0_reroute = false;
Line 222  sunxi_usbphy_enable(device_t dev, void *
Line 230  sunxi_usbphy_enable(device_t dev, void *
                 disc_thresh = 0x3;                  disc_thresh = 0x3;
                 phy0_reroute = true;                  phy0_reroute = true;
                 break;                  break;
           default:
                   aprint_error_dev(dev, "unsupported board\n");
                   return ENXIO;
         }          }
   
         if (phy->phy_bsh) {          if (phy->phy_bsh) {

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

CVSweb <webmaster@jp.NetBSD.org>