aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-23 22:15:01 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-23 22:16:13 -0400
commitd699be882b42f36677836c320edbf7db24021a30 (patch)
tree5464953e74c2098d55f80b66c62a5c2a22a9f7f0 /sim
parent3cc4ee83adf2f6e2ab21e32f7d5942b1d1803a04 (diff)
downloadgdb-d699be882b42f36677836c320edbf7db24021a30.zip
gdb-d699be882b42f36677836c320edbf7db24021a30.tar.gz
gdb-d699be882b42f36677836c320edbf7db24021a30.tar.bz2
sim: bfin: fix the otp fix
I misread the code and thought data0/... were bu64 when they were actually bu32. Fix the call to assemble the 2 64-bit values instead of passing the 2 halves of the first 64-bit value.
Diffstat (limited to 'sim')
-rw-r--r--sim/bfin/ChangeLog5
-rw-r--r--sim/bfin/dv-bfin_otp.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 9c517d2..29dfde8 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,5 +1,10 @@
2021-05-23 Mike Frysinger <vapier@gentoo.org>
+ * dv-bfin_otp.c (bfin_otp_write_page): Fix args to
+ bfin_otp_write_page_val2.
+
+2021-05-23 Mike Frysinger <vapier@gentoo.org>
+
* dv-bfin_otp.c (bfin_otp_write_page): Call bfin_otp_write_page_val2.
2021-05-23 Mike Frysinger <vapier@gentoo.org>
diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c
index 65afdf5..cdc010a 100644
--- a/sim/bfin/dv-bfin_otp.c
+++ b/sim/bfin/dv-bfin_otp.c
@@ -91,7 +91,8 @@ bfin_otp_write_page_val2 (struct bfin_otp *otp, bu16 page, bu64 lo, bu64 hi)
static void
bfin_otp_write_page (struct bfin_otp *otp, bu16 page)
{
- bfin_otp_write_page_val2 (otp, page, otp->data0, otp->data1);
+ bfin_otp_write_page_val2 (otp, page, (bu64)otp->data1 | otp->data0,
+ (bu64)otp->data3 | otp->data2);
}
static unsigned