8000 MSDK-974 - Fixing CTB RevA Hash default value bug. by Jacob-Scheiffler · Pull Request #294 · analogdevicesinc/msdk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MSDK-974 - Fixing CTB RevA Hash default value bug. #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an iss 8000 ue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Libraries/PeriphDrivers/Source/CTB/ctb_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static int MXC_CTB_Cipher_EncDecAsc(mxc_ctb_cipher_req_t *req);
int MXC_CTB_RevA_Init(mxc_ctb_reva_regs_t *ctb_regs, uint32_t features)
{
ctb_regs->ctrl = MXC_F_CTB_REVA_CTRL_RST;
while (ctb_regs->ctrl & MXC_F_CTB_REVA_CTRL_RST) {}

ctb_regs->ctrl |= MXC_F_CTB_REVA_CTRL_FLAG_MODE;

Expand All @@ -102,6 +103,11 @@ int MXC_CTB_RevA_Init(mxc_ctb_reva_regs_t *ctb_regs, uint32_t features)

if (features & MXC_CTB_REVA_FEATURE_HASH) {
MXC_FreeLock((void *)&MXC_CTB_Callbacks[HSH_ID]);
} else if (!(enabled_features & MXC_CTB_REVA_FEATURE_HASH)) {
// Hash has not been initialized previously and is
// not initialized in this call to MXC_CTB_Init,
// clear hash_ctrl reg.
ctb_regs->hash_ctrl = 0;
}

if (features & MXC_CTB_REVA_FEATURE_CIPHER) {
Expand Down
0