summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-28 19:19:05 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-28 19:19:05 +0000
commit7f0280362341241847d5b9b820b0229930a14624 (patch)
treede8c7ef46967b0197cec63ba545c04951c9e9b44
parent9b530b1e9fa2610384b45f8ea544dd0eafa45ba0 (diff)
downloadgdb-7f0280362341241847d5b9b820b0229930a14624.tar.gz
* dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
address. (m68hc11eepr_port_event): Fix detach/attach logic.
-rw-r--r--sim/m68hc11/ChangeLog6
-rw-r--r--sim/m68hc11/dv-m68hc11eepr.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 0d6953b30e3..e4cc73f7640 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-28 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
+ address.
+ (m68hc11eepr_port_event): Fix detach/attach logic.
+
2001-07-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* Makefile.in (SIM_OBJS): Remove sim-resume.o
diff --git a/sim/m68hc11/dv-m68hc11eepr.c b/sim/m68hc11/dv-m68hc11eepr.c
index a48456fa13d..fb99068fe87 100644
--- a/sim/m68hc11/dv-m68hc11eepr.c
+++ b/sim/m68hc11/dv-m68hc11eepr.c
@@ -1,5 +1,5 @@
/* dv-m68hc11eepr.c -- Simulation of the 68HC11 Internal EEPROM.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@worldnet.fr)
(From a driver model Contributed by Cygnus Solutions.)
@@ -269,10 +269,10 @@ m68hc11eepr_port_event (struct hw *me,
The EEPROM CONFIG register is still enabled and can be programmed
for a next configuration (taken into account only after a reset,
see Motorola spec). */
- if (cpu->ios[M6811_CONFIG] & M6811_EEON)
+ if (!(cpu->ios[M6811_CONFIG] & M6811_EEON))
{
if (controller->mapped)
- hw_attach_address (hw_parent (me), M6811_EEPROM_LEVEL,
+ hw_detach_address (hw_parent (me), M6811_EEPROM_LEVEL,
controller->attach_space,
controller->base_address,
controller->size - 1,
@@ -282,7 +282,7 @@ m68hc11eepr_port_event (struct hw *me,
else
{
if (!controller->mapped)
- hw_detach_address (hw_parent (me), M6811_EEPROM_LEVEL,
+ hw_attach_address (hw_parent (me), M6811_EEPROM_LEVEL,
controller->attach_space,
controller->base_address,
controller->size - 1,
@@ -368,7 +368,7 @@ m68hc11eepr_info (struct hw *me)
sim_io_printf (sd, " Programming CONFIG register ");
else
sim_io_printf (sd, " Programming: 0x%04x ",
- controller->eeprom_waddr);
+ controller->eeprom_waddr + controller->base_address);
sim_io_printf (sd, "with 0x%02x\n",
controller->eeprom_wbyte);