sim: bfin: fix the otp fix
authorMike Frysinger <vapier@gentoo.org>
Mon, 24 May 2021 02:15:01 +0000 (22:15 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 24 May 2021 02:16:13 +0000 (22:16 -0400)
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.

sim/bfin/ChangeLog
sim/bfin/dv-bfin_otp.c

index 9c517d20bbeb7ecd0657490bcae20e7d8413e6f9..29dfde8fe6e3415d20ac182e9d8f5da08912b551 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 65afdf58b27fe62646f93a7025c7cc4357243807..cdc010ae551bad264fb770e90c816ffa93dff57f 100644 (file)
@@ -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