Lines Matching +full:block +full:- +full:fetch

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2015-2016 Landon Fuller <landonf@FreeBSD.org>
40 * The Broadcom HND family of devices consists of both SoCs and host-connected
46 * PCIe. As a result, the majority of hardware support code should be re-usable
50 * Earlier HND models used the siba(4) on-chip interconnect, while later models
113 sc->dev = dev; in bhnd_generic_attach()
134 /* Fetch children in detach order */ in bhnd_delete_children()
135 error = bhnd_bus_get_children(sc->dev, &devs, &ndevs, in bhnd_delete_children()
145 if ((error = device_delete_child(sc->dev, child))) in bhnd_delete_children()
195 /* Fetch children in detach order */ in bhnd_generic_shutdown()
232 /* Fetch children in attach order */ in bhnd_generic_resume()
271 /* Fetch children in detach order */ in bhnd_generic_suspend()
390 /* Determine address+size of the core's PMU register block */ in bhnd_generic_alloc_pmu()
394 device_printf(sc->dev, "error fetching register block info for " in bhnd_generic_alloc_pmu()
400 device_printf(sc->dev, "pmu offset %#jx would overrun %s " in bhnd_generic_alloc_pmu()
401 "register block\n", (uintmax_t)pmu_regs, in bhnd_generic_alloc_pmu()
406 /* Locate actual resource containing the core's register block */ in bhnd_generic_alloc_pmu()
419 if (rle->res == NULL) { in bhnd_generic_alloc_pmu()
425 if (r_addr+pmu_regs < rman_get_start(rle->res) || in bhnd_generic_alloc_pmu()
426 r_addr+pmu_regs >= rman_get_end(rle->res)) in bhnd_generic_alloc_pmu()
435 * of the core's register block allocation. in bhnd_generic_alloc_pmu()
440 if (rman_get_start(rle->res) > r_addr) in bhnd_generic_alloc_pmu()
441 pmu_regs -= rman_get_start(rle->res) - r_addr; in bhnd_generic_alloc_pmu()
443 pmu_regs -= r_addr - rman_get_start(rle->res); in bhnd_generic_alloc_pmu()
448 device_printf(sc->dev, "PMU not found\n"); in bhnd_generic_alloc_pmu()
452 /* Fetch the maximum transition latency from our PMU */ in bhnd_generic_alloc_pmu()
464 r->res = rle->res; in bhnd_generic_alloc_pmu()
465 r->direct = ((rman_get_flags(rle->res) & RF_ACTIVE) != 0); in bhnd_generic_alloc_pmu()
497 panic("pmu over-release for %s", device_get_nameunit(child)); in bhnd_generic_release_pmu()
503 if (!bhnd_is_hw_suspended(clkctl->cc_dev)) { in bhnd_generic_release_pmu()
518 r = clkctl->cc_res; in bhnd_generic_release_pmu()
519 pmu_dev = clkctl->cc_pmu_dev; in bhnd_generic_release_pmu()
548 return (bhnd_pmu_get_clock_latency(clkctl->cc_pmu_dev, clock, latency)); in bhnd_generic_get_clock_latency()
566 return (bhnd_pmu_get_clock_freq(clkctl->cc_pmu_dev, clock, freq)); in bhnd_generic_get_clock_freq()
607 device_get_nameunit(clkctl->cc_dev), clock); in bhnd_generic_request_clock()
668 device_get_nameunit(clkctl->cc_dev), clocks); in bhnd_generic_enable_clocks()
756 * This implementation assumes that port and region numbers are 0-indexed and
757 * are allocated non-sparsely, using BHND_BUS_GET_PORT_COUNT() and
850 /* Fetch reporting configuration for this device */ in bhnd_generic_probe_nomatch()
852 for (nm = bhnd_nomatch_table; nm->device != BHND_COREID_INVALID; nm++) { in bhnd_generic_probe_nomatch()
853 if (nm->vendor != bhnd_get_vendor(child)) in bhnd_generic_probe_nomatch()
856 if (nm->device != bhnd_get_device(child)) in bhnd_generic_probe_nomatch()
860 if (bootverbose && nm->if_verbose) in bhnd_generic_probe_nomatch()
868 /* Print the non-matched device info */ in bhnd_generic_probe_nomatch()
924 * but we can't reference per-core PMU register in bhnd_generic_child_deleted()
982 * non-bridged bus implementations, resources will never be marked as