Re: [PATCH] RISC-V: Enable SYSCON reboot and poweroff drivers

From: Anup Patel
Date: Mon Nov 11 2019 - 23:19:54 EST


On Mon, Nov 11, 2019 at 10:36 PM Paul Walmsley <paul@xxxxxxxxx> wrote:
>
> On Mon, 11 Nov 2019, Anup Patel wrote:
>
> > We can use SYSCON reboot and poweroff drivers for the
> > SiFive test device found on QEMU virt machine and SiFive
> > SOCs.
> >
> > This patch enables SYSCON reboot and poweroff drivers
> > in RV64 and RV32 defconfigs.
> >
> > Signed-off-by: Anup Patel <anup.patel@xxxxxxx>
>
> I'd much prefer Christoph's driver, once it's fixed up per my earlier
> comments. This business with writing random registers based on what's in
> the DT data has always been a bad idea.

Like mentioned in other email thread, we are not writing random
date to registers. In fact, we are describing Reboot and Poweroff
mechanism in DT using SYSCON Reboot and Poweroff DT nodes.

This is not a new approach. It has been used by a variety of SOCs
in past.

Regards,
Anup