/* bsec_lock() - manage lock for each type SR/SP/SW @address: address of bsec IP register @otp: otp number (0 - BSEC_OTP_MAX_VALUE) Return: true if locked else false  */
static bool bsec_read_lock(u32 address, u32 otp)
/* bsec_lock() - manage lock for each type SR/SP/SW @address: address of bsec IP register @otp: otp number (0 - BSEC_OTP_MAX_VALUE) Return: true if locked else false  */
static bool bsec_read_lock(u32 address, u32 otp)
{
	u32 bit;
	u32 bank;
	bit = 1 << (otp & OTP_LOCK_MASK);
	bank = ((otp >> OTP_LOCK_BANK_SHIFT) & OTP_LOCK_MASK) * sizeof(u32);
	return !!(readl(address + bank) & bit);
}