]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(rss): do not consider MHU_ERR_ALREADY_INIT as error
authorDavid Vincze <david.vincze@arm.com>
Thu, 1 Dec 2022 14:10:34 +0000 (15:10 +0100)
committerDavid Vincze <david.vincze@arm.com>
Tue, 6 Dec 2022 11:05:02 +0000 (12:05 +0100)
rss_comms_init() should return with success (0) in case of an internal
MHU_ERR_ALREADY_INIT error code which is harmless (occurs when
rss_comms_init() is called multiple times in a row).

Change-Id: Ibb1fef48a60866e80d3a389128cb8eef1332ea01
Signed-off-by: David Vincze <david.vincze@arm.com>
drivers/arm/rss/rss_comms.c

index 5e224e1e56b8e6b5af5811820ff92d2849c9eef3..4622af9803ecb2852899c14057f16e6ba1e26062 100644 (file)
@@ -156,14 +156,22 @@ int rss_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base)
 
        err = mhu_init_sender(mhu_sender_base);
        if (err != MHU_ERR_NONE) {
-               ERROR("[RSS-COMMS] Host to RSS MHU driver initialization failed: %d\n", err);
-               return -1;
+               if (err == MHU_ERR_ALREADY_INIT) {
+                       INFO("[RSS-COMMS] Host to RSS MHU driver already initialized\n");
+               } else {
+                       ERROR("[RSS-COMMS] Host to RSS MHU driver initialization failed: %d\n", err);
+                       return -1;
+               }
        }
 
        err = mhu_init_receiver(mhu_receiver_base);
        if (err != MHU_ERR_NONE) {
-               ERROR("[RSS-COMMS] RSS to Host MHU driver initialization failed: %d\n", err);
-               return -1;
+               if (err == MHU_ERR_ALREADY_INIT) {
+                       INFO("[RSS-COMMS] RSS to Host MHU driver already initialized\n");
+               } else {
+                       ERROR("[RSS-COMMS] RSS to Host MHU driver initialization failed: %d\n", err);
+                       return -1;
+               }
        }
 
        return 0;