diff options
author | Chris Packham <judge.packham@gmail.com> | 2016-08-22 20:52:49 +1200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2016-08-26 08:33:44 +0200 |
commit | 014a357bbae82fd243fa11aca6df0bf438445cf0 (patch) | |
tree | 763a8877b0f84b738568f982a660d4c437c3361e /arch | |
parent | 148f00e7a7f6bf28cf38c61a25056e1f2c465166 (diff) | |
download | u-boot-014a357bbae82fd243fa11aca6df0bf438445cf0.zip u-boot-014a357bbae82fd243fa11aca6df0bf438445cf0.tar.gz u-boot-014a357bbae82fd243fa11aca6df0bf438445cf0.tar.bz2 |
arm: mvebu: a38x: update serdes error handling
Ensure appropriate error messages are generated. Previously all errors
indicated that the serdes was already in use. Now appropriate error
messages are given.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c index 7d67199..820219e 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c +++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c @@ -835,25 +835,26 @@ u32 hws_serdes_topology_verify(enum serdes_type serdes_type, u32 serdes_id, } } else { test_result = SERDES_ALREADY_IN_USE; - if (test_result == SERDES_ALREADY_IN_USE) { - printf("%s: Error: serdes lane %d is configured to type %s: type already in use\n", - __func__, serdes_id, - serdes_type_to_string[serdes_type]); - return MV_FAIL; - } else if (test_result == WRONG_NUMBER_OF_UNITS) { - printf("%s: Warning: serdes lane %d is set to type %s.\n", - __func__, serdes_id, - serdes_type_to_string[serdes_type]); - printf("%s: Maximum supported lanes are already set to this type (limit = %d)\n", - __func__, serd_max_num); - return MV_FAIL; - } else if (test_result == UNIT_NUMBER_VIOLATION) { - printf("%s: Warning: serdes lane %d type is %s: current device support only %d units of this type.\n", - __func__, serdes_id, - serdes_type_to_string[serdes_type], - serd_max_num); - return MV_FAIL; - } + } + + if (test_result == SERDES_ALREADY_IN_USE) { + printf("%s: Error: serdes lane %d is configured to type %s: type already in use\n", + __func__, serdes_id, + serdes_type_to_string[serdes_type]); + return MV_FAIL; + } else if (test_result == WRONG_NUMBER_OF_UNITS) { + printf("%s: Warning: serdes lane %d is set to type %s.\n", + __func__, serdes_id, + serdes_type_to_string[serdes_type]); + printf("%s: Maximum supported lanes are already set to this type (limit = %d)\n", + __func__, serd_max_num); + return MV_FAIL; + } else if (test_result == UNIT_NUMBER_VIOLATION) { + printf("%s: Warning: serdes lane %d type is %s: current device support only %d units of this type.\n", + __func__, serdes_id, + serdes_type_to_string[serdes_type], + serd_max_num); + return MV_FAIL; } return MV_OK; |