From: Leo Liang <ycliang@andestech.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/5] cmd/sbi: use constants instead of numerical values
Date: Mon, 8 Mar 2021 14:25:39 +0800 [thread overview]
Message-ID: <20210308062511.GA15469@andestech.com> (raw)
In-Reply-To: <20210304170051.58993-3-xypron.glpk@gmx.de>
On Thu, Mar 04, 2021 at 05:00:48PM +0000, Heinrich Schuchardt wrote:
> Use constants for extension IDs.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> cmd/riscv/sbi.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
> index 90c0811e14..65a2c93290 100644
> --- a/cmd/riscv/sbi.c
> +++ b/cmd/riscv/sbi.c
> @@ -29,21 +29,21 @@ static struct sbi_imp implementations[] = {
> };
>
> static struct sbi_ext extensions[] = {
> - { 0x00000000, "sbi_set_timer" },
> - { 0x00000001, "sbi_console_putchar" },
> - { 0x00000002, "sbi_console_getchar" },
> - { 0x00000003, "sbi_clear_ipi" },
> - { 0x00000004, "sbi_send_ipi" },
> - { 0x00000005, "sbi_remote_fence_i" },
> - { 0x00000006, "sbi_remote_sfence_vma" },
> - { 0x00000007, "sbi_remote_sfence_vma_asid" },
> - { 0x00000008, "sbi_shutdown" },
> - { 0x00000010, "SBI Base Functionality" },
> - { 0x54494D45, "Timer Extension" },
> - { 0x00735049, "IPI Extension" },
> - { 0x52464E43, "RFENCE Extension" },
> - { 0x0048534D, "Hart State Management Extension" },
> - { 0x53525354, "System Reset Extension" },
> + { SBI_EXT_0_1_SET_TIMER, "sbi_set_timer" },
> + { SBI_EXT_0_1_CONSOLE_PUTCHAR, "sbi_console_putchar" },
> + { SBI_EXT_0_1_CONSOLE_GETCHAR, "sbi_console_getchar" },
> + { SBI_EXT_0_1_CLEAR_IPI, "sbi_clear_ipi" },
> + { SBI_EXT_0_1_SEND_IPI, "sbi_send_ipi" },
> + { SBI_EXT_0_1_REMOTE_FENCE_I, "sbi_remote_fence_i" },
> + { SBI_EXT_0_1_REMOTE_SFENCE_VMA, "sbi_remote_sfence_vma" },
> + { SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, "sbi_remote_sfence_vma_asid" },
> + { SBI_EXT_0_1_SHUTDOWN, "sbi_shutdown" },
> + { SBI_EXT_BASE, "SBI Base Functionality" },
> + { SBI_EXT_TIME, "Timer Extension" },
> + { SBI_EXT_IPI, "IPI Extension" },
> + { SBI_EXT_RFENCE, "RFENCE Extension" },
> + { SBI_EXT_HSM, "Hart State Management Extension" },
> + { SBI_EXT_SRST, "System Reset Extension" },
> };
>
> static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
> --
> 2.30.1
>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
next prev parent reply other threads:[~2021-03-08 6:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 17:00 [PATCH 0/5] riscv: enable SBI system reset Heinrich Schuchardt
2021-03-04 17:00 ` [PATCH 1/5] risv: add missing SBI extension definitions Heinrich Schuchardt
2021-03-04 23:28 ` Sean Anderson
2021-03-06 5:33 ` Heinrich Schuchardt
2021-03-06 5:59 ` Bin Meng
2021-03-06 21:48 ` Sean Anderson
2021-03-04 17:00 ` [PATCH 2/5] cmd/sbi: use constants instead of numerical values Heinrich Schuchardt
2021-03-04 23:31 ` Sean Anderson
2021-03-08 6:25 ` Leo Liang [this message]
2021-03-04 17:00 ` [PATCH 3/5] sysreset: provide SBI based sysreset driver Heinrich Schuchardt
2021-03-04 23:50 ` Sean Anderson
2021-03-06 7:18 ` Heinrich Schuchardt
2021-03-06 16:40 ` Sean Anderson
2021-03-04 17:00 ` [PATCH 4/5] pinctrl: K210_PINCTRL depends on REGMAP and on SYSCON Heinrich Schuchardt
2021-03-04 23:15 ` Sean Anderson
2021-03-08 6:29 ` Leo Liang
2021-03-04 17:00 ` [PATCH 5/5] maix: enable SBI system reset for MAIX Heinrich Schuchardt
2021-03-04 23:24 ` Sean Anderson
2021-03-06 7:31 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210308062511.GA15469@andestech.com \
--to=ycliang@andestech.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox