10#ifndef __SOF_DRIVERS_MU_H__
11#define __SOF_DRIVERS_MU_H__
22#if defined(CONFIG_IMX8ULP) || defined(CONFIG_IMX93_A55) || defined(CONFIG_IMX95)
23#define IMX_MU_VERSION IMX_MU_V2
25#define IMX_MU_VERSION IMX_MU_V1
42#if defined(CONFIG_IMX8ULP) || defined(CONFIG_IMX93_A55)
44#define IMX_MU_xTRn(x) (0x200 + 4 * (x))
46#define IMX_MU_xRRn(x) (0x280 + 4 * (x))
50#define IMX_MU_xTRn(x) (0x00 + 4 * (x))
52#define IMX_MU_xRRn(x) (0x10 + 4 * (x))
56#define IMX_MU_xSR(type, index) (type == IMX_MU_V2 ? index : 0x20)
57#define IMX_MU_xSR_GIPn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))
58#define IMX_MU_xSR_RFn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))
59#define IMX_MU_xSR_TEn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))
60#define IMX_MU_xSR_BRDIP BIT(9)
63#define IMX_MU_xCR(type, index) (type == IMX_MU_V2 ? index : 0x24)
65#define IMX_MU_xCR_GIEn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))
67#define IMX_MU_xCR_RIEn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))
69#define IMX_MU_xCR_TIEn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))
71#define IMX_MU_xCR_GIRn(type, x) (type == IMX_MU_V2 ? BIT(x) : BIT(16 + (3 - (x))))
75 return *((
volatile uint32_t*)(MU_BASE + reg));
80 *((
volatile uint32_t*)(MU_BASE + reg)) = val;
85 volatile uint32_t val;
97 volatile uint32_t val;
static void imx_mu_write(uint32_t val, uint32_t reg)
Definition mu.h:78
imx_mu_xsr
Definition mu.h:35
@ IMX_MU_RSR
Definition mu.h:39
@ IMX_MU_TSR
Definition mu.h:38
@ IMX_MU_SR
Definition mu.h:36
@ IMX_MU_GSR
Definition mu.h:37
#define IMX_MU_xCR(type, index)
Definition mu.h:63
imx_mu_type
Definition mu.h:17
@ IMX_MU_V2
Definition mu.h:19
@ IMX_MU_V1
Definition mu.h:18
imx_mu_xcr
Definition mu.h:28
@ IMX_MU_GIER
Definition mu.h:29
@ IMX_MU_RCR
Definition mu.h:32
@ IMX_MU_GCR
Definition mu.h:30
@ IMX_MU_TCR
Definition mu.h:31
static uint32_t imx_mu_xsr_rmw(int type, int idx, uint32_t set, uint32_t clr)
Definition mu.h:95
#define IMX_MU_xSR(type, index)
Definition mu.h:56
static uint32_t imx_mu_xcr_rmw(int type, int idx, uint32_t set, uint32_t clr)
Definition mu.h:83
static uint32_t imx_mu_read(uint32_t reg)
Definition mu.h:73
uint32_t type
Definition tlv.h:0