diff mbox

[1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit

Message ID 1316285509-5170-1-git-send-email-peter.maydell@linaro.org
State Accepted
Commit 7196345549474719eb85c675174ce3717adf771b
Headers show

Commit Message

Peter Maydell Sept. 17, 2011, 6:51 p.m. UTC
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>
---
 hw/omap_gpmc.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Comments

andrzej zaborowski Sept. 23, 2011, 6:30 a.m. UTC | #1
On 17 September 2011 20:51, Peter Maydell <peter.maydell@linaro.org> wrote:
> Promote the remark about why we handle FIFOTHRESHOLDSTATUS the
> way we do from the commit message of de8af7fe0 to a comment in
> the code.

Thanks, I applied both patches.  Looks like any other related patches
are waiting for other events.

Cheers
diff mbox

Patch

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) |