From patchwork Sat Sep 17 18:51:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 4154 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 4361023EFC for ; Sat, 17 Sep 2011 18:51:53 +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 0851EA18171 for ; Sat, 17 Sep 2011 18:51:53 +0000 (UTC) Received: by fxe23 with SMTP id 23so3841576fxe.11 for ; Sat, 17 Sep 2011 11:51:52 -0700 (PDT) Received: by 10.223.33.19 with SMTP id f19mr1601838fad.122.1316285512821; Sat, 17 Sep 2011 11:51:52 -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 m8cs171029lab; Sat, 17 Sep 2011 11:51:52 -0700 (PDT) Received: by 10.227.203.83 with SMTP id fh19mr884218wbb.17.1316285512316; Sat, 17 Sep 2011 11:51:52 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id fn2si13239883wbb.125.2011.09.17.11.51.51 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Sep 2011 11:51:52 -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 1R4zzR-0001Lp-K9; Sat, 17 Sep 2011 19:51:49 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Andrzej Zaborowski , patches@linaro.org Subject: [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit Date: Sat, 17 Sep 2011 19:51:48 +0100 Message-Id: <1316285509-5170-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Promote the remark about why we handle FIFOTHRESHOLDSTATUS the way we do from the commit message of de8af7fe0 to a comment in the code. Signed-off-by: Peter Maydell --- hw/omap_gpmc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c index 02f0c52..e27b93c 100644 --- a/hw/omap_gpmc.c +++ b/hw/omap_gpmc.c @@ -569,6 +569,13 @@ static uint64_t omap_gpmc_read(void *opaque, target_phys_addr_t addr, case 0x1ec: /* GPMC_PREFETCH_CONTROL */ return s->prefetch.startengine; case 0x1f0: /* GPMC_PREFETCH_STATUS */ + /* NB: 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. + */ return (s->prefetch.fifopointer << 24) | ((s->prefetch.fifopointer >= ((s->prefetch.config1 >> 8) & 0x7f) ? 1 : 0) << 16) |