mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
mpc83xx: gazerbeam: Update sysinfo_get error handling
In a later patch sysinfo_get will be changed to return the device in cae of an error. Set sysinfo to NULL on error to preserve previous behavior. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0736f7aa3b
commit
7b2aa218c7
1 changed files with 9 additions and 3 deletions
|
@ -49,8 +49,10 @@ int board_early_init_r(void)
|
||||||
int mc = 0;
|
int mc = 0;
|
||||||
int con = 0;
|
int con = 0;
|
||||||
|
|
||||||
if (sysinfo_get(&sysinfo))
|
if (sysinfo_get(&sysinfo)) {
|
||||||
puts("Could not find sysinfo information device.\n");
|
puts("Could not find sysinfo information device.\n");
|
||||||
|
sysinfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize serdes */
|
/* Initialize serdes */
|
||||||
uclass_get_device_by_phandle(UCLASS_MISC, sysinfo, "serdes", &serdes);
|
uclass_get_device_by_phandle(UCLASS_MISC, sysinfo, "serdes", &serdes);
|
||||||
|
@ -92,8 +94,10 @@ int checksysinfo(void)
|
||||||
int mc = 0;
|
int mc = 0;
|
||||||
int con = 0;
|
int con = 0;
|
||||||
|
|
||||||
if (sysinfo_get(&sysinfo))
|
if (sysinfo_get(&sysinfo)) {
|
||||||
puts("Could not find sysinfo information device.\n");
|
puts("Could not find sysinfo information device.\n");
|
||||||
|
sysinfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
sysinfo_get_int(sysinfo, BOARD_MULTICHANNEL, &mc);
|
sysinfo_get_int(sysinfo, BOARD_MULTICHANNEL, &mc);
|
||||||
sysinfo_get_int(sysinfo, BOARD_VARIANT, &con);
|
sysinfo_get_int(sysinfo, BOARD_VARIANT, &con);
|
||||||
|
@ -130,8 +134,10 @@ int last_stage_init(void)
|
||||||
struct udevice *tpm;
|
struct udevice *tpm;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (sysinfo_get(&sysinfo))
|
if (sysinfo_get(&sysinfo)) {
|
||||||
puts("Could not find sysinfo information device.\n");
|
puts("Could not find sysinfo information device.\n");
|
||||||
|
sysinfo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (sysinfo) {
|
if (sysinfo) {
|
||||||
int res = sysinfo_get_int(sysinfo, BOARD_HWVERSION,
|
int res = sysinfo_get_int(sysinfo, BOARD_HWVERSION,
|
||||||
|
|
Loading…
Reference in a new issue