Lines Matching defs:val

143 	uint16_t val;
755 uint32_t val;
795 val = rge_read_csi(sc, 0x70c) & ~0xff000000;
796 rge_write_csi(sc, 0x70c, val | 0x27000000);
799 val = pci_conf_read(sc->sc_pc, sc->sc_tag, 0x78) & ~0x00007000;
800 pci_conf_write(sc->sc_pc, sc->sc_tag, 0x78, val | 0x00005000);
806 val = RGE_READ_2(sc, RGE_RXQUEUE_CTRL) & ~0x001c;
807 RGE_WRITE_2(sc, RGE_RXQUEUE_CTRL, val | (fls(sc->sc_nqueues) - 1) << 2);
816 val = rge_read_mac_ocp(sc, 0xe614) & ~0x0700;
818 rge_write_mac_ocp(sc, 0xe614, val | 0x0400);
820 rge_write_mac_ocp(sc, 0xe614, val | 0x0200);
822 val = rge_read_mac_ocp(sc, 0xe63e) & ~0x0c00;
823 rge_write_mac_ocp(sc, 0xe63e, val |
834 val = rge_read_mac_ocp(sc, 0xeb6a) & ~0x00ff;
835 rge_write_mac_ocp(sc, 0xeb6a, val | 0x0033);
837 val = rge_read_mac_ocp(sc, 0xeb50) & ~0x03e0;
838 rge_write_mac_ocp(sc, 0xeb50, val | 0x0040);
840 val = rge_read_mac_ocp(sc, 0xe056) & ~0x00f0;
841 rge_write_mac_ocp(sc, 0xe056, val | 0x0030);
849 val = rge_read_mac_ocp(sc, 0xea1c) & ~0x0003;
850 rge_write_mac_ocp(sc, 0xea1c, val | 0x0001);
852 val = rge_read_mac_ocp(sc, 0xe0c0) & ~0x4f0f;
853 rge_write_mac_ocp(sc, 0xe0c0, val | 0x4403);
858 val = rge_read_mac_ocp(sc, 0xd430) & ~0x0fff;
859 rge_write_mac_ocp(sc, 0xd430, val | 0x047f);
990 int anar, gig, val;
999 val = rge_read_phy_ocp(sc, 0xa5d4);
1000 val &= ~RGE_ADV_2500TFDX;
1007 val |= RGE_ADV_2500TFDX;
1012 val |= RGE_ADV_2500TFDX;
1042 rge_write_phy_ocp(sc, 0xa5d4, val);
1667 uint16_t val;
1672 rtl8125_mac_cfg2_ephy[i].val);
1676 val = rge_read_phy_ocp(sc, 0xad40) & ~0x03ff;
1677 rge_write_phy_ocp(sc, 0xad40, val | 0x0084);
1679 val = rge_read_phy_ocp(sc, 0xad16) & ~0x03ff;
1680 rge_write_phy_ocp(sc, 0xad16, val | 0x0006);
1681 val = rge_read_phy_ocp(sc, 0xad32) & ~0x03ff;
1682 rge_write_phy_ocp(sc, 0xad32, val | 0x0006);
1684 val = rge_read_phy_ocp(sc, 0xac8a) & ~0xf000;
1685 rge_write_phy_ocp(sc, 0xac8a, val | 0x7000);
1691 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1692 rge_write_phy_ocp(sc, 0xa438, val | 0xc400);
1694 val = rge_read_phy_ocp(sc, 0xa438) & ~0x0700;
1695 rge_write_phy_ocp(sc, 0xa438, val | 0x0300);
1697 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1698 rge_write_phy_ocp(sc, 0xa438, val | 0x1c00);
1700 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1701 rge_write_phy_ocp(sc, 0xa438, val | 0x3000);
1703 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1704 rge_write_phy_ocp(sc, 0xa438, val | 0xa500);
1706 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1707 rge_write_phy_ocp(sc, 0xa438, val | 0x5000);
1709 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1710 rge_write_phy_ocp(sc, 0xa438, val | 0x3300);
1712 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1713 rge_write_phy_ocp(sc, 0xa438, val | 0x7000);
1715 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1716 rge_write_phy_ocp(sc, 0xa438, val | 0xf000);
1718 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1719 rge_write_phy_ocp(sc, 0xa438, val | 0x6500);
1721 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1722 rge_write_phy_ocp(sc, 0xa438, val | 0xed00);
1727 val = rge_read_phy_ocp(sc, 0xbf06) & ~0x003f;
1728 rge_write_phy_ocp(sc, 0xbf06, val | 0x0038);
1732 val = rge_read_phy_ocp(sc, 0xbf0a) & ~0x0e00;
1733 rge_write_phy_ocp(sc, 0xbf0a, val | 0x0a00);
1741 uint16_t val;
1757 rtl8125_mac_cfg3_ephy[i].val);
1759 val = rge_read_ephy(sc, 0x002a) & ~0x7000;
1760 rge_write_ephy(sc, 0x002a, val | 0x3000);
1766 val = rge_read_ephy(sc, 0x006a) & ~0x7000;
1767 rge_write_ephy(sc, 0x006a, val | 0x3000);
1777 val = rge_read_phy_ocp(sc, 0xad16) & ~0x03ff;
1778 rge_write_phy_ocp(sc, 0xad16, val | 0x03ff);
1779 val = rge_read_phy_ocp(sc, 0xad32) & ~0x003f;
1780 rge_write_phy_ocp(sc, 0xad32, val | 0x0006);
1783 val = rge_read_phy_ocp(sc, 0xacc0) & ~0x0003;
1784 rge_write_phy_ocp(sc, 0xacc0, val | 0x0002);
1785 val = rge_read_phy_ocp(sc, 0xad40) & ~0x00e0;
1786 rge_write_phy_ocp(sc, 0xad40, val | 0x0040);
1787 val = rge_read_phy_ocp(sc, 0xad40) & ~0x0007;
1788 rge_write_phy_ocp(sc, 0xad40, val | 0x0004);
1791 val = rge_read_phy_ocp(sc, 0xac5e) & ~0x0007;
1792 rge_write_phy_ocp(sc, 0xac5e, val | 0x0002);
1795 val = rge_read_phy_ocp(sc, 0xac8a) & ~0x00f0;
1796 rge_write_phy_ocp(sc, 0xac8a, val | 0x0030);
1798 val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00;
1799 rge_write_phy_ocp(sc, 0xb87e, val | 0x0500);
1801 val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00;
1802 rge_write_phy_ocp(sc, 0xb87e, val | 0x0700);
1833 val = rge_read_phy_ocp(sc, 0xb54c) & ~0xff00;
1834 rge_write_phy_ocp(sc, 0xb54c, val | 0xdb00);
1845 uint16_t val;
1857 rtl8125_mac_cfg4_ephy[i].val);
1864 val = rge_read_phy_ocp(sc, 0xbd4e) & ~0x0c00;
1865 rge_write_phy_ocp(sc, 0xbd4e, val | 0x0800);
1866 val = rge_read_phy_ocp(sc, 0xbf46) & ~0x0f00;
1867 rge_write_phy_ocp(sc, 0xbf46, val | 0x0700);
1874 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1875 rge_write_phy_ocp(sc, 0xa438, val | 0x0400);
1885 val = rge_read_phy_ocp(sc, 0xacda) & ~0xff00;
1886 rge_write_phy_ocp(sc, 0xacda, val | 0xff00);
1887 val = rge_read_phy_ocp(sc, 0xacde) & ~0xf000;
1888 rge_write_phy_ocp(sc, 0xacde, val | 0xf000);
1950 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1951 rge_write_phy_ocp(sc, 0xa438, val | 0x5000);
1953 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1954 rge_write_phy_ocp(sc, 0xa438, val | 0x5000);
1958 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1959 rge_write_phy_ocp(sc, 0xa438, val | 0x1000);
1965 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1966 rge_write_phy_ocp(sc, 0xa438, val | 0x6c00);
1970 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1971 rge_write_phy_ocp(sc, 0xa438, val | 0x9f00);
1977 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1978 rge_write_phy_ocp(sc, 0xa438, val | 0x1000);
1982 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1983 rge_write_phy_ocp(sc, 0xa438, val | 0x6c00);
1987 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1988 rge_write_phy_ocp(sc, 0xa438, val | 0x8000);
1998 val = rge_read_phy_ocp(sc, 0xa438) & ~0xff00;
1999 rge_write_phy_ocp(sc, 0xa438, val | 0xc000);
2034 uint16_t val;
2039 rtl8125_mac_cfg5_ephy[i].val);
2044 val = rge_read_phy_ocp(sc, 0xac46) & ~0x00f0;
2045 rge_write_phy_ocp(sc, 0xac46, val | 0x0090);
2046 val = rge_read_phy_ocp(sc, 0xad30) & ~0x0003;
2047 rge_write_phy_ocp(sc, 0xad30, val | 0x0001);
2055 val = rge_read_phy_ocp(sc, 0xb87e) & ~0xff00;
2056 rge_write_phy_ocp(sc, 0xb87e, val | 0x0800);
2057 val = rge_read_phy_ocp(sc, 0xbf00) & ~0xe000;
2058 rge_write_phy_ocp(sc, 0xbf00, val | 0xa000);
2059 val = rge_read_phy_ocp(sc, 0xbf46) & ~0x0f00;
2060 rge_write_phy_ocp(sc, 0xbf46, val | 0x0300);
2066 val = rge_read_phy_ocp(sc, 0xbf84) & ~0xe000;
2067 rge_write_phy_ocp(sc, 0xbf84, val | 0xa000);
2069 val = rge_read_phy_ocp(sc, 0xa438) & ~0x2700;
2070 rge_write_phy_ocp(sc, 0xa438, val | 0xd800);
2097 rtl8125_mac_cfg2_mcu[i].val);
2103 rtl8125_mac_cfg3_mcu[i].val);
2109 rtl8125_mac_cfg4_mcu[i].val);
2115 rtl8125_mac_cfg5_mcu[i].val);
2181 rtl8125_mac_bps[i].val);
2186 rtl8125b_mac_bps[i].val);
2353 rge_write_csi(struct rge_softc *sc, uint32_t reg, uint32_t val)
2357 RGE_WRITE_4(sc, RGE_CSIDR, val);
2390 rge_write_mac_ocp(struct rge_softc *sc, uint16_t reg, uint16_t val)
2395 tmp += val;
2403 uint32_t val;
2405 val = (reg >> 1) << RGE_MACOCP_ADDR_SHIFT;
2406 RGE_WRITE_4(sc, RGE_MACOCP, val);
2412 rge_write_ephy(struct rge_softc *sc, uint16_t reg, uint16_t val)
2418 tmp |= RGE_EPHYAR_BUSY | (val & RGE_EPHYAR_DATA_MASK);
2433 uint32_t val;
2436 val = (reg & RGE_EPHYAR_ADDR_MASK) << RGE_EPHYAR_ADDR_SHIFT;
2437 RGE_WRITE_4(sc, RGE_EPHYAR, val);
2441 val = RGE_READ_4(sc, RGE_EPHYAR);
2442 if (val & RGE_EPHYAR_BUSY)
2448 return (val & RGE_EPHYAR_DATA_MASK);
2452 rge_write_phy(struct rge_softc *sc, uint16_t addr, uint16_t reg, uint16_t val)
2463 rge_write_phy_ocp(sc, phyaddr, val);
2482 rge_write_phy_ocp(struct rge_softc *sc, uint16_t reg, uint16_t val)
2488 tmp |= RGE_PHYOCP_BUSY | val;
2501 uint32_t val;
2504 val = (reg >> 1) << RGE_PHYOCP_ADDR_SHIFT;
2505 RGE_WRITE_4(sc, RGE_PHYOCP, val);
2509 val = RGE_READ_4(sc, RGE_PHYOCP);
2510 if (val & RGE_PHYOCP_BUSY)
2514 return (val & RGE_PHYOCP_DATA_MASK);