]> git.sur5r.net Git - groeck-it87/commitdiff
Print MMIO address into kernel log
authorGuenter Roeck <linux@roeck-us.net>
Sun, 1 Oct 2017 20:02:59 +0000 (13:02 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 1 Oct 2017 20:02:59 +0000 (13:02 -0700)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
it87.c

diff --git a/it87.c b/it87.c
index 6b5610f8474aea4e60dc86608b25c7d61d2e4b96..f2c114b23878275fe29a80755f81921b3795693a 100644 (file)
--- 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);