2 * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
3 * Scott McNutt <smcnutt@psyent.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #if defined (CONFIG_SYS_NIOS_SYSID_BASE)
15 #include <linux/time.h>
17 void display_sysid (void)
19 struct nios_sysid_t
*sysid
= (struct nios_sysid_t
*)CONFIG_SYS_NIOS_SYSID_BASE
;
24 stamp
= readl (&sysid
->timestamp
);
25 localtime_r (&stamp
, &t
);
27 printf ("SYSID : %08lx, %s", readl (&sysid
->id
), asc
);
31 int do_sysid (cmd_tbl_t
*cmdtp
, int flag
, int argc
, char * const argv
[])
38 sysid
, 1, 1, do_sysid
,
39 "display Nios-II system id",
42 #endif /* CONFIG_SYS_NIOS_SYSID_BASE */