@@ -579,6 +579,8 @@ int sec_init_idx(uint8_t sec_idx)
{
ccsr_sec_t *sec = (void *)SEC_ADDR(sec_idx);
uint32_t mcr = sec_in32(&sec->mcfgr);
+ uint32_t jrown_ns;
+ int i;
int ret = 0;
#ifdef CONFIG_FSL_CORENET
@@ -634,6 +636,13 @@ int sec_init_idx(uint8_t sec_idx)
#endif
#endif
+ /* Set ownership of job rings to non-TrustZone mode by default */
+ for (i = 0; i < ARRAY_SIZE(sec->jrliodnr); i++) {
+ jrown_ns = sec_in32(&sec->jrliodnr[i].ms);
+ jrown_ns |= JROWN_NS | JRMID_NS;
+ sec_out32(&sec->jrliodnr[i].ms, jrown_ns);
+ }
+
ret = jr_init(sec_idx);
if (ret < 0) {
printf("SEC initialization failed\n");
@@ -34,6 +34,8 @@
#define JRNSLIODN_MASK 0x0fff0000
#define JRSLIODN_SHIFT 0
#define JRSLIODN_MASK 0x00000fff
+#define JROWN_NS 0x00000008
+#define JRMID_NS 0x00000001
#define JQ_DEQ_ERR -1
#define JQ_DEQ_TO_ERR -2