File tree Expand file tree Collapse file tree 5 files changed +12
-9
lines changed
ip_templates/otp_ctrl/util
top_darjeeling/ip_autogen/otp_ctrl/util
top_earlgrey/ip_autogen/otp_ctrl/util
sw/device/silicon_creator Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class OtpCtrlExt(Extension):
5252
5353 OTP_PARTITION_INFO_STRUCT_START_ADDR_FIELD_NAME = Name (["start" , "addr" ])
5454 OTP_PARTITION_INFO_STRUCT_SIZE_FIELD_NAME = Name (["size" ])
55- OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "addr " ])
55+ OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "reg" , "offset " ])
5656 OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME = Name (["align" , "mask" ])
5757 OTP_PARTITION_INFO_STRUCT_NAME = Name .from_snake_case ("dt_otp_partition_info" )
5858
@@ -82,7 +82,8 @@ def __init__(self, ip_helper: IpHelper):
8282 self ._otp_partition_info_struct .add_field (
8383 name = self .OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME ,
8484 field_type = ScalarType ("uint32_t" ),
85- docstring = "The absolute OTP address at which this partition's digest starts" ,
85+ docstring = "The OTP digest CSR (where the digest is buffered) offset for " +
86+ "this partition." ,
8687 )
8788 self ._otp_partition_info_struct .add_field (
8889 name = self .OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class OtpCtrlExt(Extension):
5252
5353 OTP_PARTITION_INFO_STRUCT_START_ADDR_FIELD_NAME = Name (["start" , "addr" ])
5454 OTP_PARTITION_INFO_STRUCT_SIZE_FIELD_NAME = Name (["size" ])
55- OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "addr " ])
55+ OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "reg" , "offset " ])
5656 OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME = Name (["align" , "mask" ])
5757 OTP_PARTITION_INFO_STRUCT_NAME = Name .from_snake_case ("dt_otp_partition_info" )
5858
@@ -82,7 +82,8 @@ def __init__(self, ip_helper: IpHelper):
8282 self ._otp_partition_info_struct .add_field (
8383 name = self .OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME ,
8484 field_type = ScalarType ("uint32_t" ),
85- docstring = "The absolute OTP address at which this partition's digest starts" ,
85+ docstring = "The OTP digest CSR (where the digest is buffered) offset for " +
86+ "this partition." ,
8687 )
8788 self ._otp_partition_info_struct .add_field (
8889 name = self .OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class OtpCtrlExt(Extension):
5252
5353 OTP_PARTITION_INFO_STRUCT_START_ADDR_FIELD_NAME = Name (["start" , "addr" ])
5454 OTP_PARTITION_INFO_STRUCT_SIZE_FIELD_NAME = Name (["size" ])
55- OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "addr " ])
55+ OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME = Name (["digest" , "reg" , "offset " ])
5656 OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME = Name (["align" , "mask" ])
5757 OTP_PARTITION_INFO_STRUCT_NAME = Name .from_snake_case ("dt_otp_partition_info" )
5858
@@ -82,7 +82,8 @@ def __init__(self, ip_helper: IpHelper):
8282 self ._otp_partition_info_struct .add_field (
8383 name = self .OTP_PARTITION_INFO_STRUCT_DIGEST_ADDR_FIELD_NAME ,
8484 field_type = ScalarType ("uint32_t" ),
85- docstring = "The absolute OTP address at which this partition's digest starts" ,
85+ docstring = "The OTP digest CSR (where the digest is buffered) offset for " +
86+ "this partition." ,
8687 )
8788 self ._otp_partition_info_struct .add_field (
8889 name = self .OTP_PARTITION_INFO_STRUCT_ALIGN_MASK_FIELD_NAME ,
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ dt_otp_partition_info_t otp_readable_partition_info(otp_partition_t partition) {
5656
5757uint64_t otp_partition_digest_read (otp_partition_t partition ) {
5858 uint32_t reg_offset =
59- otp_ctrl_base () + otp_readable_partition_info (partition ).digest_addr ;
59+ otp_ctrl_base () + otp_readable_partition_info (partition ).digest_reg_offset ;
6060 uint64_t value = sec_mmio_read32 (reg_offset + sizeof (uint32_t ));
6161 value <<= 32 ;
6262 value |= sec_mmio_read32 (reg_offset );
Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ bool test_main(void) {
4646 otp_dai_read (
4747 kOtpPartitionCreatorSwCfg ,
4848 /*relative_address=*/
49- otp_readable_partition_info (kOtpPartitionCreatorSwCfg ).digest_addr -
49+ otp_readable_partition_info (kOtpPartitionCreatorSwCfg ).digest_reg_offset -
5050 OTP_CTRL_PARAM_CREATOR_SW_CFG_OFFSET ,
5151 otp_state ,
5252 /*num_words=*/ 2 );
5353 otp_dai_read (
5454 kOtpPartitionOwnerSwCfg ,
5555 /*relative_address=*/
56- otp_readable_partition_info (kOtpPartitionOwnerSwCfg ).digest_addr -
56+ otp_readable_partition_info (kOtpPartitionOwnerSwCfg ).digest_reg_offset -
5757 OTP_CTRL_PARAM_OWNER_SW_CFG_OFFSET ,
5858 & otp_state [2 ],
5959 /*num_words=*/ 2 );
You can’t perform that action at this time.
0 commit comments