All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
@ 2011-09-17 18:51 Peter Maydell
  2011-09-17 18:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_gpmc: Modify correct field when writing IRQSTATUS register Peter Maydell
  2011-09-23  6:30 ` [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit andrzej zaborowski
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2011-09-17 18:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

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

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PATCH 2/2] hw/omap_gpmc: Modify correct field when writing IRQSTATUS register
  2011-09-17 18:51 [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit Peter Maydell
@ 2011-09-17 18:51 ` Peter Maydell
  2011-09-23  6:30 ` [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit andrzej zaborowski
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2011-09-17 18:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

Writing to IRQSTATUS should affect irqst, not irqen -- error
spotted by Andrzej Zaborowski.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 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 e27b93c..7fc82a2 100644
--- a/hw/omap_gpmc.c
+++ b/hw/omap_gpmc.c
@@ -639,7 +639,7 @@ static void omap_gpmc_write(void *opaque, target_phys_addr_t addr,
         break;
 
     case 0x018:	/* GPMC_IRQSTATUS */
-        s->irqen &= ~value;
+        s->irqst &= ~value;
         omap_gpmc_int_update(s);
         break;
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
  2011-09-17 18:51 [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit Peter Maydell
  2011-09-17 18:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_gpmc: Modify correct field when writing IRQSTATUS register Peter Maydell
@ 2011-09-23  6:30 ` andrzej zaborowski
  1 sibling, 0 replies; 3+ messages in thread
From: andrzej zaborowski @ 2011-09-23  6:30 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23  6:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-17 18:51 [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit Peter Maydell
2011-09-17 18:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_gpmc: Modify correct field when writing IRQSTATUS register Peter Maydell
2011-09-23  6:30 ` [Qemu-devel] [PATCH 1/2] hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit andrzej zaborowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.