From f3f43ab1f0eadf3d298319ecb2e818dfcfd36eff Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Mon, 20 Jan 2020 04:01:35 +0000 Subject: [PATCH] powerpc/amiga: Hide CPLD date and time printing behind bootverbose There's no need to see the CPLD build date and time every boot. --- sys/powerpc/amigaone/cpld_x5000.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sys/powerpc/amigaone/cpld_x5000.c b/sys/powerpc/amigaone/cpld_x5000.c index 901b014cf46..bdaa3501828 100644 --- a/sys/powerpc/amigaone/cpld_x5000.c +++ b/sys/powerpc/amigaone/cpld_x5000.c @@ -164,15 +164,17 @@ cpld_attach(device_t dev) return (ENXIO); } mtx_init(&sc->sc_mutex, "cpld", NULL, MTX_DEF); - date = (cpld_read(sc, CPLD_REG_DATE_UW) << 16) | - cpld_read(sc, CPLD_REG_DATE_LW); - time = (cpld_read(sc, CPLD_REG_TIME_UW) << 16) | - cpld_read(sc, CPLD_REG_TIME_LW); + if (bootverbose) { + date = (cpld_read(sc, CPLD_REG_DATE_UW) << 16) | + cpld_read(sc, CPLD_REG_DATE_LW); + time = (cpld_read(sc, CPLD_REG_TIME_UW) << 16) | + cpld_read(sc, CPLD_REG_TIME_LW); - device_printf(dev, "Build date: %04x-%02x-%02x\n", (date >> 16) & 0xffff, - (date >> 8) & 0xff, date & 0xff); - device_printf(dev, "Build time: %02x:%02x:%02x\n", (time >> 16) & 0xff, - (time >> 8) & 0xff, time & 0xff); + device_printf(dev, "Build date: %04x-%02x-%02x\n", + (date >> 16) & 0xffff, (date >> 8) & 0xff, date & 0xff); + device_printf(dev, "Build time: %02x:%02x:%02x\n", + (time >> 16) & 0xff, (time >> 8) & 0xff, time & 0xff); + } tmp = cpld_read(sc, CPLD_REG_HWREV); device_printf(dev, "Hardware revision: %d\n", tmp);