| 842 | } |
| 843 | |
| 844 | static int |
| 845 | mtk_pcie_phy_stop(device_t dev) |
| 846 | { |
| 847 | struct mtk_pci_softc *sc = device_get_softc(dev); |
| 848 | |
| 849 | if (sc->socid == MTK_SOC_MT7621 && |
| 850 | (mtk_sysctl_get(SYSCTL_REVID) & SYSCTL_REVID_MASK) != |
| 851 | SYSCTL_MT7621_REV_E) { |
| 852 | if (fdt_reset_deassert_all(dev)) |
| 853 | return (ENXIO); |
| 854 | } else { |
| 855 | if (fdt_reset_assert_all(dev)) |
| 856 | return (ENXIO); |
| 857 | } |
| 858 | |
| 859 | if (fdt_clock_disable_all(dev)) |
| 860 | return (ENXIO); |
| 861 | |
| 862 | return (0); |
| 863 | } |
| 864 | |
| 865 | #define mtk_pcie_phy_set(_sc, _reg, _s, _n, _v) \ |
| 866 | MT_WRITE32((_sc), (_reg), ((MT_READ32((_sc), (_reg)) & \ |
no test coverage detected