From f006d9e205f729aad48c0876eb8cd8feb70a6972 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 28 May 2021 23:29:40 -0400 Subject: [PATCH] sim: bfin: fix the otp fix fix Need to shift the upper 32-bits and not just combine directly with the lower 32-bits. --- sim/bfin/ChangeLog | 4 ++++ sim/bfin/dv-bfin_otp.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 29dfde8fe6..e5b6449909 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-05-28 Mike Frysinger + + * dv-bfin_otp.c (bfin_otp_write_page): Shift data1 & data3 by 32-bits. + 2021-05-23 Mike Frysinger * dv-bfin_otp.c (bfin_otp_write_page): Fix args to diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c index cdc010ae55..a9f768d0c0 100644 --- a/sim/bfin/dv-bfin_otp.c +++ b/sim/bfin/dv-bfin_otp.c @@ -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 -- 2.34.1