From: Aurelien Jarno <aurelien@aurel32.net>
To: Anand Moon <linux.amoon@gmail.com>
Cc: "Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"Andi Shyti" <andi.shyti@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"Yixun Lan" <dlan@kernel.org>,
"Radim Krčmář" <rkrcmar@ventanamicro.com>,
"open list:RISC-V ARCHITECTURE" <linux-riscv@lists.infradead.org>,
"open list" <linux-kernel@vger.kernel.org>,
"open list:I2C SUBSYSTEM HOST DRIVERS"
<linux-i2c@vger.kernel.org>,
"open list:SYSTEM RESET/SHUTDOWN DRIVERS"
<linux-pm@vger.kernel.org>,
"open list:RISC-V SPACEMIT SoC Support"
<spacemit@lists.linux.dev>
Subject: Re: [PATCH v2 3/3] power: reset: Remove SpacemiT P1 reboot driver
Date: Mon, 23 Nov 2026 23:23:30 +0100 [thread overview]
Message-ID: <awS84s2FVdzy3j4Y@aurel32.net> (raw)
In-Reply-To: <20261118104935.1716-3-linux.amoon@gmail.com>
Hi Anand,
On 2026-11-18 16:19, Anand Moon wrote:
> The SpacemiT P1 reboot driver uses I2C-backed regmap operations to
> request system shutdown and restart through the PMIC.
>
> The system-off handlers run in atomic context, where regmap operations
> may sleep. This can trigger invalid wait context and
> scheduling-while-atomic warnings during shutdown or restart.
>
> On SpacemiT K1 platforms, system poweroff and restart are handled by
> OpenSBI through the SBI System Reset (SRST) extension. The Linux PMIC
> reboot driver duplicates this firmware functionality and is no longer
> needed.
>
> Remove the driver along with its Kconfig and Makefile entries.
> The P1 MFD driver and its other functionality remain unaffected.
>
> Cc: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> New patch
> ---
> drivers/power/reset/Kconfig | 9 ---
> drivers/power/reset/Makefile | 1 -
> drivers/power/reset/spacemit-p1-reboot.c | 87 ------------------------
> 3 files changed, 97 deletions(-)
> delete mode 100644 drivers/power/reset/spacemit-p1-reboot.c
The patch is correct, but you might also want to remove the
spacemit-p1-reboot entry from drivers/mfd/simple-mfd-i2c.c.
Anyway, while I support removing this driver on the long term, it might
be a bit early to remove it. Indeed, while the driver is available in
OpenSBI 1.9, using this version requires either patch the vendor U-Boot
or using the upstream U-Boot which still has some limitations (thanks
for your efforts improving it).
At the end with your patch 2, keeping this driver a bit longer doesn't
hurt, as it is only used as a fallback if the SBI SRST extension is not
available.
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2026-11-23 22:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 10:49 [PATCH v2 1/3] i2c: spacemit: Avoid sleeping during bus reset in atomic context Anand Moon
2026-11-18 10:49 ` [PATCH v2 2/3] riscv: sbi: Register SRST handlers with firmware priority Anand Moon
2026-11-23 22:21 ` Aurelien Jarno
2026-11-18 10:49 ` [PATCH v2 3/3] power: reset: Remove SpacemiT P1 reboot driver Anand Moon
2026-11-23 22:23 ` Aurelien Jarno [this message]
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=awS84s2FVdzy3j4Y@aurel32.net \
--to=aurelien@aurel32.net \
--cc=alex@ghiti.fr \
--cc=andi.shyti@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=dlan@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux.amoon@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=rkrcmar@ventanamicro.com \
--cc=spacemit@lists.linux.dev \
--cc=sre@kernel.org \
--cc=troy.mitchell@linux.spacemit.com \
/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