From d86efa30a3e720ea673af27cb45f5a8e4150fc90 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sun, 1 Oct 2017 13:02:59 -0700 Subject: [PATCH] Print MMIO address into kernel log Signed-off-by: Guenter Roeck --- it87.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/it87.c b/it87.c index 6b5610f..f2c114b 100644 --- a/it87.c +++ b/it87.c @@ -2958,6 +2958,7 @@ static int __init it87_find(int sioaddr, unsigned short *address, const struct it87_devices *config; phys_addr_t base = 0; bool doexit = true; + char mmio_str[32]; u16 chip_type; int err; @@ -3087,9 +3088,6 @@ static int __init it87_find(int sioaddr, unsigned short *address, err = 0; sio_data->revision = superio_inb(sioaddr, DEVREV) & 0x0f; - pr_info("Found IT%04x%s chip at 0x%x, revision %d\n", chip_type, - it87_devices[sio_data->type].suffix, - *address, sio_data->revision); config = &it87_devices[sio_data->type]; @@ -3104,6 +3102,14 @@ static int __init it87_find(int sioaddr, unsigned short *address, } *mmio_address = base; + mmio_str[0] = '\0'; + if (base) + snprintf(mmio_str, sizeof(mmio_str), " [MMIO at %pa]", &base); + + pr_info("Found IT%04x%s chip at 0x%x%s, revision %d\n", chip_type, + it87_devices[sio_data->type].suffix, + *address, mmio_str, sio_data->revision); + /* in7 (VSB or VCCH5V) is always internal on some chips */ if (has_in7_internal(config)) sio_data->internal |= BIT(1); -- 2.39.5