Message ID | 1314550628-26869-9-git-send-email-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 9c8255e12422771cdecbb3bf538f0732be629e2a |
Headers | show |
On 28 August 2011 18:56, Peter Maydell <peter.maydell@linaro.org> wrote: > Fix a bug in the handling of writes to GPMC_IRQSTATUS: > it behaves as "write one to clear, writing zero is ignored". > > 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 d16b28b..ff4d485 100644 > --- a/hw/omap_gpmc.c > +++ b/hw/omap_gpmc.c > @@ -284,7 +284,7 @@ static void omap_gpmc_write(void *opaque, target_phys_addr_t addr, > break; > > case 0x018: /* GPMC_IRQSTATUS */ > - s->irqen = ~value; > + s->irqen &= ~value; Should we be clearing s->irqst here instead of irqen? Good catch though. Cheers
On 17 September 2011 02:08, andrzej zaborowski <balrogg@gmail.com> wrote: >> --- a/hw/omap_gpmc.c >> +++ b/hw/omap_gpmc.c >> @@ -284,7 +284,7 @@ static void omap_gpmc_write(void *opaque, target_phys_addr_t addr, >> break; >> >> case 0x018: /* GPMC_IRQSTATUS */ >> - s->irqen = ~value; >> + s->irqen &= ~value; > > Should we be clearing s->irqst here instead of irqen? Oops, you're right... (IIRC this change was a spotted-while-reading-code one, not a response to a behavioural issue with the model.) -- PMM
diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c index d16b28b..ff4d485 100644 --- a/hw/omap_gpmc.c +++ b/hw/omap_gpmc.c @@ -284,7 +284,7 @@ static void omap_gpmc_write(void *opaque, target_phys_addr_t addr, break; case 0x018: /* GPMC_IRQSTATUS */ - s->irqen = ~value; + s->irqen &= ~value; omap_gpmc_int_update(s); break;
Fix a bug in the handling of writes to GPMC_IRQSTATUS: it behaves as "write one to clear, writing zero is ignored". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- hw/omap_gpmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)