Re: [RFC][PATCH 0/4] SRAM based reboot reason driver for HiKey

From: Vladimir Zapolskiy
Date: Fri Aug 05 2016 - 08:46:26 EST


Hi John,

On 08/04/2016 02:05 AM, John Stultz wrote:
Now that Andy's reboot reason core driver has landed, I wanted
to resubmit a reworked version of my SRAM based reboot reason
driver.

This allows the kernel to communicate to the bootloader what mode
it should reboot to using some reserved memory.

Feedback would be very much appreciated!

in my opinion the taken approach is wrong, and I've already explained
why and how to rework your driver to shrink the change, please see
https://lkml.org/lkml/2016/1/27/133

In this case I think that a SRAM device node should just contain
a plain description of partitions, compatible = "sram-reboot-mode" is
clearly not a device on "SRAM bus", it is not a device at all, so
please let's separate policy from mechanism

Because my proposed alternative approach separates policy from
mechanism, it for instanse allows to avoid overlappings on SRAM areas,
and still other drivers may serve as consumers of partitions on SRAM.

Please add me to Cc list when you send the next version of the driver.

With best wishes,
Vladimir

thanks
-john

Cc: Andy Yan <andy.yan@xxxxxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Thierry Reding <treding@xxxxxxxxxx>
Cc: Heiko StÃbner <heiko@xxxxxxxxx>
Cc: Caesar Wang <wxt@xxxxxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Guodong Xu <guodong.xu@xxxxxxxxxx>
Cc: Haojian Zhuang <haojian.zhuang@xxxxxxxxxx>
Cc: Vishal Bhoj <vishal.bhoj@xxxxxxxxxx>
Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: Android Kernel Team <kernel-team@xxxxxxxxxxx>

John Stultz (4):
drivers: sram: Have sram driver probe children nodes
dt-bindings: power: reset: Add document for sram-reboot-mode driver
power: reset: Add sram-reboot-mode driver
dts: hikey: Add hikey support for sram-reboot-mode

.../bindings/power/reset/sram-reboot-mode.txt | 35 ++++++++
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 22 ++++-
drivers/misc/sram.c | 3 +
drivers/power/reset/Kconfig | 10 +++
drivers/power/reset/Makefile | 1 +
drivers/power/reset/sram-reboot-mode.c | 95 ++++++++++++++++++++++
6 files changed, 165 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/power/reset/sram-reboot-mode.txt
create mode 100644 drivers/power/reset/sram-reboot-mode.c