OvmfPkg/VirtNorFlashDxe: remove CheckBlockLocked feature
We inherited a feature from the ArmPlatformPkg version of this driver that never gets enabled. Let's remove it. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
committed by
mergify[bot]
parent
c1ff81f799
commit
0a64106c56
@ -65,35 +65,16 @@ NorFlashUnlockSingleBlock (
|
|||||||
// Raise the Task Priority Level to TPL_NOTIFY to serialise all its operations
|
// Raise the Task Priority Level to TPL_NOTIFY to serialise all its operations
|
||||||
// and to protect shared data structures.
|
// and to protect shared data structures.
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdNorFlashCheckBlockLocked) == TRUE) {
|
// Request a lock setup
|
||||||
do {
|
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_LOCK_BLOCK_SETUP);
|
||||||
// Request a lock setup
|
|
||||||
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_LOCK_BLOCK_SETUP);
|
|
||||||
|
|
||||||
// Request an unlock
|
// Request an unlock
|
||||||
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_UNLOCK_BLOCK);
|
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_UNLOCK_BLOCK);
|
||||||
|
|
||||||
// Send command for reading device id
|
// Wait until the status register gives us the all clear
|
||||||
SEND_NOR_COMMAND (BlockAddress, 2, P30_CMD_READ_DEVICE_ID);
|
do {
|
||||||
|
LockStatus = NorFlashReadStatusRegister (Instance, BlockAddress);
|
||||||
// Read block lock status
|
} while ((LockStatus & P30_SR_BIT_WRITE) != P30_SR_BIT_WRITE);
|
||||||
LockStatus = MmioRead32 (CREATE_NOR_ADDRESS (BlockAddress, 2));
|
|
||||||
|
|
||||||
// Decode block lock status
|
|
||||||
LockStatus = FOLD_32BIT_INTO_16BIT (LockStatus);
|
|
||||||
} while ((LockStatus & 0x1) == 1);
|
|
||||||
} else {
|
|
||||||
// Request a lock setup
|
|
||||||
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_LOCK_BLOCK_SETUP);
|
|
||||||
|
|
||||||
// Request an unlock
|
|
||||||
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_UNLOCK_BLOCK);
|
|
||||||
|
|
||||||
// Wait until the status register gives us the all clear
|
|
||||||
do {
|
|
||||||
LockStatus = NorFlashReadStatusRegister (Instance, BlockAddress);
|
|
||||||
} while ((LockStatus & P30_SR_BIT_WRITE) != P30_SR_BIT_WRITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Put device back into Read Array mode
|
// Put device back into Read Array mode
|
||||||
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_READ_ARRAY);
|
SEND_NOR_COMMAND (BlockAddress, 0, P30_CMD_READ_ARRAY);
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
VirtNorFlashFvb.c
|
VirtNorFlashFvb.c
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
@ -66,7 +65,5 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked
|
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiCpuArchProtocolGuid
|
gEfiCpuArchProtocolGuid
|
||||||
|
Reference in New Issue
Block a user