aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-01 22:32:04 +0000
committerMike Frysinger <vapier@gentoo.org>2011-04-01 22:32:04 +0000
commit2b12772f43c236664e2cd7db10136bb55725f837 (patch)
treea582e1139ec5344c8edeaabafcaa8f2f0f75800a /sim
parent2b9e5ea6041faa2392694bb215e12a134cef2145 (diff)
downloadgdb-2b12772f43c236664e2cd7db10136bb55725f837.zip
gdb-2b12772f43c236664e2cd7db10136bb55725f837.tar.gz
gdb-2b12772f43c236664e2cd7db10136bb55725f837.tar.bz2
sim: bfin: add OTP output port
This doesn't currently generate any interrupts (as there doesn't appear to be any documentation to *when* it would even do so), but since the HRM does say an interrupt line exists between the OTP and the SIC, add one for completeness sake. This will make a follow up patch easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r--sim/bfin/ChangeLog5
-rw-r--r--sim/bfin/dv-bfin_otp.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 244f087..ef28b39 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-01 Mike Frysinger <vapier@gentoo.org>
+
+ * dv-bfin_otp.c (bfin_otp_ports): Declare.
+ (bfin_otp_finish): Call set_hw_ports with bfin_otp_ports.
+
2011-03-29 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate after common/aclocal.m4 changes.
diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c
index 5b15eeb..e9f6271 100644
--- a/sim/bfin/dv-bfin_otp.c
+++ b/sim/bfin/dv-bfin_otp.c
@@ -236,6 +236,12 @@ attach_bfin_otp_regs (struct hw *me, struct bfin_otp *otp)
otp->base = attach_address;
}
+static const struct hw_port_descriptor bfin_otp_ports[] =
+{
+ { "stat", 0, 0, output_port, },
+ { NULL, 0, 0, 0, },
+};
+
static void
bfin_otp_finish (struct hw *me)
{
@@ -249,6 +255,7 @@ bfin_otp_finish (struct hw *me)
set_hw_data (me, otp);
set_hw_io_read_buffer (me, bfin_otp_io_read_buffer);
set_hw_io_write_buffer (me, bfin_otp_io_write_buffer);
+ set_hw_ports (me, bfin_otp_ports);
attach_bfin_otp_regs (me, otp);