gdb/features: remove rx.xml from XMLTOC list
[deliverable/binutils-gdb.git] / sim / bfin / dv-bfin_rtc.c
index 870d6b10950c3f7f7edeed5b5fe3af453123f2fe..3180474e9e56c5157ec8b9080c972978be50e21d 100644 (file)
@@ -1,6 +1,6 @@
 /* Blackfin Real Time Clock (RTC) model.
 
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2020 Free Software Foundation, Inc.
    Contributed by Analog Devices, Inc.
 
    This file is part of simulators.
@@ -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
@@ -80,7 +84,7 @@ bfin_rtc_io_write_buffer (struct hw *me, const void *source,
       /* XXX: Ignore these since we are wired to host.  */
       break;
     case mmr_offset(istat):
-      dv_w1c_2 (value16p, value, 1 << 14);
+      dv_w1c_2 (value16p, value, ~(1 << 14));
       break;
     case mmr_offset(alarm):
       break;
@@ -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;
This page took 0.031785 seconds and 4 git commands to generate.