Sound Open Firmware
Loading...
Searching...
No Matches
mu.h File Reference
Include dependency graph for mu.h:

Go to the source code of this file.

Macros

#define IMX_MU_VERSION   IMX_MU_V1
 
#define IMX_MU_xTRn(x)   (0x00 + 4 * (x))
 
#define IMX_MU_xRRn(x)   (0x10 + 4 * (x))
 
#define IMX_MU_xSR(type, index)   (type == IMX_MU_V2 ? index : 0x20)
 
#define IMX_MU_xSR_GIPn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))
 
#define IMX_MU_xSR_RFn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))
 
#define IMX_MU_xSR_TEn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))
 
#define IMX_MU_xSR_BRDIP   BIT(9)
 
#define IMX_MU_xCR(type, index)   (type == IMX_MU_V2 ? index : 0x24)
 
#define IMX_MU_xCR_GIEn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))
 
#define IMX_MU_xCR_RIEn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))
 
#define IMX_MU_xCR_TIEn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))
 
#define IMX_MU_xCR_GIRn(type, x)   (type == IMX_MU_V2 ? BIT(x) : BIT(16 + (3 - (x))))
 

Enumerations

enum  imx_mu_type { IMX_MU_V1 , IMX_MU_V2 }
 
enum  imx_mu_xcr { IMX_MU_GIER = 0x110 , IMX_MU_GCR = 0x114 , IMX_MU_TCR = 0x120 , IMX_MU_RCR = 0x128 }
 
enum  imx_mu_xsr { IMX_MU_SR = 0x0c , IMX_MU_GSR = 0x118 , IMX_MU_TSR = 0x124 , IMX_MU_RSR = 0x12c }
 

Functions

static uint32_t imx_mu_read (uint32_t reg)
 
static void imx_mu_write (uint32_t val, uint32_t reg)
 
static uint32_t imx_mu_xcr_rmw (int type, int idx, uint32_t set, uint32_t clr)
 
static uint32_t imx_mu_xsr_rmw (int type, int idx, uint32_t set, uint32_t clr)
 

Macro Definition Documentation

◆ IMX_MU_VERSION

#define IMX_MU_VERSION   IMX_MU_V1

◆ IMX_MU_xCR

#define IMX_MU_xCR (   type,
  index 
)    (type == IMX_MU_V2 ? index : 0x24)

◆ IMX_MU_xCR_GIEn

#define IMX_MU_xCR_GIEn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))

◆ IMX_MU_xCR_GIRn

#define IMX_MU_xCR_GIRn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(16 + (3 - (x))))

◆ IMX_MU_xCR_RIEn

#define IMX_MU_xCR_RIEn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))

◆ IMX_MU_xCR_TIEn

#define IMX_MU_xCR_TIEn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))

◆ IMX_MU_xRRn

#define IMX_MU_xRRn (   x)    (0x10 + 4 * (x))

◆ IMX_MU_xSR

#define IMX_MU_xSR (   type,
  index 
)    (type == IMX_MU_V2 ? index : 0x20)

◆ IMX_MU_xSR_BRDIP

#define IMX_MU_xSR_BRDIP   BIT(9)

◆ IMX_MU_xSR_GIPn

#define IMX_MU_xSR_GIPn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(28 + (3 - (x))))

◆ IMX_MU_xSR_RFn

#define IMX_MU_xSR_RFn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(24 + (3 - (x))))

◆ IMX_MU_xSR_TEn

#define IMX_MU_xSR_TEn (   type,
  x 
)    (type == IMX_MU_V2 ? BIT(x) : BIT(20 + (3 - (x))))

◆ IMX_MU_xTRn

#define IMX_MU_xTRn (   x)    (0x00 + 4 * (x))

Enumeration Type Documentation

◆ imx_mu_type

Enumerator
IMX_MU_V1 
IMX_MU_V2 

◆ imx_mu_xcr

enum imx_mu_xcr
Enumerator
IMX_MU_GIER 
IMX_MU_GCR 
IMX_MU_TCR 
IMX_MU_RCR 

◆ imx_mu_xsr

enum imx_mu_xsr
Enumerator
IMX_MU_SR 
IMX_MU_GSR 
IMX_MU_TSR 
IMX_MU_RSR 

Function Documentation

◆ imx_mu_read()

static uint32_t imx_mu_read ( uint32_t  reg)
inlinestatic

◆ imx_mu_write()

static void imx_mu_write ( uint32_t  val,
uint32_t  reg 
)
inlinestatic

◆ imx_mu_xcr_rmw()

static uint32_t imx_mu_xcr_rmw ( int  type,
int  idx,
uint32_t  set,
uint32_t  clr 
)
inlinestatic

◆ imx_mu_xsr_rmw()

static uint32_t imx_mu_xsr_rmw ( int  type,
int  idx,
uint32_t  set,
uint32_t  clr 
)
inlinestatic