Lines Matching +full:fixed +full:- +full:top
4 * SPDX-License-Identifier: Apache-2.0
13 * @defgroup device-mmio Device memory-mapped IO management
16 * Definitions and helper macros for managing driver memory-mapped
20 * including this separately may be needed for arch-level driver code
28 /* Storing MMIO addresses in RAM is a system-wide decision based on
34 * If we have PCIE enabled, this does mean that non-PCIE drivers may waste
85 * The mapped linear address will have read-write access to supervisor mode.
102 * read-write access. in device_map()
140 * @defgroup device-mmio-single Single MMIO region macros
141 * @ingroup device-mmio
175 * No build-time initialization of this memory is necessary; it
188 * Return a pointer to the RAM-based storage area for a device's MMIO
197 #define DEVICE_MMIO_RAM_PTR(device) (mm_reg_t *)((device)->data)
233 * Return a pointer to the ROM-based storage area for a device's MMIO
242 ((struct z_device_mmio_rom *)((dev)->config))
247 * Initialize MMIO-related information within a specific instance of
288 DEVICE_MMIO_ROM_PTR(dev)->phys_addr, \
289 DEVICE_MMIO_ROM_PTR(dev)->size, \
300 * For most microcontrollers MMIO addresses can be fixed values known at
301 * build time, and we can store this in device->config, residing in ROM.
304 * because they need to be memory-mapped into the address space, enumerated
317 #define DEVICE_MMIO_GET(dev) (DEVICE_MMIO_ROM_PTR(dev)->addr)
322 * @defgroup device-mmio-named Named MMIO region macros
323 * @ingroup device-mmio
360 * No build-time initialization of this memory is necessary; it
383 (&(DEV_DATA(dev)->name))
424 * Return a pointer to the ROM-based storage area for a device's MMIO
435 #define DEVICE_MMIO_NAMED_ROM_PTR(dev, name) (&(DEV_CFG(dev)->name))
440 * Initialize MMIO-related information within a specific instance of
474 * that will have two DT-defined regions named 'chip' and 'dale':
480 * reg-names = "chip", "dale";
536 (DEVICE_MMIO_NAMED_ROM_PTR((dev), name)->phys_addr), \
537 (DEVICE_MMIO_NAMED_ROM_PTR((dev), name)->size), \
569 ((DEVICE_MMIO_NAMED_ROM_PTR((dev), name))->addr)
575 * @defgroup device-mmio-toplevel Top-level MMIO region macros
576 * @ingroup device-mmio
579 * associate struct device with a driver instance. Top-level storage
584 * Currently PCIe devices are not well-supported with this set of macros.
597 * @brief Declare top-level storage for MMIO information, global scope
602 * Instead, this is a top-level declaration for the driver's C file.
607 * @param node_id Device-tree node identifier for this region
626 * Provide an extern reference to a top-level MMIO region
628 * If a top-level MMIO region defined with DEVICE_MMIO_DEFINE needs to be
634 * @param name Name of the top-level MMIO region
649 * @brief Declare top-level storage for MMIO information, static scope
654 * Instead, this is a top-level declaration for the driver's C file.
657 * @param name Name of the top-level MMIO region
658 * @param node_id Device-tree node identifier for this region
686 * Return a pointer to the ROM-based storage area for a toplevel MMIO region.
711 * @param name Name of the top-level MMIO region
726 * @brief Obtain the MMIO address for a device declared top-level
730 * @param name Name of the top-level MMIO region