public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 5/5] maix: enable SBI system reset for MAIX
Date: Thu, 4 Mar 2021 18:24:35 -0500	[thread overview]
Message-ID: <783cbbe4-07e9-fbb0-ef5b-64e8ff01814d@gmail.com> (raw)
In-Reply-To: <20210304170051.58993-6-xypron.glpk@gmx.de>

On 3/4/21 12:00 PM, Heinrich Schuchardt wrote:
> When running in S-mode we can use the SBI system reset extension to provide
> the system reset.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>   board/sipeed/maix/maix.c            | 5 +++++
>   configs/sipeed_maix_smode_defconfig | 2 ++
>   2 files changed, 7 insertions(+)
> 
> diff --git a/board/sipeed/maix/maix.c b/board/sipeed/maix/maix.c
> index cbcb23cf5c..388eddee6e 100644
> --- a/board/sipeed/maix/maix.c
> +++ b/board/sipeed/maix/maix.c
> @@ -6,6 +6,7 @@
>   #include <common.h>
>   #include <clk.h>
>   #include <dm.h>
> +#include <dm/lists.h>
>   #include <fdt_support.h>
>   #include <asm/io.h>
> 
> @@ -37,5 +38,9 @@ int board_init(void)
>   			return ret;
>   	}
> 
> +	if (IS_ENABLED(CONFIG_SYSRESET_SBI))
> +		ret = device_bind_driver(gd->dm_root, "sbi-sysreset",
> +					 "sbi-sysreset", NULL);
> +

Besides that this isn't a device-tree driver, shouldn't this live in
arch_early_init_r or similar? This isn't really board-specific.

--Sean

>   	return 0;
>   }
> diff --git a/configs/sipeed_maix_smode_defconfig b/configs/sipeed_maix_smode_defconfig
> index 2516bb7258..aa95893feb 100644
> --- a/configs/sipeed_maix_smode_defconfig
> +++ b/configs/sipeed_maix_smode_defconfig
> @@ -7,4 +7,6 @@ CONFIG_STACK_SIZE=0x100000
>   # CONFIG_NET is not set
>   # CONFIG_INPUT is not set
>   # CONFIG_DM_ETH is not set
> +CONFIG_SYSRESET_SBI=y
> +# CONFIG_SYSRESET_SYSCON is not set
>   # CONFIG_EFI_UNICODE_CAPITALIZATION is not set
> --
> 2.30.1
> 

  reply	other threads:[~2021-03-04 23:24 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
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 [this message]
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=783cbbe4-07e9-fbb0-ef5b-64e8ff01814d@gmail.com \
    --to=seanga2@gmail.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