]> git.proxmox.com Git - qemu.git/commitdiff
hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 17 Sep 2011 18:51:48 +0000 (19:51 +0100)
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>
Fri, 23 Sep 2011 06:36:36 +0000 (08:36 +0200)
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 <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/omap_gpmc.c

index 02f0c521071b1ffdc8bf87916a58e3e0732a503e..e27b93c9b541fa297d884a585e11479cea9cf0f9 100644 (file)
@@ -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) |