Received: from eggs.gnu.org ([140.186.70.92]:47536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4zzd-0005Ux-1t for qemu-devel@nongnu.org; Sat, 17 Sep 2011 14:52:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4zzb-0007bL-4p for qemu-devel@nongnu.org; Sat, 17 Sep 2011 14:52:01 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:56385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4zza-0007ad-Uy for qemu-devel@nongnu.org; Sat, 17 Sep 2011 14:51:59 -0400 From: Peter Maydell Date: Sat, 17 Sep 2011 19:51:48 +0100 Message-Id: <1316285509-5170-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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) | -- 1.7.1