gdb: Convert language la_value_print field to a method
[deliverable/binutils-gdb.git] / sim / m68hc11 / dv-nvram.c
index 6ffea5d5b6feb9b046da919adc3777d4ee40ec59..705c1203716612aaf4377be87b6b974644665468 100644 (file)
@@ -1,21 +1,20 @@
 /*  dv-nvram.c -- Generic driver for a non volatile ram (battery saved)
-    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+    Copyright (C) 1999-2020 Free Software Foundation, Inc.
     Written by Stephane Carrez (stcarrez@worldnet.fr)
     (From a driver model Contributed by Cygnus Solutions.)
     
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation; either version 3 of the License, or
     (at your option) any later version.
-    
+
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
-    
+
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
     */
 
    
    PROPERTIES
 
-   overlap? <bool>
-
-        Boolean property which indicates whether the device can overlap
-        another device.  By default, overlapping is not allowed.
-
    reg <base> <length>
 
         Base and size of the non-volatile ram bank.
@@ -135,11 +129,6 @@ attach_nvram_regs (struct hw *me, struct nvram *controller)
   reg_property_spec reg;
   int result, oerrno;
 
-  /* Get the flag that controls overlapping of ram bank to another device.  */
-  if (hw_find_property (me, "overlap?") != NULL
-      && hw_find_boolean_property (me, "overlap?"))
-    me->overlap_mode_hw = 1;
-
   /* Get ram bank description (base and size).  */
   if (hw_find_property (me, "reg") == NULL)
     hw_abort (me, "Missing \"reg\" property");
@@ -197,7 +186,7 @@ attach_nvram_regs (struct hw *me, struct nvram *controller)
 
     case NVRAM_SAVE_MODIFIED:
     case NVRAM_SAVE_ALL:
-      controller->data = (char*) malloc (attach_size);
+      controller->data = hw_malloc (me, attach_size);
       if (controller->data == 0)
         hw_abort (me, "Not enough memory, try to use the mode 'map'");
 
@@ -214,7 +203,7 @@ attach_nvram_regs (struct hw *me, struct nvram *controller)
           if (result != attach_size)
             {
               oerrno = errno;
-              free (controller->data);
+              hw_free (me, controller->data);
               close (controller->fd);
               errno = oerrno;
               hw_abort (me, "Failed to save the ram content");
@@ -226,7 +215,7 @@ attach_nvram_regs (struct hw *me, struct nvram *controller)
           if (result != attach_size)
             {
               oerrno = errno;
-              free (controller->data);
+              hw_free (me, controller->data);
               close (controller->fd);
               errno = oerrno;
               hw_abort (me, "Failed to load the ram content");
This page took 0.036981 seconds and 4 git commands to generate.