Lines Matching +full:bus +full:- +full:dmc
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 #include <sys/bus.h>
39 #include <machine/bus.h>
55 { -1, 0 }
69 #define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r))
70 #define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v))
109 device_set_desc(dev, "ARM DMC-620 Memory Controller PMU"); in pmu_dmc620_acpi_probe()
123 sc->sc_dev = dev; in pmu_dmc620_acpi_attach()
125 sc->sc_unit = u; in pmu_dmc620_acpi_attach()
128 * Ampere Altra support NUMA emulation, but DMC-620 PMU units have no in pmu_dmc620_acpi_attach()
134 sc->sc_domain = domain; in pmu_dmc620_acpi_attach()
138 i = bus_alloc_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_attach()
158 if (sc->sc_res[1] != NULL && bus_setup_intr(dev, sc->sc_res[1], in pmu_dmc620_acpi_attach()
160 NULL, sc, &sc->sc_ih)) { in pmu_dmc620_acpi_attach()
161 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_attach()
176 if (sc->sc_res[1] != NULL) { in pmu_dmc620_acpi_detach()
177 bus_teardown_intr(dev, sc->sc_res[1], sc->sc_ih); in pmu_dmc620_acpi_detach()
179 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_detach()
189 atomic_add_32(&sc->sc_clkdiv2_conters_hi[i], 1); in pmu_dmc620_clkdiv2_overflow()
191 dmc620_intr(tf, PMC_CLASS_DMC620_PMU_CD2, sc->sc_unit, i); in pmu_dmc620_clkdiv2_overflow()
199 atomic_add_32(&sc->sc_clk_conters_hi[i], 1); in pmu_dmc620_clk_overflow()
201 dmc620_intr(tf, PMC_CLASS_DMC620_PMU_C, sc->sc_unit, i); in pmu_dmc620_clk_overflow()
213 tf = PCPU_GET(curthread)->td_intr_frame; in pmu_dmc620_counter_overflow_intr()
222 sc->sc_saved_control[i] = RD4(sc, DMC620_REG(i, in pmu_dmc620_counter_overflow_intr()
225 sc->sc_saved_control[i] & ~DMC620_COUNTER_CONTROL_ENABLE); in pmu_dmc620_counter_overflow_intr()
248 sc->sc_saved_control[i]); in pmu_dmc620_counter_overflow_intr()
271 /* Reverse dependency. hwpmc needs DMC-620 on ARM64. */