hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
PATCH 1/2 hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
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 <[email protected]>
--- hw/omap_gpmc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
hw/omap_gpmc.c +7 -0
@@ -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) |
Signature · 1 line
1.7.1
PATCH 2/2 hw/omap_gpmc: Modify correct field when writing IRQSTATUS register
Writing to IRQSTATUS should affect irqst, not irqen -- error spotted by Andrzej Zaborowski.
Signed-off-by Peter Maydell <[email protected]>
--- hw/omap_gpmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/omap_gpmc.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.1
Quoted 3 lines · Peter Maydell
Promote the remark about why we handle FIFOTHRESHOLDSTATUS the way we do from the commit message of
de8af7fe0to a comment in the code.
Thanks, I applied both patches. Looks like any other related patches are waiting for other events.
Cheers