zephyr/doc/kernel
Carlo Caione b6a3d598f3 device_mmio: Introduce DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME
Currently the device MMIO APIs is only able to map single DT-defined
regions and also the _NAMED variant is assuming that each DT-defined
device has only one single region to map.

This is a limitation and a problem when in the DT are defined devices
with multiple regions that need to be mapped.

This patch is trying to overcome this limitation by introducing the
DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME macro that leveraged the 'reg-names'
DT property to map multiple regions defined by a single device.

So for example in the DT we can have a device like:

  driver@c4000000 {
    reg = <0xc4000000 0x1000>, <0xc4001000 0x1000>;
    reg-names = "region0", "region1";
  };

and then we can use DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME doing:

  struct driver_config config = {
    DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME(region0, DT_DRV_INST(0)),
    DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME(region1, DT_DRV_INST(0)),
  };

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-16 11:26:10 +02:00
..
data_structures doc: kernel: Add documentation to spsc_pbuf 2022-06-07 19:04:35 +02:00
drivers device_mmio: Introduce DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME 2022-06-16 11:26:10 +02:00
iterable_sections doc: move misc services into OS Service section 2022-04-07 16:35:19 +02:00
memory_management doc: kernel: Re-organise memory management API pages 2022-06-01 15:26:48 +02:00
services doc: kernel: Re-organise memory management API pages 2022-06-01 15:26:48 +02:00
timing_functions include: update documentation to use zephyr/ prefix 2022-04-21 07:40:54 -05:00
usermode doc: develop: c: Add dynamic memory management documentations 2022-06-01 15:26:48 +02:00
util doc: move utility functions to kernel 2022-04-07 16:35:19 +02:00
code-relocation.rst doc: move sections from guides 2022-04-07 16:35:19 +02:00
index.rst doc: develop: Add 'Language Support' sub-category 2022-06-01 15:26:48 +02:00
timeutil.rst doc: move timeutil to kernel 2022-04-07 16:35:19 +02:00