diff options
author | Venu Byravarasu <vbyravarasu@nvidia.com> | 2010-08-05 17:37:05 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-08-06 10:56:35 -0700 |
commit | 313ac68a3f78d4bbe728eb499e1faf8720d33d93 (patch) | |
tree | 71737dde6bfc3a22bab59491150cae0074681a95 | |
parent | bd37028a3bb80c4e09b11d9eb4acd67ea175dc9e (diff) |
tegra fuse: correcting error handling
With this change:
1. corrected error handling in case of failures in
FUSE_SET macro.
2. Reverted changes done to make sysfs-read of
SecBootDeviceConfig fuse GfShell compatible.
Tested on Whistler
bug 715134
Change-Id: I7c4b57e6e3abb116e53c1da887d268375ce32a5d
Reviewed-on: http://git-master/r/4805
Tested-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Vinod Atyam <vatyam@nvidia.com>
Tested-by: Vinod Atyam <vatyam@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rwxr-xr-x | arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c b/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c index 4509fbdf2271..8ad5d5ba930f 100755 --- a/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c +++ b/arch/arm/mach-tegra/nvddk/nvddk_fuse_ap20.c @@ -1102,9 +1102,11 @@ NvError NvDdkFuseGet(NvDdkFuseDataType Type, void *pData, NvU32 *pSize) BOOT_DEVICE_INFO, BOOT_DEVICE_CONFIG, RegData); - +/* FixMe: Need to properly fix below code, for matching sysfs read with GfShell. *((NvU8 *)pData) = (RegData >> 0x8) & 0xFF; *((NvU8 *)pData + 1) = RegData & 0xFF; +*/ + *((NvU32 *)pData) = RegData; break; @@ -1296,7 +1298,7 @@ NvError NvDdkFuseSet(NvDdkFuseDataType Type, void *pData, NvU32 *pSize) if (e != NvSuccess) \ {\ NvOsDebugPrintf("\r\n Err returned from Fuse Get:0x%x in Set",e); \ - return e; \ + goto fail; \ }\ /* check consistency between existing and desired fuse values. */ \ /* fuses cannot be unburned, so desired value cannot specify */ \ @@ -1308,7 +1310,7 @@ NvError NvDdkFuseSet(NvDdkFuseDataType Type, void *pData, NvU32 *pSize) e = NvError_InvalidState; \ NvOsDebugPrintf("\n p[%d] = 0x%x, pDataptr[%d] = 0x%x",i, p[i],i,*(NvU32*)pDataPtr); \ NvOsDebugPrintf("\r\n Consistency check failure in Fuse Set:0x%x",e); \ - return e; \ + goto fail; \ } \ /* consistency check passed; schedule fuses to be burned */ \ fusememcpy(&(s_FuseData.name), (void *)pDataPtr, Size); \ |