summaryrefslogtreecommitdiff
path: root/src/t20/nvbctlib_t20.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/t20/nvbctlib_t20.c')
-rw-r--r--src/t20/nvbctlib_t20.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/t20/nvbctlib_t20.c b/src/t20/nvbctlib_t20.c
index 91fe9e6..6576011 100644
--- a/src/t20/nvbctlib_t20.c
+++ b/src/t20/nvbctlib_t20.c
@@ -96,6 +96,21 @@ default : \
token, __LINE__); \
return 1
+parse_token t20_root_token_list[] = {
+ token_boot_data_version,
+ token_block_size_log2,
+ token_page_size_log2,
+ token_partition_size,
+ token_odm_data,
+ token_bootloader_used,
+ token_bootloaders_max,
+ token_bct_size,
+ token_hash_size,
+ token_crypto_offset,
+ token_crypto_length,
+ token_max_bct_search_blks
+};
+
int
t20_set_dev_param(build_image_context *context,
u_int32_t index,
@@ -618,6 +633,17 @@ t20_bct_set_data(parse_token id,
return 0;
}
+int t20_bct_token_supported(parse_token token)
+{
+ int index;
+
+ for (index = 0; index < ARRAY_SIZE(t20_root_token_list); index++)
+ if (t20_root_token_list[index] == token)
+ return 1;
+
+ return 0;
+}
+
void t20_init_bad_block_table(build_image_context *context)
{
u_int32_t bytes_per_entry;
@@ -651,6 +677,7 @@ cbootimage_soc_config tegra20_config = {
.set_value = t20_bct_set_value,
.get_value = t20_bct_get_value,
.set_data = t20_bct_set_data,
+ .token_supported = t20_bct_token_supported,
.devtype_table = s_devtype_table_t20,
.sdmmc_data_width_table = s_sdmmc_data_width_table_t20,