summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVinod Atyam <vatyam@nvidia.com>2010-06-15 22:08:20 +0530
committerGary King <gking@nvidia.com>2010-06-29 21:53:05 -0700
commit0a2530f2dbffc846ff403703af1e632a924e1653 (patch)
treeb0bc47cebd34980f2c1812fb7d116f081f464ed4 /arch
parent1677860ec9e0afefcdb2effba81e4b4f7fcb7787 (diff)
[ARM/tegra]:Fuse alignment for SecBootDeviceConfig
1)Value of SecBootDeviceConfig fuse was reversed when read the value from sysfs interface. This is corrected now. 2)SecBootDeviceConfig fuse size was returning 4 bytes which is not correct. It is modified to 2 bytes now. Bug 691945 Change-Id: Ia1ff7e485b5acb28dc6841787b11052f489e7ccb Reviewed-on: http://git-master/r/2668 Reviewed-by: Andy Carman <acarman@nvidia.com> Tested-by: Vinod Atyam <vatyam@nvidia.com> Reviewed-by: Kaushik Sen <ksen@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rwxr-xr-x[-rw-r--r--]arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c b/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c
index 804be01ddf89..4509fbdf2271 100644..100755
--- a/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c
+++ b/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c
@@ -169,7 +169,7 @@ static NvU32 s_DataSize[] =
sizeof(NvBool), // FuseDataType_JtagDisable
sizeof(NvBool), // FuseDataType_KeyProgrammed
sizeof(NvBool), // FuseDataType_OdmProductionEnable
- sizeof(NvU32), // FuseDataType_SecBootDeviceConfig
+ sizeof(NvU16), // FuseDataType_SecBootDeviceConfig
sizeof(NvU32), // FuseDataType_SecBootDeviceSelect
NVDDK_SECURE_BOOT_KEY_BYTES, // FuseDataType_SecureBootKey
sizeof(NvU32), // FuseDataType_Sku
@@ -1099,11 +1099,13 @@ NvError NvDdkFuseGet(NvDdkFuseDataType Type, void *pData, NvU32 *pSize)
case NvDdkFuseDataType_SecBootDeviceConfig:
RegData = FUSE_NV_READ32(FUSE_BOOT_DEVICE_INFO_0);
RegData = NV_DRF_VAL(FUSE,
- BOOT_DEVICE_INFO,
- BOOT_DEVICE_CONFIG,
- RegData);
+ BOOT_DEVICE_INFO,
+ BOOT_DEVICE_CONFIG,
+ RegData);
+
+ *((NvU8 *)pData) = (RegData >> 0x8) & 0xFF;
+ *((NvU8 *)pData + 1) = RegData & 0xFF;
- *((NvU32*)pData) = RegData;
break;
case NvDdkFuseDataType_SecBootDeviceSelect: