Lines Matching +full:powered +full:- +full:while +full:- +full:suspended

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
63 BHND_IVAR_VENDOR, /**< Designer's JEP-106 manufacturer ID. */
69 BHND_IVAR_CORE_INDEX, /**< Bus-assigned core number */
70 BHND_IVAR_CORE_UNIT, /**< Bus-assigned core unit number,
73 BHND_IVAR_PMU_INFO, /**< Internal bus-managed PMU state */
107 * Per-core IOCTL flags common to all bhnd(4) cores.
110 BHND_IOCTL_BIST = 0x8000, /**< Initiate a built-in self-test (BIST). Must be cleared
113 BHND_IOCTL_CFLAGS = 0x3FFC, /**< Reserved for core-specific ioctl flags. */
124 * Per-core IOST flags common to all bhnd(4) cores.
134 BHND_IOST_DMA64 = 0x1000, /**< Set if this core supports 64-bit DMA */
135 BHND_IOST_CFLAGS = 0x0FFC, /**< Reserved for core-specific status flags. */
160 uint16_t board_vendor; /**< Board vendor (PCI-SIG vendor ID).
175 * Broadcom-assigned reference board
217 bhnd_addr_t enum_addr; /**< chip_type-specific enumeration
230 BHND_CAP_BP64 = (1<<0), /**< Backplane supports 64-bit
239 uint16_t vendor; /**< JEP-106 vendor (BHND_MFGID_*) */
242 u_int core_idx; /**< bus-assigned core index */
243 int unit; /**< bus-assigned core unit */
250 BHND_DMA_ADDR_30BIT = 30, /**< 30-bit DMA */
251 BHND_DMA_ADDR_32BIT = 32, /**< 32-bit DMA */
252 BHND_DMA_ADDR_64BIT = 64, /**< 64-bit DMA */
261 ((1ULL << (_width)) - 1)) \
268 * Host-to-device physical address translation.
276 * Device-addressable address mask.
284 * Device-addressable extended address mask.
286 * If a per-core bhnd(4) DMA engine supports the 'addrext' control
291 * the DMA engine. For example, on PCI(e) Wi-Fi chipsets, the Wi-Fi
306 ((_dt)->base_addr == 0 && (_dt)->addr_mask == 0 && \
307 (_dt)->addrext_mask == 0 && (_dt)->flags == 0)
318 * physical memory on big-endian MIPS SoCs.
323 * Provides a byte-swapped mapping; write requests will be byte-swapped
325 * byte-swapped before being returned.
328 * data on embedded MIPS SoCs executing in big-endian mode.
336 * This provides an abstract interface to per-core resources that may require
337 * bus-level remapping of address windows prior to access.
374 (((_q)->desc.m.match_flags == 0) && (_q)->quirks == 0)
405 (BHND_MATCH_IS_ANY(&(_d)->core) && (_d)->desc == NULL)
415 child devices should be detached, suspended,
666 * @retval non-zero if registering @p dev otherwise fails, a regular
736 * the hardware may otherwise be non-functional; this method allows a parent
758 * Read the current value of a bhnd(4) device's per-core I/O control register.
766 * @retval non-zero If reading the IOCTL register otherwise fails, a regular
776 * Write @p value and @p mask to a bhnd(4) device's per-core I/O control
787 * @retval non-zero If writing the IOCTL register otherwise fails, a regular
797 * Read the current value of a bhnd(4) device's per-core I/O status register.
805 * @retval non-zero If reading the IOST register otherwise fails, a regular
831 * Place the bhnd(4) device's hardware into a low-power RESET state with
839 * @param ioctl Device-specific I/O control flags to be set when bringing
841 * @param reset_ioctl Device-specific I/O control flags to be set when placing
845 * @retval non-zero error
855 * Suspend @p child's hardware in a low-power reset state.
862 * @param dev The device to be suspended.
865 * @retval non-zero error
909 * @retval non-zero If determining the DMA address translation for @p child
932 * @retval non-zero If reading @p name otherwise fails, a regular unix
989 * @retval non-zero If mapping an interrupt otherwise fails, a regular
1011 * Allocate and enable per-core PMU request handling for @p child.
1021 * @retval non-zero If allocating PMU request state otherwise fails, a
1031 * Release any per-core PMU resources allocated for @p child. Any outstanding
1037 * @retval non-zero If releasing PMU request state otherwise fails, a
1115 * Request that @p clocks be powered on behalf of @p dev.
1141 * Power up an external PMU-managed resource assigned to @p dev.
1150 * @param rsrc The core-specific external resource identifier.
1163 * Power down an external PMU-managed resource assigned to @p dev.
1169 * @param rsrc The core-specific external resource identifier.
1182 * Read @p width bytes at @p offset from the bus-specific agent/config
1191 * The exact behavior of this method is bus-specific. In the case of
1212 * Write @p width bytes at @p offset to the bus-specific agent/config
1220 * The exact behavior of this method is bus-specific. In the case of
1263 * @retval non-zero If reading @p name otherwise fails, a regular unix
1280 * @param rid The bus-specific handle identifying the resource being allocated.
1309 * @param rid The bus-specific handle identifying the resource being allocated.
1327 * @param rid The bus-specific handle identifying the resource.
1332 * @retval non-zero an error occurred while activating the resource.
1347 * @param rid The bus-specific handle identifying the resource.
1352 * @retval non-zero an error occurred while activating the resource.
1367 * @param rid The bus-specific handle identifying the resource.
1372 * @retval non-zero an error occurred while activating the resource.
1425 * Return the resource-ID for a memory region on the given device port.
1433 * @retval -1 No such port/region found.
1453 * @retval non-zero No matching port/region found.
1474 * @retval non-zero No matching port/region found.
1485 * bhnd bus-level equivalents of the bus_(read|write|set|barrier|...)
1491 (((r)->direct) ? \
1492 bus_barrier((r)->res, (o), (l), (f)) : \
1494 device_get_parent(rman_get_device((r)->res)), \
1495 rman_get_device((r)->res), (r), (o), (l), (f)))
1497 (((r)->direct) ? \
1498 bus_read_1((r)->res, (o)) : \
1500 device_get_parent(rman_get_device((r)->res)), \
1501 rman_get_device((r)->res), (r), (o)))
1503 (((r)->direct) ? \
1504 bus_read_multi_1((r)->res, (o), (d), (c)) : \
1506 device_get_parent(rman_get_device((r)->res)), \
1507 rman_get_device((r)->res), (r), (o), (d), (c)))
1509 (((r)->direct) ? \
1510 bus_read_region_1((r)->res, (o), (d), (c)) : \
1512 device_get_parent(rman_get_device((r)->res)), \
1513 rman_get_device((r)->res), (r), (o), (d), (c)))
1515 (((r)->direct) ? \
1516 bus_write_1((r)->res, (o), (v)) : \
1518 device_get_parent(rman_get_device((r)->res)), \
1519 rman_get_device((r)->res), (r), (o), (v)))
1521 (((r)->direct) ? \
1522 bus_write_multi_1((r)->res, (o), (d), (c)) : \
1524 device_get_parent(rman_get_device((r)->res)), \
1525 rman_get_device((r)->res), (r), (o), (d), (c)))
1527 (((r)->direct) ? \
1528 bus_write_region_1((r)->res, (o), (d), (c)) : \
1530 device_get_parent(rman_get_device((r)->res)), \
1531 rman_get_device((r)->res), (r), (o), (d), (c)))
1533 (((r)->direct) ? \
1534 bus_read_stream_1((r)->res, (o)) : \
1536 device_get_parent(rman_get_device((r)->res)), \
1537 rman_get_device((r)->res), (r), (o)))
1539 (((r)->direct) ? \
1540 bus_read_multi_stream_1((r)->res, (o), (d), (c)) : \
1542 device_get_parent(rman_get_device((r)->res)), \
1543 rman_get_device((r)->res), (r), (o), (d), (c)))
1545 (((r)->direct) ? \
1546 bus_read_region_stream_1((r)->res, (o), (d), (c)) : \
1548 device_get_parent(rman_get_device((r)->res)), \
1549 rman_get_device((r)->res), (r), (o), (d), (c)))
1551 (((r)->direct) ? \
1552 bus_write_stream_1((r)->res, (o), (v)) : \
1554 device_get_parent(rman_get_device((r)->res)), \
1555 rman_get_device((r)->res), (r), (o), (v)))
1557 (((r)->direct) ? \
1558 bus_write_multi_stream_1((r)->res, (o), (d), (c)) : \
1560 device_get_parent(rman_get_device((r)->res)), \
1561 rman_get_device((r)->res), (r), (o), (d), (c)))
1563 (((r)->direct) ? \
1564 bus_write_region_stream_1((r)->res, (o), (d), (c)) : \
1566 device_get_parent(rman_get_device((r)->res)), \
1567 rman_get_device((r)->res), (r), (o), (d), (c)))
1569 (((r)->direct) ? \
1570 bus_set_multi_1((r)->res, (o), (v), (c)) : \
1572 device_get_parent(rman_get_device((r)->res)), \
1573 rman_get_device((r)->res), (r), (o), (v), (c)))
1575 (((r)->direct) ? \
1576 bus_set_region_1((r)->res, (o), (v), (c)) : \
1578 device_get_parent(rman_get_device((r)->res)), \
1579 rman_get_device((r)->res), (r), (o), (v), (c)))
1581 (((r)->direct) ? \
1582 bus_read_2((r)->res, (o)) : \
1584 device_get_parent(rman_get_device((r)->res)), \
1585 rman_get_device((r)->res), (r), (o)))
1587 (((r)->direct) ? \
1588 bus_read_multi_2((r)->res, (o), (d), (c)) : \
1590 device_get_parent(rman_get_device((r)->res)), \
1591 rman_get_device((r)->res), (r), (o), (d), (c)))
1593 (((r)->direct) ? \
1594 bus_read_region_2((r)->res, (o), (d), (c)) : \
1596 device_get_parent(rman_get_device((r)->res)), \
1597 rman_get_device((r)->res), (r), (o), (d), (c)))
1599 (((r)->direct) ? \
1600 bus_write_2((r)->res, (o), (v)) : \
1602 device_get_parent(rman_get_device((r)->res)), \
1603 rman_get_device((r)->res), (r), (o), (v)))
1605 (((r)->direct) ? \
1606 bus_write_multi_2((r)->res, (o), (d), (c)) : \
1608 device_get_parent(rman_get_device((r)->res)), \
1609 rman_get_device((r)->res), (r), (o), (d), (c)))
1611 (((r)->direct) ? \
1612 bus_write_region_2((r)->res, (o), (d), (c)) : \
1614 device_get_parent(rman_get_device((r)->res)), \
1615 rman_get_device((r)->res), (r), (o), (d), (c)))
1617 (((r)->direct) ? \
1618 bus_read_stream_2((r)->res, (o)) : \
1620 device_get_parent(rman_get_device((r)->res)), \
1621 rman_get_device((r)->res), (r), (o)))
1623 (((r)->direct) ? \
1624 bus_read_multi_stream_2((r)->res, (o), (d), (c)) : \
1626 device_get_parent(rman_get_device((r)->res)), \
1627 rman_get_device((r)->res), (r), (o), (d), (c)))
1629 (((r)->direct) ? \
1630 bus_read_region_stream_2((r)->res, (o), (d), (c)) : \
1632 device_get_parent(rman_get_device((r)->res)), \
1633 rman_get_device((r)->res), (r), (o), (d), (c)))
1635 (((r)->direct) ? \
1636 bus_write_stream_2((r)->res, (o), (v)) : \
1638 device_get_parent(rman_get_device((r)->res)), \
1639 rman_get_device((r)->res), (r), (o), (v)))
1641 (((r)->direct) ? \
1642 bus_write_multi_stream_2((r)->res, (o), (d), (c)) : \
1644 device_get_parent(rman_get_device((r)->res)), \
1645 rman_get_device((r)->res), (r), (o), (d), (c)))
1647 (((r)->direct) ? \
1648 bus_write_region_stream_2((r)->res, (o), (d), (c)) : \
1650 device_get_parent(rman_get_device((r)->res)), \
1651 rman_get_device((r)->res), (r), (o), (d), (c)))
1653 (((r)->direct) ? \
1654 bus_set_multi_2((r)->res, (o), (v), (c)) : \
1656 device_get_parent(rman_get_device((r)->res)), \
1657 rman_get_device((r)->res), (r), (o), (v), (c)))
1659 (((r)->direct) ? \
1660 bus_set_region_2((r)->res, (o), (v), (c)) : \
1662 device_get_parent(rman_get_device((r)->res)), \
1663 rman_get_device((r)->res), (r), (o), (v), (c)))
1665 (((r)->direct) ? \
1666 bus_read_4((r)->res, (o)) : \
1668 device_get_parent(rman_get_device((r)->res)), \
1669 rman_get_device((r)->res), (r), (o)))
1671 (((r)->direct) ? \
1672 bus_read_multi_4((r)->res, (o), (d), (c)) : \
1674 device_get_parent(rman_get_device((r)->res)), \
1675 rman_get_device((r)->res), (r), (o), (d), (c)))
1677 (((r)->direct) ? \
1678 bus_read_region_4((r)->res, (o), (d), (c)) : \
1680 device_get_parent(rman_get_device((r)->res)), \
1681 rman_get_device((r)->res), (r), (o), (d), (c)))
1683 (((r)->direct) ? \
1684 bus_write_4((r)->res, (o), (v)) : \
1686 device_get_parent(rman_get_device((r)->res)), \
1687 rman_get_device((r)->res), (r), (o), (v)))
1689 (((r)->direct) ? \
1690 bus_write_multi_4((r)->res, (o), (d), (c)) : \
1692 device_get_parent(rman_get_device((r)->res)), \
1693 rman_get_device((r)->res), (r), (o), (d), (c)))
1695 (((r)->direct) ? \
1696 bus_write_region_4((r)->res, (o), (d), (c)) : \
1698 device_get_parent(rman_get_device((r)->res)), \
1699 rman_get_device((r)->res), (r), (o), (d), (c)))
1701 (((r)->direct) ? \
1702 bus_read_stream_4((r)->res, (o)) : \
1704 device_get_parent(rman_get_device((r)->res)), \
1705 rman_get_device((r)->res), (r), (o)))
1707 (((r)->direct) ? \
1708 bus_read_multi_stream_4((r)->res, (o), (d), (c)) : \
1710 device_get_parent(rman_get_device((r)->res)), \
1711 rman_get_device((r)->res), (r), (o), (d), (c)))
1713 (((r)->direct) ? \
1714 bus_read_region_stream_4((r)->res, (o), (d), (c)) : \
1716 device_get_parent(rman_get_device((r)->res)), \
1717 rman_get_device((r)->res), (r), (o), (d), (c)))
1719 (((r)->direct) ? \
1720 bus_write_stream_4((r)->res, (o), (v)) : \
1722 device_get_parent(rman_get_device((r)->res)), \
1723 rman_get_device((r)->res), (r), (o), (v)))
1725 (((r)->direct) ? \
1726 bus_write_multi_stream_4((r)->res, (o), (d), (c)) : \
1728 device_get_parent(rman_get_device((r)->res)), \
1729 rman_get_device((r)->res), (r), (o), (d), (c)))
1731 (((r)->direct) ? \
1732 bus_write_region_stream_4((r)->res, (o), (d), (c)) : \
1734 device_get_parent(rman_get_device((r)->res)), \
1735 rman_get_device((r)->res), (r), (o), (d), (c)))
1737 (((r)->direct) ? \
1738 bus_set_multi_4((r)->res, (o), (v), (c)) : \
1740 device_get_parent(rman_get_device((r)->res)), \
1741 rman_get_device((r)->res), (r), (o), (v), (c)))
1743 (((r)->direct) ? \
1744 bus_set_region_4((r)->res, (o), (v), (c)) : \
1746 device_get_parent(rman_get_device((r)->res)), \
1747 rman_get_device((r)->res), (r), (o), (v), (c)))