diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c index 61c760534ab8..f027aedb7361 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm204.c @@ -23,8 +23,10 @@ */ #include "nv50.h" -#define AUX_DBG(fmt, args...) nv_debug(i2c, "AUXCH(%d): " fmt, ch, ##args) -#define AUX_ERR(fmt, args...) nv_error(i2c, "AUXCH(%d): " fmt, ch, ##args) +#define AUX_DBG(fmt, args...) \ + nvkm_debug(&i2c->subdev, "AUXCH(%d): " fmt, ch, ##args) +#define AUX_ERR(fmt, args...) \ + nvkm_error(&i2c->subdev, "AUXCH(%d): " fmt, ch, ##args) static void auxch_fini(struct nvkm_i2c *i2c, int ch) @@ -48,7 +50,7 @@ auxch_init(struct nvkm_i2c *i2c, int ch) ctrl = nvkm_rd32(device, 0x00d954 + (ch * 0x50)); udelay(1); if (!timeout--) { - AUX_ERR("begin idle timeout 0x%08x\n", ctrl); + AUX_ERR("begin idle timeout %08x\n", ctrl); return -EBUSY; } } while (ctrl & 0x03010000); @@ -60,7 +62,7 @@ auxch_init(struct nvkm_i2c *i2c, int ch) ctrl = nvkm_rd32(device, 0x00d954 + (ch * 0x50)); udelay(1); if (!timeout--) { - AUX_ERR("magic wait 0x%08x\n", ctrl); + AUX_ERR("magic wait %08x\n", ctrl); auxch_fini(i2c, ch); return -EBUSY; } @@ -81,7 +83,7 @@ gm204_aux(struct nvkm_i2c_port *base, bool retry, int ch = port->addr; int ret, i; - AUX_DBG("%d: 0x%08x %d\n", type, addr, size); + AUX_DBG("%d: %08x %d\n", type, addr, size); ret = auxch_init(i2c, ch); if (ret < 0) @@ -97,7 +99,7 @@ gm204_aux(struct nvkm_i2c_port *base, bool retry, if (!(type & 1)) { memcpy(xbuf, data, size); for (i = 0; i < 16; i += 4) { - AUX_DBG("wr 0x%08x\n", xbuf[i / 4]); + AUX_DBG("wr %08x\n", xbuf[i / 4]); nvkm_wr32(device, 0x00d930 + (ch * 0x50) + i, xbuf[i / 4]); } } @@ -124,7 +126,7 @@ gm204_aux(struct nvkm_i2c_port *base, bool retry, ctrl = nvkm_rd32(device, 0x00d954 + (ch * 0x50)); udelay(1); if (!timeout--) { - AUX_ERR("tx req timeout 0x%08x\n", ctrl); + AUX_ERR("tx req timeout %08x\n", ctrl); ret = -EIO; goto out; } @@ -141,13 +143,13 @@ gm204_aux(struct nvkm_i2c_port *base, bool retry, if ((stat & 0x00000e00)) ret = -EIO; - AUX_DBG("%02d 0x%08x 0x%08x\n", retries, ctrl, stat); + AUX_DBG("%02d %08x %08x\n", retries, ctrl, stat); } if (type & 1) { for (i = 0; i < 16; i += 4) { xbuf[i / 4] = nvkm_rd32(device, 0x00d940 + (ch * 0x50) + i); - AUX_DBG("rd 0x%08x\n", xbuf[i / 4]); + AUX_DBG("rd %08x\n", xbuf[i / 4]); } memcpy(data, xbuf, size); } |
