| #
df7cecc0 |
| 03-Nov-2021 |
Lionel Debieve <lionel.debieve@foss.st.com> |
core: kernel: use size_t instead of ssize_t for _fdt_reg_size()
Size is read from the reg device tree property as an unsigned value coming from fdt32_to_cpu(). Use a size_t with associated error cod
core: kernel: use size_t instead of ssize_t for _fdt_reg_size()
Size is read from the reg device tree property as an unsigned value coming from fdt32_to_cpu(). Use a size_t with associated error code DT_INFO_INVALID_REG_SIZE as return in prototype. Update the current users according to this change.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
702fe5a7 |
| 10-Aug-2021 |
Clément Léger <clement.leger@bootlin.com> |
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding t
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding the interrupt. For instance some interrupt-cells allows to describe priority and type of interrupt:
interrupts = <67 IRQ_TYPE_LEVEL_HIGH 2>;
With existing support, only the interrupt number is returned by `dt_get_irq()`. This patch adds type and prio parameter which are passed to `dt_get_irq_type_prio()` and `itr_add_type_prio()`. This allows interrupt drivers to fill this from devicetree in `dt_get_irq()` but also use these information in the `add()` callback. Additionally, it allows to specify these flags manually when not using devicetree.
These parameters can then be used by the interrupt controller driver to setup the irq line correctly.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
df45c114 |
| 17-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt: fix missing const attribute on fdt reference
The standard FDT reference in libfdt and friends is a const void *. Fix few function prototypes that miss the const attribute.
Signed-off-by:
core: dt: fix missing const attribute on fdt reference
The standard FDT reference in libfdt and friends is a const void *. Fix few function prototypes that miss the const attribute.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
bc9618c0 |
| 17-May-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
core_mmu: fix implicit behavior of core_mmu_add_mapping()
In core_mmu_add_mapping() requested physical address rounded up/down to granule size (0x100000), which leads to establishing of virtual mapp
core_mmu: fix implicit behavior of core_mmu_add_mapping()
In core_mmu_add_mapping() requested physical address rounded up/down to granule size (0x100000), which leads to establishing of virtual mappings with overlapped physical counterparts. If two virtual mappings overlaps due to such roundings, then following phys_to_virt() can implicitly return result of virtual address from unexpected mapping. This patch fix such behavior by returning virtual address of newly established mapping.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Anton Rybakov <a.rybakov@omp.ru>
show more ...
|
| #
7acb3a47 |
| 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: add interrupt resource in dt_node_info
Adds interrupt resource in dt_node_info and load it from _fdt_fill_device_info().
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by:
core: add interrupt resource in dt_node_info
Adds interrupt resource in dt_node_info and load it from _fdt_fill_device_info().
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
67729d8d |
| 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated t
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated to ARM platform more specifically GIC driver. This change moves dt_get_irq() in interrupt framework, this manages the generic part of interrupt bindings (specified by devicetree.org [1]) and then call a driver callback to translate specific properties. This callback is registered by drivers while its init step.
Update CAAM crypto driver accordingly.
Link: [1] https://www.devicetree.org/specifications/ Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
1527e616 |
| 29-Aug-2020 |
Marek Vasut <marek.vasut+renesas@gmail.com> |
core: dt: Repair type in _fdt_reg_size()
The function returns ssize_t , while DT_INFO_INVALID_REG is paddr_t, fix the type.
Fixes: c0cfb36c ("core: dt: introduce _fdt_fill_device_info()") Signed-of
core: dt: Repair type in _fdt_reg_size()
The function returns ssize_t , while DT_INFO_INVALID_REG is paddr_t, fix the type.
Fixes: c0cfb36c ("core: dt: introduce _fdt_fill_device_info()") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
95cdc5e0 |
| 05-Jul-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status(
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status() set 'secure-status' field of node's prop and disable the 'status' field in the same time
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c0cfb36c |
| 08-Jan-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt: introduce _fdt_fill_device_info()
_fdt_fill_device_info() gets some generic properties from a given node in a single always successful sequence.
Retrieved device information from the DT:
core: dt: introduce _fdt_fill_device_info()
_fdt_fill_device_info() gets some generic properties from a given node in a single always successful sequence.
Retrieved device information from the DT: - The status/secure-status state as per DT_STATUS_*, - The first register base address found or DT_INFO_INVALID_REG (zero). If there are several register base addresses others are ignored. - The first clock identifier found or DT_INFO_INVALID_CLOCK (negative). - This first reset identifier found or DT_INFO_INVALID_RESET (negative).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
db783ff8 |
| 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct dt_find_compatible_driver() if no driver found
By convention the compatible array for driver probing ends with a NULL compatible string ID reference.
This change ensures such NULL ref
core: correct dt_find_compatible_driver() if no driver found
By convention the compatible array for driver probing ends with a NULL compatible string ID reference.
This change ensures such NULL reference is properly handled as the end of the compatible array references.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
b1d7375c |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words
Remove 'All rights reserved' from Linaro files
The text 'All rights reserved' is useless [1]. The Free Software Foundation's REUSE Initiative best practices document [2] does not contain these words. Therefore, we can safely remove the text from the files that are owned by Linaro.
Generated by: spdxify.py --linaro-only --strip-arr optee_os/
Link: [1] https://en.wikipedia.org/wiki/All_rights_reserved Link: [2] https://reuse.software/practices/ Link: [3] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
78b7c7c7 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.p
Remove license notice from Linaro files
Now that we have added SPDX identifiers, we can safely remove the verbose license text from the files that are owned by Linaro.
Generated by [1]: spdxify.py --linaro-only --strip-license-text optee_os/
Link: [1] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
34deb103 |
| 02-Oct-2017 |
Peng Fan <peng.fan@nxp.com> |
core: dt: fix getting address and size
According to ePAPR spec.
" The #address-cells and #size-cells properties may be used in any device node that has children in the device tree hierarchy and des
core: dt: fix getting address and size
According to ePAPR spec.
" The #address-cells and #size-cells properties may be used in any device node that has children in the device tree hierarchy and describes how child device nodes should be addressed. The #address-cells property defines the number of <u32> cells used to encode the address field in a child node’s reg property. The #size-cells property defines the number of <u32> cells used to encode the size field in a child node’s reg property.
The #address-cells and #size-cells properties are not inherited from ancestors in the device tree. They shall be explicitly defined.
An ePAPR-compliant boot program shall supply #address-cells and #size-cells on all nodes that have children.
If missing, a client program should assume a default value of 2 for
An ePAPR-compliant boot program shall supply #address-cells and #size-cells on all nodes that have children. "
So need to use the parent's address-cells and size-cells property.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
50f3b323 |
| 28-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: dt: introduce dt_have_prop
Introudce dt_have_prop
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| #
23b1daf4 |
| 28-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: dt: typo fix
1. According to ePAPR spec, status should be okay/disabled/fail/fail-sss. To Linux device tree, "okay" and "ok" are both used. Function is_okay also use "okay" and "ok". But
core: dt: typo fix
1. According to ePAPR spec, status should be okay/disabled/fail/fail-sss. To Linux device tree, "okay" and "ok" are both used. Function is_okay also use "okay" and "ok". But "ok" is not defined in spec. Here only correct comments
2. size -> sz
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
bce4951c |
| 02-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add linker.h for link script symbols
Moves all core extern declarations of linker script symbols into <kernel/linker.h>.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off
core: add linker.h for link script symbols
Moves all core extern declarations of linker script symbols into <kernel/linker.h>.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
7ba16abb |
| 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
dt: Add dt_map_dev()
Maps a device into memory from its FDT node.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-
dt: Add dt_map_dev()
Maps a device into memory from its FDT node.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
9fe4c797 |
| 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
dt: Add FDT manipulation functions
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wikland
dt: Add FDT manipulation functions
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
a4f139d7 |
| 04-Mar-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: introduce struct dt_driver
When CFG_DT=y, a linker section is created (.rodata.dtdrv) to hold all the DT-compatible drivers. The table can later be queried at runtime. Some manipulation functi
core: introduce struct dt_driver
When CFG_DT=y, a linker section is created (.rodata.dtdrv) to hold all the DT-compatible drivers. The table can later be queried at runtime. Some manipulation functions are exported in <kernel/dt.h>.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|