aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-26 17:50:40 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-06-26 17:50:40 +0100
commit8d2774f0ff953f945167dcf7259e1f7a6091d19f (patch)
tree01dc0ce9aeafe0e2a99478cd77f6d54ae4c93ce2 /hw/i2c
parent25b98b96af0df0ca224d42e2b0dadaa06f5d49af (diff)
downloadqemu-8d2774f0ff953f945167dcf7259e1f7a6091d19f.zip
qemu-8d2774f0ff953f945167dcf7259e1f7a6091d19f.tar.gz
qemu-8d2774f0ff953f945167dcf7259e1f7a6091d19f.tar.bz2
hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20180624040609.17572-8-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i2c')
-rw-r--r--hw/i2c/omap_i2c.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/i2c/omap_i2c.c b/hw/i2c/omap_i2c.c
index 26e3e5e..d02e734 100644
--- a/hw/i2c/omap_i2c.c
+++ b/hw/i2c/omap_i2c.c
@@ -17,6 +17,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "hw/arm/omap.h"
@@ -339,14 +340,15 @@ static void omap_i2c_write(void *opaque, hwaddr addr,
}
break;
}
- if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */
- fprintf(stderr, "%s: I^2C slave mode not supported\n",
- __func__);
+ if ((value & (1 << 15)) && !(value & (1 << 10))) { /* MST */
+ qemu_log_mask(LOG_UNIMP, "%s: I^2C slave mode not supported\n",
+ __func__);
break;
}
- if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */
- fprintf(stderr, "%s: 10-bit addressing mode not supported\n",
- __func__);
+ if ((value & (1 << 15)) && value & (1 << 8)) { /* XA */
+ qemu_log_mask(LOG_UNIMP,
+ "%s: 10-bit addressing mode not supported\n",
+ __func__);
break;
}
if ((value & (1 << 15)) && value & (1 << 0)) { /* STT */
@@ -392,8 +394,10 @@ static void omap_i2c_write(void *opaque, hwaddr addr,
s->stat |= 0x3f;
omap_i2c_interrupts_update(s);
}
- if (value & (1 << 15)) /* ST_EN */
- fprintf(stderr, "%s: System Test not supported\n", __func__);
+ if (value & (1 << 15)) { /* ST_EN */
+ qemu_log_mask(LOG_UNIMP,
+ "%s: System Test not supported\n", __func__);
+ }
break;
default: