Message ID | 20190329141733.2127-1-kever.yang@rock-chips.com |
---|---|
State | Accepted |
Commit | f00c26284ec0aa3e9b01ebe4996aa8fc01526d03 |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot] lib: time: update module enable MACRO | expand |
> On 29.03.2019, at 15:17, Kever Yang <kever.yang@rock-chips.com> wrote: > > We'd better use correct way to check if module has enabled. > for we have 3 timer MACRO: > - CONFIG_TIMER > - CONFIG_SPL_TIMER > - CONFIG_TPL_TIMER > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
On Fri, Mar 29, 2019 at 10:17:33PM +0800, Kever Yang wrote: > We'd better use correct way to check if module has enabled. > for we have 3 timer MACRO: > - CONFIG_TIMER > - CONFIG_SPL_TIMER > - CONFIG_TPL_TIMER > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Applied to u-boot/master, thanks!
diff --git a/lib/time.c b/lib/time.c index 3bf678a232..9c55da6f1b 100644 --- a/lib/time.c +++ b/lib/time.c @@ -56,7 +56,7 @@ ulong timer_get_boot_us(void) extern unsigned long __weak timer_read_counter(void); #endif -#ifdef CONFIG_TIMER +#if CONFIG_IS_ENABLED(TIMER) ulong notrace get_tbclk(void) { if (!gd->timer) {
We'd better use correct way to check if module has enabled. for we have 3 timer MACRO: - CONFIG_TIMER - CONFIG_SPL_TIMER - CONFIG_TPL_TIMER Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)