unsigned long offset = 0x2000;
const int iram_size = 0x10000;
const int dram_size = 0x8000;
+ const char *s;
if (argc > 2) {
address = simple_strtoul(argv[2], NULL, 0);
if (argc > 3)
offset = simple_strtoul(argv[3], NULL, 0);
- } else
+ } else {
printf("Missing address\n");
+ }
printf("Loading hdp firmware from 0x%016lx offset 0x%016lx\n",
- address, offset);
+ address, offset);
display_set_power(SC_PM_PW_MODE_ON);
display_set_clocks();
display_enable_clocks(ON);
(unsigned char *)(address + offset +
iram_size),
dram_size);
+
+ s = env_get("hdp_authenticate_fw");
+ if (s && !strcmp(s, "yes"))
+ SC_MISC_AUTH(-1, SC_MISC_SECO_AUTH_HDMI_TX_FW, 0);
+
display_enable_clocks(OFF);
printf("Loading hdp firmware Complete\n");
+
/* do not turn off hdmi power or firmware load will be lost */
} else {
printf("test error argc %d\n", argc);
return 0;
}
-/***************************************************/
+/***************************************************/
U_BOOT_CMD(
hdp, CONFIG_SYS_MAXARGS, 1, do_hdp,
"load hdmi firmware ",
"hdpload [address] [<offset>]\n"
" address - address where the binary image starts\n"
" <offset> - IRAM offset in the binary image (8192 default)\n"
+ "\n"
+ " if \"hdp_authenticate_fw\" is set to \"yes\", the seco\n"
+ " will authenticate the firmware and load HDCP keys.\n"
+ "\n"
"tracescfw - Trace SCFW API calls for video commands\n"
);
unsigned long offset = 0x2000;
const int iram_size = 0x10000;
const int dram_size = 0x8000;
+ const char *s;
if (argc > 2) {
address = simple_strtoul(argv[2], NULL, 0);
if (argc > 3)
offset = simple_strtoul(argv[3], NULL, 0);
- } else
+ } else {
printf("Missing address\n");
+ }
- printf("Loading hdp rx firmware from 0x%016lx offset 0x%016lx\n",
- address, offset);
+ printf("Loading hdprx firmware from 0x%016lx offset 0x%016lx\n",
+ address, offset);
hdmi_rx_set_power(SC_PM_PW_MODE_ON);
hdp_rx_loadfirmware((unsigned char *)(address + offset),
- iram_size,
- (unsigned char *)(address + offset +
- iram_size),
- dram_size);
+ iram_size,
+ (unsigned char *)(address + offset +
+ iram_size),
+ dram_size);
+
+ s = env_get("hdprx_authenticate_fw");
+ if (s && !strcmp(s, "yes"))
+ SC_MISC_AUTH(-1, SC_MISC_SECO_AUTH_HDMI_RX_FW, 0);
printf("Loading hdp rx firmware Complete\n");
/* do not turn off hdmi power or firmware load will be lost */
} else {
return 0;
}
-/***************************************************/
+/***************************************************/
U_BOOT_CMD(
hdprx, CONFIG_SYS_MAXARGS, 1, do_hdprx,
"load hdmi rx firmware ",
"hdpload [address] [<offset>]\n"
" address - address where the binary image starts\n"
" <offset> - IRAM offset in the binary image (8192 default)\n"
+ "\n"
+ " if \"hdprx_authenticate_fw\" is set to \"yes\", the seco\n"
+ " will authenticate the firmware and load HDCP keys.\n"
+ "\n"
"tracescfw - Trace SCFW API calls for video commands\n"
);
__LINE__, _res_str, __enable__, _ret);\
} while (0)
+#define SC_MISC_AUTH(__ipcHndl__, __cmd__, __addr__) \
+do { \
+ sc_err_t _ret; \
+ if (g_debug_scfw) \
+ printf("(%4d) sc_misc_seco_authenticate -> cmd %d addr %d\n",\
+ __LINE__, __cmd__, __addr__);\
+ _ret = sc_seco_authenticate(__ipcHndl__, __cmd__, __addr__); \
+ if (_ret != SC_ERR_NONE) \
+ printf("(%4d)>> sc_misc_seco_authenticate cmd %d addr %d (error = %d)\n", \
+ __LINE__, __cmd__, __addr__, _ret); \
+} while (0)
+
#endif /*_SCFW_UTILS_H_ */