mirror of
https://github.com/xboot/xfel.git
synced 2024-11-30 13:13:37 +08:00
[spinand]initial spin nand protect feature to zero
This commit is contained in:
parent
80e25d96d0
commit
1b956507ac
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user