]> Git Repo - J-u-boot.git/blobdiff - drivers/misc/altera_sysid.c
efi_selftest: simplify Makefile
[J-u-boot.git] / drivers / misc / altera_sysid.c
index 87aadaf24f8c6bcc6580672eb564825ed2267c24..c6502650b75d08a9d52ebf449f686e91e2292458 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  * Scott McNutt <[email protected]>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -36,7 +35,7 @@ void display_sysid(void)
        if (ret)
                return;
        ret = misc_read(dev, 0, &sysid, sizeof(sysid));
-       if (ret)
+       if (ret < 0)
                return;
 
        stamp = sysid[1];
@@ -45,7 +44,7 @@ void display_sysid(void)
        printf("SYSID: %08x, %s", sysid[0], asc);
 }
 
-int do_sysid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sysid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        display_sysid();
        return 0;
@@ -74,7 +73,7 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
 {
        struct altera_sysid_platdata *plat = dev_get_platdata(dev);
 
-       plat->regs = map_physmem(devfdt_get_addr(dev),
+       plat->regs = map_physmem(dev_read_addr(dev),
                                 sizeof(struct altera_sysid_regs),
                                 MAP_NOCACHE);
 
This page took 0.027185 seconds and 4 git commands to generate.