RE: [PATCH] riscv: Add do_irqinfo() for CONFIG_CMD_IRQ

2020-08-24 Thread Pragnesh Patel
Hi Heinrich,

>-Original Message-
>From: Heinrich Schuchardt 
>Sent: 24 August 2020 19:01
>To: Pragnesh Patel ; u-boot@lists.denx.de;
>atish.pa...@wdc.com; bmeng...@gmail.com; anup.pa...@wdc.com; Sagar
>Kadam ; r...@andestech.com
>Cc: Paul Walmsley ( Sifive) ; Simon Glass
>; Sean Anderson ; Bin Meng
>
>Subject: Re: [PATCH] riscv: Add do_irqinfo() for CONFIG_CMD_IRQ
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>On 24.08.20 13:00, Pragnesh Patel wrote:
>> Right now, do_irqinfo() done nothing and return 0 for
>
>Nits:
>
>%s/done/does/
>
>> CONFIG_CMD_IRQ
>>
>> Signed-off-by: Pragnesh Patel 
>> ---
>>  arch/riscv/lib/interrupts.c | 7 +++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
>> index cd47e64487..d6273606b5 100644
>> --- a/arch/riscv/lib/interrupts.c
>> +++ b/arch/riscv/lib/interrupts.c
>> @@ -145,3 +145,10 @@ __attribute__((weak)) void
>> external_interrupt(struct pt_regs *regs)
>>  __attribute__((weak)) void timer_interrupt(struct pt_regs *regs)  {
>> }
>> +
>> +#if defined(CONFIG_CMD_IRQ)
>> +int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const
>> +argv[]) {
>> + return 0;
>> +}
>> +#endif
>
>Why do we allow CONFIG_CMD_IRQ for RISC-V if the command is not
>supported?
>
>How about:
>
>cmd/Kconfig:2224
>
> config CMD_IRQ
>bool "irq - Show information about interrupts"
>-   depends on !ARM && !MIPS && !SH
>+   depends on !ARM && !MIPS && !RISCV && !SH

Agreed, will send a new patch.

>
>Best regards
>
>Heinrich
>
>>



Re: [PATCH] riscv: Add do_irqinfo() for CONFIG_CMD_IRQ

2020-08-24 Thread Heinrich Schuchardt
On 24.08.20 13:00, Pragnesh Patel wrote:
> Right now, do_irqinfo() done nothing and return 0 for

Nits:

%s/done/does/

> CONFIG_CMD_IRQ
>
> Signed-off-by: Pragnesh Patel 
> ---
>  arch/riscv/lib/interrupts.c | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
> index cd47e64487..d6273606b5 100644
> --- a/arch/riscv/lib/interrupts.c
> +++ b/arch/riscv/lib/interrupts.c
> @@ -145,3 +145,10 @@ __attribute__((weak)) void external_interrupt(struct 
> pt_regs *regs)
>  __attribute__((weak)) void timer_interrupt(struct pt_regs *regs)
>  {
>  }
> +
> +#if defined(CONFIG_CMD_IRQ)
> +int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
> +{
> + return 0;
> +}
> +#endif

Why do we allow CONFIG_CMD_IRQ for RISC-V if the command is not supported?

How about:

cmd/Kconfig:2224

 config CMD_IRQ
    bool "irq - Show information about interrupts"
-   depends on !ARM && !MIPS && !SH
+   depends on !ARM && !MIPS && !RISCV && !SH

Best regards

Heinrich

>



[PATCH] riscv: Add do_irqinfo() for CONFIG_CMD_IRQ

2020-08-24 Thread Pragnesh Patel
Right now, do_irqinfo() done nothing and return 0 for
CONFIG_CMD_IRQ

Signed-off-by: Pragnesh Patel 
---
 arch/riscv/lib/interrupts.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index cd47e64487..d6273606b5 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -145,3 +145,10 @@ __attribute__((weak)) void external_interrupt(struct 
pt_regs *regs)
 __attribute__((weak)) void timer_interrupt(struct pt_regs *regs)
 {
 }
+
+#if defined(CONFIG_CMD_IRQ)
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+{
+   return 0;
+}
+#endif
-- 
2.17.1