diff options
author | Chris Kay <chris.kay@arm.com> | 2020-06-03 12:07:40 +0100 |
---|---|---|
committer | jimqui01 <54316584+jimqui01@users.noreply.github.com> | 2020-06-08 12:14:56 +0100 |
commit | 85d038227bb3553965703ee19d7328cf7e157e81 (patch) | |
tree | 8bdfdac8e608a601b741f1ed18b5ade1e1235a1a /product/sgm775 | |
parent | d52fb7bfea2e1445c44fe8b1960bce17bf319543 (diff) |
misc: Add `gtimer` timestamps to supporting platforms
Platforms that use the `gtimer` module can add logging timestamps
through it.
Change-Id: I61d1c7c3f44356636ecb6b044cc787ae861cb4b0
Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'product/sgm775')
-rw-r--r-- | product/sgm775/scp_ramfw/config_timer.c | 13 | ||||
-rw-r--r-- | product/sgm775/scp_romfw/config_timer.c | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/product/sgm775/scp_ramfw/config_timer.c b/product/sgm775/scp_ramfw/config_timer.c index dd7cf9ee..b042d845 100644 --- a/product/sgm775/scp_ramfw/config_timer.c +++ b/product/sgm775/scp_ramfw/config_timer.c @@ -17,6 +17,7 @@ #include <fwk_id.h> #include <fwk_module.h> #include <fwk_module_idx.h> +#include <fwk_time.h> #include <fmw_cmsis.h> @@ -39,15 +40,15 @@ static const struct fwk_element gtimer_dev_table[] = { [1] = { 0 }, }; -static const struct fwk_element *gtimer_get_dev_table(fwk_id_t module_id) -{ - return gtimer_dev_table; -} - struct fwk_module_config config_gtimer = { - .elements = FWK_MODULE_DYNAMIC_ELEMENTS(gtimer_get_dev_table), + .elements = FWK_MODULE_STATIC_ELEMENTS_PTR(gtimer_dev_table), }; +struct fwk_time_driver fmw_time_driver(const void **ctx) +{ + return mod_gtimer_driver(ctx, config_gtimer.elements.table[0].data); +} + /* * Timer HAL config */ diff --git a/product/sgm775/scp_romfw/config_timer.c b/product/sgm775/scp_romfw/config_timer.c index ba58ddd6..d5513856 100644 --- a/product/sgm775/scp_romfw/config_timer.c +++ b/product/sgm775/scp_romfw/config_timer.c @@ -16,6 +16,7 @@ #include <fwk_id.h> #include <fwk_module.h> #include <fwk_module_idx.h> +#include <fwk_time.h> /* * Generic timer driver config @@ -36,15 +37,15 @@ static const struct fwk_element gtimer_dev_table[] = { [1] = { 0 }, }; -static const struct fwk_element *gtimer_get_dev_table(fwk_id_t module_id) -{ - return gtimer_dev_table; -} - struct fwk_module_config config_gtimer = { - .elements = FWK_MODULE_DYNAMIC_ELEMENTS(gtimer_get_dev_table), + .elements = FWK_MODULE_STATIC_ELEMENTS_PTR(gtimer_dev_table), }; +struct fwk_time_driver fmw_time_driver(const void **ctx) +{ + return mod_gtimer_driver(ctx, config_gtimer.elements.table[0].data); +} + /* * Timer HAL config */ |