mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 0/3] firmware-zynqmp: add accessors for ggs/pggs
Date: Wed, 13 Sep 2023 15:24:53 +0200	[thread overview]
Message-ID: <20230913132456.2211919-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2023-09-13 13:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 13:24 Ahmad Fatoum [this message]
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

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=20230913132456.2211919-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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