[U-Boot] [PATCH 06/13][v4] drivers: fsl-mc: Return error for major version mismatch
Prabhakar Kushwaha
prabhakar at freescale.com
Thu Jul 2 07:59:01 CEST 2015
Management complex major version should match to the firmware present in flash.
Return error during mismatch of major version.
Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>
---
Changes for v2: Sending as it is for patchset
Changes for v3: Incorporated Joe Hershberger's comments
- Use ENODEV instead of "1"
Changes for v4: Incorporated Joe Hershberger's comments
- Use -ENODEV
drivers/net/fsl-mc/mc.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 2094595..b2babfb 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -518,9 +518,14 @@ int mc_init(void)
goto out;
}
- if (MC_VER_MAJOR != mc_ver_info.major)
+ if (MC_VER_MAJOR != mc_ver_info.major) {
printf("fsl-mc: ERROR: Firmware major version mismatch (found: %d, expected: %d)\n",
mc_ver_info.major, MC_VER_MAJOR);
+ printf("fsl-mc: Update the Management Complex firmware\n");
+
+ error = -ENODEV;
+ goto out;
+ }
if (MC_VER_MINOR != mc_ver_info.minor)
printf("fsl-mc: WARNING: Firmware minor version mismatch (found: %d, expected: %d)\n",
@@ -541,7 +546,7 @@ int mc_init(void)
out:
if (error != 0)
- mc_boot_status = -error;
+ mc_boot_status = error;
else
mc_boot_status = 0;
--
1.9.1
More information about the U-Boot
mailing list