/* Check the peripheral read / write access permission on Domain .  */
int imx_rdc_check_permission(int per_id, int dom_id)
/* Check the peripheral read / write access permission on Domain .  */
int imx_rdc_check_permission(int per_id, int dom_id)
{
	struct rdc_regs *imx_rdc = (struct rdc_regs *)RDC_BASE_ADDR;
	u32 reg;
	reg = readl(&imx_rdc->pdap[per_id]);
	if (!(reg & RDC_PDAP_DRW_MASK(dom_id)))
		return -EACCES;
	return 0;
}