Skip to content

Commit

Permalink
[spinand]initial spin nand protect feature to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjunjiang committed Nov 8, 2021
1 parent 80e25d9 commit 1b95650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinand.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ static int spinand_helper_init(struct xfel_ctx_t * ctx, struct spinand_pdata_t *
{
spinand_reset(ctx, pdat);
spinand_wait_for_busy(ctx, pdat);
if(spinand_get_feature(ctx, pdat, OPCODE_FEATURE_PROTECT, &val) && (val & 0x38))
if(spinand_get_feature(ctx, pdat, OPCODE_FEATURE_PROTECT, &val) && (val != 0x0))
{
spinand_set_feature(ctx, pdat, OPCODE_FEATURE_PROTECT, val & ~0x38);
spinand_set_feature(ctx, pdat, OPCODE_FEATURE_PROTECT, 0x0);
spinand_wait_for_busy(ctx, pdat);
}
return 1;
Expand Down

0 comments on commit 1b95650

Please sign in to comment.