From patchwork Wed Apr 3 04:09:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 233216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BACFD2C0121 for ; Wed, 3 Apr 2013 15:11:25 +1100 (EST) Received: from localhost ([::1]:56686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNF2h-0005n4-Av for incoming@patchwork.ozlabs.org; Wed, 03 Apr 2013 00:11:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNF2L-0005jO-AM for qemu-devel@nongnu.org; Wed, 03 Apr 2013 00:11:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNF2J-0007pq-S2 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 00:11:01 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:50969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNF2J-0007pg-ES for qemu-devel@nongnu.org; Wed, 03 Apr 2013 00:10:59 -0400 Received: by mail-pa0-f42.google.com with SMTP id kq13so669080pab.15 for ; Tue, 02 Apr 2013 21:10:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state; bh=r21Zv1bNl5FV9+hhtQcQP1Zu2VcGL4scDl/5h3upWio=; b=eZqG4Lep9/KCHs/ARiUfUxdT/x++FhEkQcKBpV5n01qTkzZhCRwAyijbfp1AHnmKrL Qzu/zOJIo6MPVHGZRDhzsQqMFNZm7Mdz0MRc+ANvsfNqmthiOdwjUwkfTyIFQVmymBWs Rp5aGxX6bAD61MojnNlLXo0+PpvXMMjK/6oIX3kDHYrJMNGYagG46DXdJsrwgx8/o7yT 2jm0dygpgAcAN/Wu1et4NP+wZIp6ei4/GNGA38AZr2Q8MM7ecsyEyJahkHxsFch8tvUK yn0tgGRkmExcORnZ4DEh3Ff/R2eSlMXsX/DjPsXL3ZPfjZyUGRTpKLXdmv7u8E9mnTKb HqZA== X-Received: by 10.66.241.71 with SMTP id wg7mr794283pac.155.1364962258815; Tue, 02 Apr 2013 21:10:58 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPS id ux10sm5100290pab.1.2013.04.02.21.10.56 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 21:10:57 -0700 (PDT) From: Peter Crosthwaite To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Wed, 3 Apr 2013 14:09:17 +1000 Message-Id: <74e6ed5ed66174c668342f8e1ed9875192834a94.1364961975.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkv+t5Og0mOKuZU3cFShnkSoj8erhkcZAaOaq6avwSd5251a9r4J1k/UITSm3PP5stN22Hu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.42 Cc: Peter Crosthwaite Subject: [Qemu-devel] [PATCH v1 2/4] m25p80: Convert guest errors to LOG_GUEST_ERROR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some of the debug printfs in m25p80 are really guest errors. Changed over to qemu_log_mask(LOG_GUEST_ERROR accordingly. Signed-off-by: Peter Crosthwaite --- hw/m25p80.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/m25p80.c b/hw/m25p80.c index 34b476b..1f7fb28 100644 --- a/hw/m25p80.c +++ b/hw/m25p80.c @@ -319,11 +319,12 @@ static void flash_erase(Flash *s, int offset, FlashCMD cmd) DB_PRINT("offset = %#x, len = %d\n", offset, len); if ((s->pi->flags & capa_to_assert) != capa_to_assert) { - hw_error("m25p80: %dk erase size not supported by device\n", len); - } + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: %dk erase size not supported by" + " device\n", len); + }; if (!s->write_enable) { - DB_PRINT("erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: erase with write protect!\n"); return; } memset(s->storage + offset, 0xff, len); @@ -345,7 +346,7 @@ void flash_write8(Flash *s, uint64_t addr, uint8_t data) uint8_t prev = s->storage[s->cur_addr]; if (!s->write_enable) { - DB_PRINT("write with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: write with write protect!\n"); } if ((prev ^ data) & data) { @@ -503,13 +504,14 @@ static void decode_new_cmd(Flash *s, uint32_t value) DB_PRINT("chip erase\n"); flash_erase(s, 0, BULK_ERASE); } else { - DB_PRINT("chip erase with write protect!\n"); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: chip erase with write " + "protect!\n"); } break; case NOP: break; default: - DB_PRINT("Unknown cmd %x\n", value); + qemu_log_mask(LOG_GUEST_ERROR, "M25P80: Unknown cmd %x\n", value); break; } }