diff options
Diffstat (limited to 'sim/bfin/dv-bfin_rtc.c')
-rw-r--r-- | sim/bfin/dv-bfin_rtc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/bfin/dv-bfin_rtc.c b/sim/bfin/dv-bfin_rtc.c index d2220ca..49b6216 100644 --- a/sim/bfin/dv-bfin_rtc.c +++ b/sim/bfin/dv-bfin_rtc.c @@ -61,6 +61,10 @@ bfin_rtc_io_write_buffer (struct hw *me, const void *source, bu32 *value32p; void *valuep; + /* Invalid access mode is higher priority than missing register. */ + if (!dv_bfin_mmr_require_16_32 (me, addr, nr_bytes, true)) + return 0; + if (nr_bytes == 4) value = dv_load_4 (source); else @@ -104,6 +108,10 @@ bfin_rtc_io_read_buffer (struct hw *me, void *dest, bu32 *value32p; void *valuep; + /* Invalid access mode is higher priority than missing register. */ + if (!dv_bfin_mmr_require_16_32 (me, addr, nr_bytes, false)) + return 0; + mmr_off = addr - rtc->base; valuep = (void *)((unsigned long)rtc + mmr_base() + mmr_off); value16p = valuep; |