| #
5ca2c365 |
| 10-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
6c4cb223 |
| 21-Jul-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: avoid the assert failure when there's "assigned-clocks"
Once "assigned-clocks" is parsed correctly variable "clk" will retain the non-NULL value and skip "return", when "res" is non-ze
drivers: clk: avoid the assert failure when there's "assigned-clocks"
Once "assigned-clocks" is parsed correctly variable "clk" will retain the non-NULL value and skip "return", when "res" is non-zero for new "clock_idx" assert(false) will happen.
Signed-off-by: Tony Han <tony.han@microchip.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
e6027f48 |
| 05-Jul-2023 |
Alvin Chang <alvinga@andestech.com> |
core: arm: Move some DT functions to common kernel
Some existed functions for device tree in ARM could be also used for other architectures. This commit moves most of functions from ARM architecture
core: arm: Move some DT functions to common kernel
Some existed functions for device tree in ARM could be also used for other architectures. This commit moves most of functions from ARM architecture into "core/kernel/dt.c", including external DT descriptor, DT overlay, external DT initialization, API for adding DT child nodes and reserved-memory nodes. Since "core/kernel/dt.c" is dependent with CFG_DT, other functions which are independent with CFG_DT are put into new file "core/kernel/boot.c".
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
b357d34f |
| 06-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: swap TEE_result and retrieved device reference
Changes dt_driver callback function to return a TEE_Result value and pass retrieved device reference by a output argument rather than
core: dt_driver: swap TEE_result and retrieved device reference
Changes dt_driver callback function to return a TEE_Result value and pass retrieved device reference by a output argument rather than the opposite.
This change updates dt_driver.c, dt_driver.h and all drivers implementing related dt_driver callback function.
As a consequence, this change removes all type definition related to device specific callback handler function types which are useless as all these now comply with type dt_driver_probe_func defined in dt_driver.h.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f354a5d8 |
| 05-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Cheval
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
25a36f4c |
| 08-Feb-2022 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
drivers: clk_dt: Switch to use get_secure_dt()
This adds support for both embedded and external secure device trees so that clock driver and system configuration information can be fetched from ther
drivers: clk_dt: Switch to use get_secure_dt()
This adds support for both embedded and external secure device trees so that clock driver and system configuration information can be fetched from there.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
627f246d |
| 30-Mar-2022 |
Clément Léger <clement.leger@bootlin.com> |
drivers: clk: Fix check for assigned-clock-rates index
Index should actually be strictly less than rate_len. Fix this which might happen with the following description:
assigned-clock = <foo>, <bar
drivers: clk: Fix check for assigned-clock-rates index
Index should actually be strictly less than rate_len. Fix this which might happen with the following description:
assigned-clock = <foo>, <bar>; assigned-clock-parents = <foo_parent>, <bar_parent>; assigned-clock-rates = <1000>;
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| #
17fd9102 |
| 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: add CFG_DRIVERS_CLK_EARLY_PROBE
Adds configuration switch to allow clocks to be probed as any driver, possibly deferring initialization. This is needed when a clock driver has dependen
drivers: clk: add CFG_DRIVERS_CLK_EARLY_PROBE
Adds configuration switch to allow clocks to be probed as any driver, possibly deferring initialization. This is needed when a clock driver has dependencies on another resource.
The configuration is default enabled (CFG_DRIVERS_CLK_EARLY_PROBE=y) that is probing clock drivers before other drivers using the early_init initcall level as done prior this change.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
aaf9cefe |
| 14-Dec-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: use while (true)
Changes clk_dt.c to use while (true) instead of while (1) for consistency in optee_os implementation.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-
drivers: clk: use while (true)
Changes clk_dt.c to use while (true) instead of while (1) for consistency in optee_os implementation.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
056e7438 |
| 14-Dec-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: change clk_dt_get_by_*() prototype
Changes clk_dt_get_by_idx() and clk_dt_get_by_name() to return a the TEE_Result code and use an output argument to pass back clock reference rather t
drivers: clk: change clk_dt_get_by_*() prototype
Changes clk_dt_get_by_idx() and clk_dt_get_by_name() to return a the TEE_Result code and use an output argument to pass back clock reference rather than the opposite. This change makes clk_dt_get_by_*() function more consistent with the other OP-TEE core API functions.
Also renames clk_dt_get_by_idx() to clk_dt_get_by_index().
Updates sama5d2_clk.c and atmel_trng.c accordingly.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7ca695bf |
| 16-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: add verbosity on provider probe error case
Prints the names of the parent node and node for which core failed to probe a clock instance. Also prints the returned error code. These adde
drivers: clk: add verbosity on provider probe error case
Prints the names of the parent node and node for which core failed to probe a clock instance. Also prints the returned error code. These added debug information help understanding where and FDT parsing failed.
Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8dca59b4 |
| 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driv
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driver provider references when a single DT node relates to several driver providers that are of different type by DT binding definition. For example, a DT node may describe a device that acts both as a clock provider and a reset controller, for which two driver references are needed in the driver provider list.
Updates dt_driver_device_from_node_idx_prop() accordingly.
Fixes: f498c4042931 ("core: dt_driver: factorize clk_get_provider_by_*()") Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
d8b14b46 |
| 27-Oct-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: get return code when querying a device
Change dt_driver_device_from_provider_prop() function and friends to output return a TEE_Result code if failing to find target device instance
core: dt_driver: get return code when querying a device
Change dt_driver_device_from_provider_prop() function and friends to output return a TEE_Result code if failing to find target device instance. Return code TEE_ERROR_DEFER_DRIVER_INIT reports that requested device is not yet registered and initialized in the dt_driver provider list.
This change will be used to probed device drivers and allow probe deferral when a device depends on another device driver that is not yet initialized.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
ef20efc4 |
| 05-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize clk_dt_node_clock_probe_driver()
Move/rename clk_dt_get_from_provider() to dt_driver_probe_device_by_node() and local helper clk_get_compatible_driver() to probe_device_by
core: dt_driver: factorize clk_dt_node_clock_probe_driver()
Move/rename clk_dt_get_from_provider() to dt_driver_probe_device_by_node() and local helper clk_get_compatible_driver() to probe_device_by_compat().
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
01254f1d |
| 05-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: move probe callback to dt_driver
Move ::probe field from struct dt_driver_setup to struct dt_driver and remove struct dt_driver_setup.
Acked-by: Jerome Forissier <jerome@forissier.
core: dt_driver: move probe callback to dt_driver
Move ::probe field from struct dt_driver_setup to struct dt_driver and remove struct dt_driver_setup.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a22e85b2 |
| 05-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize clk_dt_get_from_provider()
Implement dt_driver_device_from_node_idx_prop() for clk_dt_get_by_idx_prop() to get target reference instance.
Move/rename clk_dt_get_from_prov
core: dt_driver: factorize clk_dt_get_from_provider()
Implement dt_driver_device_from_node_idx_prop() for clk_dt_get_by_idx_prop() to get target reference instance.
Move/rename clk_dt_get_from_provider() to dt_driver_device_from_provider_prop()
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
f498c404 |
| 05-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize clk_get_provider_by_*()
Move rename clk_get_provider_by_{node|phandle}() to dt_driver_get_provider_by_*().
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clé
core: dt_driver: factorize clk_get_provider_by_*()
Move rename clk_get_provider_by_{node|phandle}() to dt_driver_get_provider_by_*().
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
3fd340e5 |
| 04-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize DT cells helper functions
Move/rename fdt_clock_cells() to fdt_get_dt_driver_cells(). and clk_dt_register_clk_provider() to dt_driver_register_provider().
Add helper func
core: dt_driver: factorize DT cells helper functions
Move/rename fdt_clock_cells() to fdt_get_dt_driver_cells(). and clk_dt_register_clk_provider() to dt_driver_register_provider().
Add helper function dt_driver_provider_cells() to get ::provider_cells from a registered provider reference.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8c0c44c9 |
| 10-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize DT phandle util resources
Move struct clk_dt_phandle_args and struct clk_dt_provider from clk_dt.h to dt_driver.h and rename them to struct dt_driver_phandle_args and stru
core: dt_driver: factorize DT phandle util resources
Move struct clk_dt_phandle_args and struct clk_dt_provider from clk_dt.h to dt_driver.h and rename them to struct dt_driver_phandle_args and struct dt_driver_provider.
Introduce type get_of_device_func for callback functions used to retrieve a device instance reference from a DT phandle possible with arguments.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
ced0ec63 |
| 15-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: rename setup callback to probe
Rename clock core and fixed_clk setup functions to probe functions and update in-line description as per handler description in the framework.
Acked-by:
drivers: clk: rename setup callback to probe
Rename clock core and fixed_clk setup functions to probe functions and update in-line description as per handler description in the framework.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
6e4e7a23 |
| 27-Oct-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: rename clk_dt_get_fn to clk_dt_get_func
Rename type clk_dt_get_fn to clk_dt_get_func for consistency in OP-TEE OS implementation where all other function prototype type definitions use
drivers: clk: rename clk_dt_get_fn to clk_dt_get_func
Rename type clk_dt_get_fn to clk_dt_get_func for consistency in OP-TEE OS implementation where all other function prototype type definitions use _func as suffix.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7e6a39fe |
| 03-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: add platform data per compatible identifier
Add a platform data reference field in struct dt_device_match so that a driver knows data related to the compatible it is probed for.
Signe
drivers: clk: add platform data per compatible identifier
Add a platform data reference field in struct dt_device_match so that a driver knows data related to the compatible it is probed for.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
dbe94a85 |
| 25-Jun-2021 |
Clément Léger <clement.leger@bootlin.com> |
drivers: clk: add devicetree support
When using a devicetree, it is often useful to have clocks parsing. This support adds clocks properties parsing and allow having clock providers and users. Clock
drivers: clk: add devicetree support
When using a devicetree, it is often useful to have clocks parsing. This support adds clocks properties parsing and allow having clock providers and users. Clocks drivers can also be declared with CLK_DT_DECLARE. They will be probed automatically by the clock core. On the user side, function clk_dt_get_by_name and clk_dt_get_by_idx allows to retrieve a clock from the device tree description and match it with the provider clocks. The core ensure the clocks are probed hierarchically. This support is enabled using CFG_DRIVERS_CLK_DT.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|