On 4/19/23 11:04, Stefan Herbrechtsmeier wrote:
From: Stefan Herbrechtsmeier <stefan.herbrechtsme...@weidmueller.com>

Mask the expected and show the unexpected warning "No permission to
change config object" for PMUFW_CFG_OBJ_SUPPORT_NODE because this node
is used to detect if further zynqmp_pmufw_node function calls should be
skipped.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsme...@weidmueller.com>

---

Changes in v2:
- Use macro for node id

  drivers/firmware/firmware-zynqmp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/firmware-zynqmp.c 
b/drivers/firmware/firmware-zynqmp.c
index baf5b0c253..e763c639f7 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -254,7 +254,7 @@ int zynqmp_pmufw_load_config_object(const void *cfg_obj, 
size_t size)
         if (err == XST_PM_NO_ACCESS) {
                 u32 id = ((u32 *)cfg_obj)[NODE_ID_LOCATION];

-               if (id == PMUFW_CFG_OBJ_SUPPORT_NODE) {
+               if (id != PMUFW_CFG_OBJ_SUPPORT_NODE) {
                         printf("PMUFW:  No permission to change config 
object\n");
                         return err;
                 }

When only this patch is applied you return -EACCES but for setting up skip_config=true you need to return XST_PM_NO_ACCESS.

It means you are changing system behavior not just message that's why I still think it should be together with 3/3.

Anyway take a look at my snipset how I think it could be done in cleaner way.

Thanks,
Michal

Reply via email to