From patchwork Fri Jul 15 14:58:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 2719 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 EEFF523F42 for ; Fri, 15 Jul 2011 14:58:36 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id BE230A18799 for ; Fri, 15 Jul 2011 14:58:36 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so904513qwb.11 for ; Fri, 15 Jul 2011 07:58:36 -0700 (PDT) Received: by 10.229.217.3 with SMTP id hk3mr3057331qcb.38.1310741916498; Fri, 15 Jul 2011 07:58:36 -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.229.217.78 with SMTP id hl14cs50441qcb; Fri, 15 Jul 2011 07:58:36 -0700 (PDT) Received: by 10.142.65.6 with SMTP id n6mr1709213wfa.172.1310741913775; Fri, 15 Jul 2011 07:58:33 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id t7si4507604wfg.65.2011.07.15.07.58.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jul 2011 07:58:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QhjqU-0000Qd-L5; Fri, 15 Jul 2011 15:58:26 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio , =?UTF-8?q?Juha=20Riihim=C3=A4ki?= , andrzej zaborowski , Markus Armbruster Subject: [PATCH 09/12] onenand: Ignore zero writes to boot command space Date: Fri, 15 Jul 2011 15:58:23 +0100 Message-Id: <1310741906-1606-10-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1310741906-1606-1-git-send-email-peter.maydell@linaro.org> References: <1310741906-1606-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 From: Juha Riihimäki Ignore zero writes to the boot command space; Linux will issue these in the powerdown/reset sequence. Signed-off-by: Juha Riihimäki [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell --- hw/onenand.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/onenand.c b/hw/onenand.c index 9f02736..0edcfe2 100644 --- a/hw/onenand.c +++ b/hw/onenand.c @@ -550,6 +550,13 @@ static void onenand_write(void *opaque, target_phys_addr_t addr, s->boot[0][2 << s->shift] = s->wpstatus & 0xff; break; + case 0x0000: + /* ignore zero writes without error messages, + * linux omap2/3 kernel will issue these upon + * powerdown/reset sequence. + */ + break; + default: fprintf(stderr, "%s: unknown OneNAND boot command %x\n", __FUNCTION__, value);