From patchwork Sun Aug 28 16:56:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 3743 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 45FB323FA3 for ; Sun, 28 Aug 2011 16:57:27 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3AAE7A18191 for ; Sun, 28 Aug 2011 16:57:27 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 18so5671092fxd.11 for ; Sun, 28 Aug 2011 09:57:27 -0700 (PDT) Received: by 10.223.62.8 with SMTP id v8mr1834944fah.43.1314550647144; Sun, 28 Aug 2011 09:57:27 -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.152.11.8 with SMTP id m8cs69790lab; Sun, 28 Aug 2011 09:57:27 -0700 (PDT) Received: by 10.223.30.214 with SMTP id v22mr5504061fac.108.1314550646690; Sun, 28 Aug 2011 09:57:26 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id c11si4723764fac.155.2011.08.28.09.57.25 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Aug 2011 09:57:25 -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 1QxifU-000708-Ok; Sun, 28 Aug 2011 17:57:08 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Andrzej Zaborowski , "Edgar E. Iglesias" , patches@linaro.org Subject: [PATCH v2 09/18] omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bit Date: Sun, 28 Aug 2011 17:56:59 +0100 Message-Id: <1314550628-26869-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1314550628-26869-1-git-send-email-peter.maydell@linaro.org> References: <1314550628-26869-1-git-send-email-peter.maydell@linaro.org> The OMAP3 TRM is inconsistent about whether the GPMC FIFOTHRESHOLDSTATUS bit should be set when FIFOPOINTER > FIFOTHRESHOLD or when it is >= FIFOTHRESHOLD. Apparently the underlying functional spec from which the TRM was created states that the behaviour is ">=", and this also makes more conceptual sense. Signed-off-by: Peter Maydell --- hw/omap_gpmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c index b728397..9da8491 100644 --- a/hw/omap_gpmc.c +++ b/hw/omap_gpmc.c @@ -222,7 +222,7 @@ static uint64_t omap_gpmc_read(void *opaque, target_phys_addr_t addr, return s->prefcontrol; case 0x1f0: /* GPMC_PREFETCH_STATUS */ return (s->preffifo << 24) | - ((s->preffifo > + ((s->preffifo >= ((s->prefconfig[0] >> 8) & 0x7f) ? 1 : 0) << 16) | s->prefcount;