mbox series

[RFC,0/5] Implement exiting 4-byte adressing mode before reset

Message ID 20240507100431.206670-1-robert.marko@sartura.hr
Headers show
Series Implement exiting 4-byte adressing mode before reset | expand

Message

Robert Marko May 7, 2024, 10:03 a.m. UTC
This fixes the issue with 4-byte adressing mode being left enabled on
board reset.
That is an issue on Qualcomm IPQ4019 boards since the CPU expects flash
to be in 3-byte adressing mode and will just hang otherwise.

Note that this does not fix a case where you remove the power while U-Boot
is still running and in that case it will still be stuck in 4-byte mode.

Robert Marko (5):
  dm: core: add on_reset method
  dm: core: introduce uclass_id_on_reset()
  mtd: spi-nor: rename and export 4-byte adressing mode function
  mtd: spi: sf: implement .on_reset method
  sysreset: call .on_reset for UCLASS_SPI_FLASH before reset request

 drivers/core/uclass.c              | 13 +++++++++++++
 drivers/mtd/spi/sf_probe.c         | 10 ++++++++++
 drivers/mtd/spi/spi-nor-core.c     |  7 +++----
 drivers/sysreset/sysreset-uclass.c |  7 +++++++
 include/dm/device.h                |  2 ++
 include/dm/uclass.h                |  8 ++++++++
 include/linux/mtd/spi-nor.h        | 10 ++++++++++
 7 files changed, 53 insertions(+), 4 deletions(-)