mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] firmware-zynqmp: add accessors for ggs/pggs
@ 2023-09-13 13:24 Ahmad Fatoum
  2023-09-13 13:24 ` [PATCH 1/3] driver: add support for device aliases Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2023-09-13 13:24 UTC (permalink / raw)
  To: barebox

The ZynqMP features eight 32-bit global storage registers that are
available for general use. Four of them have their values preserved
after software reboots and four are cleared on software reboots.

In Linux they are accessed as:

  /sys/firmware/zynqmp/ggs[0-4]
  /sys/firmware/zynqmp/pggs[0-4]

Allow reading and writing these parameters from barebox board code
via exported functions and from barebox shell as well via device
parameters:

  echo ${firmware:zynqmp-firmware.of.ggs0}
  firmware:zynqmp-firmware.of.pggs0=4

Because the name is a bit unwieldy, use the device alias support added
in this series to make the variables more compact:

  echo ${zynqmp_fw.ggs0}
  zynqmp_fw.pggs0=4

Ahmad Fatoum (3):
  driver: add support for device aliases
  firmware-zynqmp: export functions for setting GGS/PGGS
  firmware-zynqmp: add device parameters for ggs/pggs

 arch/arm/mach-zynqmp/firmware-zynqmp.c | 133 +++++++++++++++++++++++++
 common/complete.c                      |  14 ++-
 drivers/base/driver.c                  |  46 +++++++++
 include/driver.h                       |   7 ++
 include/mach/zynqmp/firmware-zynqmp.h  |  33 +++++-
 5 files changed, 222 insertions(+), 11 deletions(-)

-- 
2.39.2




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

end of thread, other threads:[~2023-09-14  8:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-13 13:24 [PATCH 0/3] firmware-zynqmp: add accessors for ggs/pggs Ahmad Fatoum
2023-09-13 13:24 ` [PATCH 1/3] driver: add support for device aliases Ahmad Fatoum
2023-09-13 13:24 ` [PATCH 2/3] firmware-zynqmp: export functions for setting GGS/PGGS Ahmad Fatoum
2023-09-13 13:24 ` [PATCH 3/3] firmware-zynqmp: add device parameters for ggs/pggs Ahmad Fatoum
2023-09-14  7:59 ` [PATCH 0/3] firmware-zynqmp: add accessors " Sascha Hauer

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