arch: i.MX add RDC peripheral permission setting for applications cores

This patch adds the RDC (Resource Domain Controller) peripheral
permissions settings for the i.MX applications cores (Cortex A9 on
i.MX6 and Cortex A7 on i.MX7).

This will enable both Linux (on application's core) and Zephyr (on M4
core) to share the peripherals and coexist.

The settings are defined at devicetree level and applied in the soc.c.

A complete solution should involve the SEMA4 to control the peripherals
access and prevent resource deadlocking and misusage.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
This commit is contained in:
Diego Sueiro 2018-08-08 17:11:21 +01:00 committed by Maureen Helm
commit 9283ee7acc
13 changed files with 217 additions and 98 deletions

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2018, Diego Sueiro
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __IMX_RDC_H
#define __IMX_RDC_H
#define A7_DOMAIN_ID 0
#define A9_DOMAIN_ID 0
#define M4_DOMAIN_ID 1
#define RDC_DOMAIN_PERM_NONE (0x0)
#define RDC_DOMAIN_PERM_W (0x1)
#define RDC_DOMAIN_PERM_R (0x2)
#define RDC_DOMAIN_PERM_RW (RDC_DOMAIN_PERM_W|RDC_DOMAIN_PERM_R)
#define RDC_DOMAIN_PERM(domain, perm) (perm << (domain * 2))
#endif /* __IMX_RDC_H */