• Home
  • Raw
  • Download

Lines Matching refs:mode

45 static inline int zmii_valid_mode(int mode)  in zmii_valid_mode()  argument
47 return mode == PHY_INTERFACE_MODE_MII || in zmii_valid_mode()
48 mode == PHY_INTERFACE_MODE_RMII || in zmii_valid_mode()
49 mode == PHY_INTERFACE_MODE_SMII || in zmii_valid_mode()
50 mode == PHY_INTERFACE_MODE_NA; in zmii_valid_mode()
53 static inline const char *zmii_mode_name(int mode) in zmii_mode_name() argument
55 switch (mode) { in zmii_mode_name()
67 static inline u32 zmii_mode_mask(int mode, int input) in zmii_mode_mask() argument
69 switch (mode) { in zmii_mode_mask()
82 phy_interface_t *mode) in zmii_attach() argument
87 ZMII_DBG(dev, "init(%d, %d)" NL, input, *mode); in zmii_attach()
89 if (!zmii_valid_mode(*mode)) { in zmii_attach()
105 if (dev->mode == PHY_INTERFACE_MODE_NA) { in zmii_attach()
106 if (*mode == PHY_INTERFACE_MODE_NA) { in zmii_attach()
112 dev->mode = PHY_INTERFACE_MODE_MII; in zmii_attach()
114 dev->mode = PHY_INTERFACE_MODE_RMII; in zmii_attach()
116 dev->mode = PHY_INTERFACE_MODE_SMII; in zmii_attach()
118 dev->mode = *mode; in zmii_attach()
122 zmii_mode_name(dev->mode)); in zmii_attach()
125 if (*mode != PHY_INTERFACE_MODE_NA && *mode != dev->mode) { in zmii_attach()
128 ofdev->dev.of_node, *mode, input); in zmii_attach()
137 *mode = dev->mode; in zmii_attach()
140 out_be32(&p->fer, in_be32(&p->fer) | zmii_mode_mask(dev->mode, input)); in zmii_attach()
203 in_be32(&dev->base->fer) & ~zmii_mode_mask(dev->mode, input)); in zmii_detach()
245 dev->mode = PHY_INTERFACE_MODE_NA; in zmii_probe()