public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 00/15] qcom: smem: modernize SMEM in U-Boot
@ 2024-11-24 19:17 Caleb Connolly
  2024-11-24 19:17 ` [PATCH 01/15] Revert "dm: SMEM (Shared memory) uclass" Caleb Connolly
                   ` (14 more replies)
  0 siblings, 15 replies; 35+ messages in thread
From: Caleb Connolly @ 2024-11-24 19:17 UTC (permalink / raw)
  To: Rayagonda Kokatanur, Tom Rini, Simon Glass, Caleb Connolly,
	Neil Armstrong, Sumit Garg, Mario Six
  Cc: u-boot, u-boot-qcom

Smem is currently implemented a uclass in U-Boot. This carries with it
some implicit limitations about how and when we can actually talk with
it, since its modelled as a device.

The SMEM uclass is qualcomm specific and has no other users, while it
was originally proposed as a platform agnostic abstraction it seems
clear that UCLASS_MISC has served that purpose better.

Let's drop the old smem code and replace it with a straight port from
Linux, providing a familiar interface and enabling us to access it much
earlier in the boot process that would be possible with a standard
device.

Additionally, this will be easier to maintain going forwards since any
patches from Linux can be more easily ported over.

With this new smem framework in place, we can now use SMEM to parse
the memory map when it's not provided via some other mechanism.
Additionally, we can use it to read the serial number of the board.

Implement this functionality and split the snapdragon memory parsing off
to its own file to try and organise things a bit better.

This depends on a patch [1] making malloc available in fdtdec_setup() since
malloc is required to initialise smem.

[1]: https://lore.kernel.org/u-boot/20241124183832.2476928-1-caleb.connolly@linaro.org

---
Caleb Connolly (15):
      Revert "dm: SMEM (Shared memory) uclass"
      smem: drop drivers/smem
      Revert "test: smem: add basic smem test"
      Revert "drivers: smem: sandbox"
      soc: qcom: import smem from Linux 6.11-rc2
      soc: qcom: smem: adjust headers for U-Boot
      soc: qcom: smem: adjust for U-Boot
      soc: qcom: smem: get serial number from socinfo
      soc: qcom: smem: stub functions
      soc: qcom: smem: add build infra
      mach-snapdragon: increase pre-relocation malloc size for smem
      mach-snapdragon: move memory parsing to its own file
      mach-snapdragon: support parsing memory map from SMEM
      mach-snapdragon: fetch serial# from SMEM
      qcom_defconfig: enable QCOM_SMEM

 arch/arm/Kconfig                             |   2 -
 arch/arm/mach-snapdragon/Kconfig             |   2 +-
 arch/arm/mach-snapdragon/Makefile            |   2 +-
 arch/arm/mach-snapdragon/board.c             | 107 +---
 arch/arm/mach-snapdragon/dram.c              | 214 ++++++++
 arch/arm/mach-snapdragon/qcom-priv.h         |   4 +
 arch/sandbox/dts/test.dts                    |   4 -
 configs/qcom_defconfig                       |   1 +
 configs/sandbox64_defconfig                  |   2 -
 configs/sandbox_defconfig                    |   2 -
 drivers/Kconfig                              |   2 -
 drivers/Makefile                             |   1 -
 drivers/smem/Kconfig                         |  24 -
 drivers/smem/Makefile                        |   7 -
 drivers/smem/sandbox_smem.c                  |  44 --
 drivers/smem/smem-uclass.c                   |  46 --
 drivers/soc/qcom/Kconfig                     |   8 +
 drivers/soc/qcom/Makefile                    |   1 +
 drivers/{smem/msm_smem.c => soc/qcom/smem.c} | 741 ++++++++++++++++-----------
 include/dm/uclass-id.h                       |   1 -
 include/smem.h                               |  90 ----
 include/soc/qcom/smem.h                      |  36 ++
 include/soc/qcom/socinfo.h                   | 111 ++++
 test/dm/Makefile                             |   1 -
 test/dm/smem.c                               |  26 -
 25 files changed, 842 insertions(+), 637 deletions(-)
---
base-commit: 7aad7833323aa9260935d172744a50f56356d52a

// Caleb (they/them)


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2025-01-08 16:58 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-24 19:17 [PATCH 00/15] qcom: smem: modernize SMEM in U-Boot Caleb Connolly
2024-11-24 19:17 ` [PATCH 01/15] Revert "dm: SMEM (Shared memory) uclass" Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2024-11-24 19:17 ` [PATCH 02/15] smem: drop drivers/smem Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2024-11-24 19:17 ` [PATCH 03/15] Revert "test: smem: add basic smem test" Caleb Connolly
2025-01-07 15:33   ` Simon Glass
2024-11-24 19:17 ` [PATCH 04/15] Revert "drivers: smem: sandbox" Caleb Connolly
2025-01-07 15:31   ` Simon Glass
2024-11-24 19:17 ` [PATCH 05/15] soc: qcom: import smem from Linux 6.11-rc2 Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2025-01-08 14:45     ` Caleb Connolly
2024-11-24 19:17 ` [PATCH 06/15] soc: qcom: smem: adjust headers for U-Boot Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2024-11-24 19:17 ` [PATCH 07/15] soc: qcom: smem: adjust " Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2024-11-24 19:17 ` [PATCH 08/15] soc: qcom: smem: get serial number from socinfo Caleb Connolly
2025-01-07 15:30   ` Simon Glass
2025-01-08  9:38   ` Stephan Gerhold
2024-11-24 19:17 ` [PATCH 09/15] soc: qcom: smem: stub functions Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2024-11-24 19:17 ` [PATCH 10/15] soc: qcom: smem: add build infra Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2024-11-24 19:17 ` [PATCH 11/15] mach-snapdragon: increase pre-relocation malloc size for smem Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2024-11-24 19:17 ` [PATCH 12/15] mach-snapdragon: move memory parsing to its own file Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2024-11-24 19:17 ` [PATCH 13/15] mach-snapdragon: support parsing memory map from SMEM Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2025-01-08  9:41   ` Stephan Gerhold
2024-11-24 19:17 ` [PATCH 14/15] mach-snapdragon: fetch serial# " Caleb Connolly
2025-01-07 15:32   ` Simon Glass
2025-01-08 15:03     ` Caleb Connolly
2024-11-24 19:17 ` [PATCH 15/15] qcom_defconfig: enable QCOM_SMEM Caleb Connolly
2025-01-08 16:57   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox