diff mbox series

riscv: Make RISCV_TIMER depends on RISCV_SBI

Message ID 20201028131230.72907-1-wangkefeng.wang@huawei.com (mailing list archive)
State New, archived
Headers show
Series riscv: Make RISCV_TIMER depends on RISCV_SBI | expand

Commit Message

Kefeng Wang Oct. 28, 2020, 1:12 p.m. UTC
The riscv timer is set via SBI timer call, let's make RISCV_TIMER
depends on RISCV_SBI, and it also fixes some build issue.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Palmer Dabbelt Nov. 6, 2020, 7:14 a.m. UTC | #1
On Wed, 28 Oct 2020 06:12:30 PDT (-0700), wangkefeng.wang@huawei.com wrote:
> The riscv timer is set via SBI timer call, let's make RISCV_TIMER
> depends on RISCV_SBI, and it also fixes some build issue.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/clocksource/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 68b087bff59c..2be849bb794a 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -654,7 +654,7 @@ config ATCPIT100_TIMER
>
>  config RISCV_TIMER
>  	bool "Timer for the RISC-V platform" if COMPILE_TEST
> -	depends on GENERIC_SCHED_CLOCK && RISCV
> +	depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
>  	select TIMER_PROBE
>  	select TIMER_OF
>  	help

This should probably be

Fixes: 2bc3fc877aa9 ("RISC-V: Remove CLINT related code from timer and arch")

not really a bug in that commit, but since then the memory-mapped and SBI
timers have been split and therefor there's no way this driver can do anything
without SBI support.

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thanks!
Kefeng Wang Nov. 27, 2020, 2:53 a.m. UTC | #2
Hi Daniel, ping...

On 2020/11/6 15:14, Palmer Dabbelt wrote:
> On Wed, 28 Oct 2020 06:12:30 PDT (-0700), wangkefeng.wang@huawei.com 
> wrote:
>> The riscv timer is set via SBI timer call, let's make RISCV_TIMER
>> depends on RISCV_SBI, and it also fixes some build issue.
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>>  drivers/clocksource/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
>> index 68b087bff59c..2be849bb794a 100644
>> --- a/drivers/clocksource/Kconfig
>> +++ b/drivers/clocksource/Kconfig
>> @@ -654,7 +654,7 @@ config ATCPIT100_TIMER
>>
>>  config RISCV_TIMER
>>      bool "Timer for the RISC-V platform" if COMPILE_TEST
>> -    depends on GENERIC_SCHED_CLOCK && RISCV
>> +    depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
>>      select TIMER_PROBE
>>      select TIMER_OF
>>      help
>
> This should probably be
>
> Fixes: 2bc3fc877aa9 ("RISC-V: Remove CLINT related code from timer and 
> arch")
>
> not really a bug in that commit, but since then the memory-mapped and SBI
> timers have been split and therefor there's no way this driver can do 
> anything
> without SBI support.
>
> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
>
> Thanks!
>
diff mbox series

Patch

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 68b087bff59c..2be849bb794a 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -654,7 +654,7 @@  config ATCPIT100_TIMER
 
 config RISCV_TIMER
 	bool "Timer for the RISC-V platform" if COMPILE_TEST
-	depends on GENERIC_SCHED_CLOCK && RISCV
+	depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
 	select TIMER_PROBE
 	select TIMER_OF
 	help