From: Sean Anderson Date: Thu, 4 Mar 2021 18:24:35 -0500 Subject: [PATCH 5/5] maix: enable SBI system reset for MAIX In-Reply-To: <20210304170051.58993-6-xypron.glpk@gmx.de> References: <20210304170051.58993-1-xypron.glpk@gmx.de> <20210304170051.58993-6-xypron.glpk@gmx.de> Message-ID: <783cbbe4-07e9-fbb0-ef5b-64e8ff01814d@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.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 > --- > 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 > #include > #include > +#include > #include > #include > > @@ -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 >