sim: bfin: fix the otp fix fix
authorMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 03:29:40 +0000 (23:29 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 03:31:24 +0000 (23:31 -0400)
Need to shift the upper 32-bits and not just combine directly with
the lower 32-bits.

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

index 29dfde8fe6e3415d20ac182e9d8f5da08912b551..e5b644990947a437502d886c829a3f0e16d3db7f 100644 (file)
@@ -1,3 +1,7 @@
+2021-05-28  Mike Frysinger  <vapier@gentoo.org>
+
+       * dv-bfin_otp.c (bfin_otp_write_page): Shift data1 & data3 by 32-bits.
+
 2021-05-23  Mike Frysinger  <vapier@gentoo.org>
 
        * dv-bfin_otp.c (bfin_otp_write_page): Fix args to
index cdc010ae551bad264fb770e90c816ffa93dff57f..a9f768d0c0ea4b2135ebd3838959aa9bab071a90 100644 (file)
@@ -91,8 +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, (bu64)otp->data1 | otp->data0,
-                           (bu64)otp->data3 | otp->data2);
+  bfin_otp_write_page_val2 (otp, page, ((bu64)otp->data1 << 32) | otp->data0,
+                           ((bu64)otp->data3 << 32) | otp->data2);
 }
 
 static unsigned