From patchwork Fri Mar 15 17:29:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 15386 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C904E23E10 for ; Fri, 15 Mar 2013 17:57:57 +0000 (UTC) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by fiordland.canonical.com (Postfix) with ESMTP id 5EA4AA18FA7 for ; Fri, 15 Mar 2013 17:57:57 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id kw10so1448188vcb.14 for ; Fri, 15 Mar 2013 10:57:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=mi1vxZp5s0DfkDglS/TOSIl+t6hn9IDj8hkflrUJ5xc=; b=pBlnfaw2nvBCoeUbLui0KUmCaujs+Uz0ixsgQJCuKNkViZ2t+Ijm5bYe9CgA3L1KZ6 7isF87tQMZcC/i4X46Zqnf7xk99nCMEO0kglaMucOaPK2C5e57HqIdkjzWv3p1uIi7Ha iI+A01SuFDfWDoAyssjp+mNeeeKx1vXiqoUnxb9Yt+OhV6TtYwDB+lCrIQ3w3ip3PyOj iFIUugnaeJ4tDfUymWFNIGcZxradBIqj0GNVN/xL+i0PyMKxLD2uNv48Dk+ng167pzDr zIQ5vQ2JePihdLubuybN06GWHwEfgIFfhYSoDw1lCdTX6JS8IODkWmHFPdukQl6lGz2k F5lg== X-Received: by 10.52.88.237 with SMTP id bj13mr7028899vdb.75.1363368568479; Fri, 15 Mar 2013 10:29:28 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp131105veb; Fri, 15 Mar 2013 10:29:27 -0700 (PDT) X-Received: by 10.180.98.232 with SMTP id el8mr4582688wib.22.1363368567299; Fri, 15 Mar 2013 10:29:27 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id o3si2981249wja.226.2013.03.15.10.29.26 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 15 Mar 2013 10:29:27 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UGYRZ-0006OL-6X; Fri, 15 Mar 2013 17:29:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Andrzej Zaborowski Subject: [PATCH] hw/arm/nseries: don't print to stdout or stderr Date: Fri, 15 Mar 2013 17:29:25 +0000 Message-Id: <1363368565-24546-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQmOUMLfQVLK0WwpUmkoVZcZfPUGiLp/HV/c1gvGItnrxhP9okeib/+9Tp3APlZTYHTsRCTL Remove various bits of printing to stdout or stderr from the nseries code, replacing it with a qemu log message where there's an appropriate log category, and just dropping the output for some of the more debug-like printing. In particular, this will get rid of the 'mipid_reset' message you currently get from 'make check'. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber --- None of the printing I deleted seemed important enough to be worth trying to retain as a trace event. I'm open to argument if anybody genuinely uses it, though. hw/arm/nseries.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index c5bf9f9..25458d8 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -129,8 +129,6 @@ static void n800_mmc_cs_cb(void *opaque, int line, int level) /* TODO: this seems to actually be connected to the menelaus, to * which also both MMC slots connect. */ omap_mmc_enable((struct omap_mmc_s *) opaque, !level); - - printf("%s: MMC slot %i active\n", __FUNCTION__, level + 1); } static void n8x0_gpio_setup(struct n800_s *s) @@ -428,9 +426,6 @@ struct mipid_s { static void mipid_reset(struct mipid_s *s) { - if (!s->sleep) - fprintf(stderr, "%s: Display off\n", __FUNCTION__); - s->pm = 0; s->cmd = 0; @@ -578,11 +573,9 @@ static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len) case 0x28: /* DISPOFF */ s->onoff = 0; - fprintf(stderr, "%s: Display off\n", __FUNCTION__); break; case 0x29: /* DISPON */ s->onoff = 1; - fprintf(stderr, "%s: Display on\n", __FUNCTION__); break; case 0x2a: /* CASET */ @@ -669,7 +662,8 @@ static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len) default: bad_cmd: - fprintf(stderr, "%s: unknown command %02x\n", __FUNCTION__, s->cmd); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: unknown command %02x\n", __func__, s->cmd); break; } @@ -1348,7 +1342,6 @@ static void n8x0_init(QEMUMachineInitArgs *args, if (option_rom[0].name && (args->boot_device[0] == 'n' || !args->kernel_filename)) { - int rom_size; uint8_t nolo_tags[0x10000]; /* No, wait, better start at the ROM. */ s->mpu->cpu->env.regs[15] = OMAP2_Q2_BASE + 0x400000; @@ -1362,10 +1355,9 @@ static void n8x0_init(QEMUMachineInitArgs *args, * * The code above is for loading the `zImage' file from Nokia * images. */ - rom_size = load_image_targphys(option_rom[0].name, - OMAP2_Q2_BASE + 0x400000, - sdram_size - 0x400000); - printf("%i bytes of image loaded\n", rom_size); + load_image_targphys(option_rom[0].name, + OMAP2_Q2_BASE + 0x400000, + sdram_size - 0x400000); n800_setup_nolo_tags(nolo_tags); cpu_physical_memory_write(OMAP2_SRAM_BASE, nolo_tags, 0x10000);