Commit graph

17 commits

Author SHA1 Message Date
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Ederson de Souza 64a373f4ea doc/kernel/drivers: Mention deferred initialization
Add a section discussing device deferred initialization on the device
model documentation.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-05-10 20:24:44 -04:00
Pisit Sawangvonganan 512dc9ff38 doc: fix typo in multiple directories (build, hardware, kernel, project)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/build, hardware, kernel, project directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-26 13:16:18 +01:00
Thien Nguyen a0b746ed74 doc: drivers: deprecate driver init levels
Remove deprecated driver initialization levels in the docs.

Signed-off-by: Thien Nguyen <nguyenmthien@live.com>
2023-11-14 10:20:53 -05:00
Anas Nashif a08bfeb49c syscall: rename Z_OOPS -> K_OOPS
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 9c4d881183 syscall: rename Z_SYSCALL_ to K_SYSCALL_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif 4e396174ce kernel: move syscall_handler.h to internal include directory
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Fabio Baltieri bc43e890fd doc: drivers: add a paragraph mentioning the initlevels target
Add a paragraph mentioning the initlevels target for inspecting the
DEVICE_DEFINE and SYS_INIT sequence.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-28 23:19:59 +02:00
Sophie Tyalie e3ae110a05 fix: doc: in kernel/drivers interrupts function had mismatching types
The typedef defines an interrupt config routine with `const struct device
*dev`, while the example function had (void) as argument. This could be
considered confusing / would throw compiler warnings even though the
parameter isn't strictly necessary.

Code examples for initializing an IRQ in a device example follow the
updated pattern (e.g. see `drivers/serial/uart_npcx.c`).

Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
2023-02-22 16:58:29 -05:00
Henrik Brix Andersen 3c99a1e015 drivers: pcie: reintroduce support for I/O BARs
Reintroduce support for accessing I/O BARs which was removed in
43d84147d9.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Gerard Marull-Paretas e42f58ec94 init: s/ARCH/EARLY, call it just before arch kernel init
The `ARCH` init level was added to solve a specific problem, call init
code (SYS_INIT/devices) before `z_cstart` in the `intel_adsp` platform.
The documentation claims it runs before `z_cstart`, but this is only
true if the SoC/arch takes care of calling:

```c
z_sys_init_run_level(_SYS_INIT_LEVEL_ARCH);
```

Which is only true for `intel_adsp` nowadays. So in practice, we now
have a platform specific init level. This patch proposes to do things in
a slightly different way. First, level name is renamed to `EARLY`, to
emphasize it runs in the early stage of the boot process. Then, it is
handled by the Kernel (inside `z_cstart()` before calling
`arch_kernel_init()`). This means that any platform can now use this
level. For `intel_adsp`, there should be no changes, other than
`gcov_static_init()` will be called before (I assume this will allow to
obtain coverage for code called in EARLY?).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-12 17:16:27 +09:00
Anas Nashif 8e99222114 doc: document ARCH initialization level
document new initialization level ARCH, used to init drivers/services
very early in the ARCH code and before z_cstart().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 17:54:59 +02:00
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
Yuval Peress 41e7f30d0f include: update documentation to use zephyr/ prefix
Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-21 07:40:54 -05:00
Anas Nashif 38635f8899 doc: move kernel services under kernel
Move all kernel documentation under kernel/services.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-07 16:35:19 +02:00
Anas Nashif ea19a2dfc1 doc: remove empty driver model documentation
Change-Id: I8131a91e6109c8cbe2b00c644a92005191827966
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:34 -05:00
Rodrigo Caballero c720db67d3 Doc: Change the Driver Model to its own section of the Kernel Primer.
Moves the placeholder to the proper location.

Change-Id: I952640912714073f1e0ac4a0bcb2d2b320faaee4
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:15:19 -05:00