Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
hmatrix.h File Reference

Go to the source code of this file.

Macros

#define HMATRIX_MCFG(m)   (0x0000 + 4 * (m))
 
#define HMATRIX_MCFG_ULBT_INFINITE   0 /* Infinite length */
 
#define HMATRIX_MCFG_ULBT_SINGLE   1 /* Single Access */
 
#define HMATRIX_MCFG_ULBT_FOUR_BEAT   2 /* Four beat */
 
#define HMATRIX_MCFG_ULBT_EIGHT_BEAT   3 /* Eight beat */
 
#define HMATRIX_MCFG_ULBT_SIXTEEN_BEAT   4 /* Sixteen beat */
 
#define HMATRIX_SCFG(s)   (0x0040 + 4 * (s))
 
#define HMATRIX_SCFG_SLOT_CYCLE(x)   ((x) << 0) /* Max burst cycles */
 
#define HMATRIX_SCFG_DEFMSTR_NONE   ( 0 << 16) /* No default master */
 
#define HMATRIX_SCFG_DEFMSTR_LAST   ( 1 << 16) /* Last def master */
 
#define HMATRIX_SCFG_DEFMSTR_FIXED   ( 2 << 16) /* Fixed def master */
 
#define HMATRIX_SCFG_FIXED_DEFMSTR(m)   ((m) << 18) /* Fixed master ID */
 
#define HMATRIX_SCFG_ARBT_ROUND_ROBIN   ( 0 << 24) /* RR arbitration */
 
#define HMATRIX_SCFG_ARBT_FIXED_PRIO   ( 1 << 24) /* Fixed priority */
 
#define HMATRIX_PRAS(s)   (0x0080 + 8 * (s))
 
#define HMATRIX_PRAS_PRIO(m, p)   ((p) << ((m) * 4))
 
#define HMATRIX_PRBS(s)   (0x0084 + 8 * (s))
 
#define HMATRIX_PRBS_PRIO(m, p)   ((p) << (((m) - 8) * 4))
 
#define HMATRIX_MRCR   0x0100
 
#define HMATRIX_MRCR_REMAP(m)   ( 1 << (m)) /* Remap master m */
 
#define HMATRIX_SFR(s)   (0x0110 + 4 * (s))
 

Functions

void hmatrix_write_reg (unsigned long offset, u32 value)
 
u32 hmatrix_read_reg (unsigned long offset)
 
void hmatrix_sfr_set_bits (unsigned int slave_id, u32 mask)
 
void hmatrix_sfr_clear_bits (unsigned int slave_id, u32 mask)
 

Variables

struct clk at32_hmatrix_clk
 

Macro Definition Documentation

#define HMATRIX_MCFG (   m)    (0x0000 + 4 * (m))

Definition at line 22 of file hmatrix.h.

#define HMATRIX_MCFG_ULBT_EIGHT_BEAT   3 /* Eight beat */

Definition at line 27 of file hmatrix.h.

#define HMATRIX_MCFG_ULBT_FOUR_BEAT   2 /* Four beat */

Definition at line 26 of file hmatrix.h.

#define HMATRIX_MCFG_ULBT_INFINITE   0 /* Infinite length */

Definition at line 24 of file hmatrix.h.

#define HMATRIX_MCFG_ULBT_SINGLE   1 /* Single Access */

Definition at line 25 of file hmatrix.h.

#define HMATRIX_MCFG_ULBT_SIXTEEN_BEAT   4 /* Sixteen beat */

Definition at line 28 of file hmatrix.h.

#define HMATRIX_MRCR   0x0100

Definition at line 49 of file hmatrix.h.

#define HMATRIX_MRCR_REMAP (   m)    ( 1 << (m)) /* Remap master m */

Definition at line 50 of file hmatrix.h.

#define HMATRIX_PRAS (   s)    (0x0080 + 8 * (s))

Definition at line 41 of file hmatrix.h.

#define HMATRIX_PRAS_PRIO (   m,
  p 
)    ((p) << ((m) * 4))

Definition at line 42 of file hmatrix.h.

#define HMATRIX_PRBS (   s)    (0x0084 + 8 * (s))

Definition at line 45 of file hmatrix.h.

#define HMATRIX_PRBS_PRIO (   m,
  p 
)    ((p) << (((m) - 8) * 4))

Definition at line 46 of file hmatrix.h.

#define HMATRIX_SCFG (   s)    (0x0040 + 4 * (s))

Definition at line 31 of file hmatrix.h.

#define HMATRIX_SCFG_ARBT_FIXED_PRIO   ( 1 << 24) /* Fixed priority */

Definition at line 38 of file hmatrix.h.

#define HMATRIX_SCFG_ARBT_ROUND_ROBIN   ( 0 << 24) /* RR arbitration */

Definition at line 37 of file hmatrix.h.

#define HMATRIX_SCFG_DEFMSTR_FIXED   ( 2 << 16) /* Fixed def master */

Definition at line 35 of file hmatrix.h.

#define HMATRIX_SCFG_DEFMSTR_LAST   ( 1 << 16) /* Last def master */

Definition at line 34 of file hmatrix.h.

#define HMATRIX_SCFG_DEFMSTR_NONE   ( 0 << 16) /* No default master */

Definition at line 33 of file hmatrix.h.

#define HMATRIX_SCFG_FIXED_DEFMSTR (   m)    ((m) << 18) /* Fixed master ID */

Definition at line 36 of file hmatrix.h.

#define HMATRIX_SCFG_SLOT_CYCLE (   x)    ((x) << 0) /* Max burst cycles */

Definition at line 32 of file hmatrix.h.

#define HMATRIX_SFR (   s)    (0x0110 + 4 * (s))

Definition at line 53 of file hmatrix.h.

Function Documentation

u32 hmatrix_read_reg ( unsigned long  offset)

hmatrix_read_reg - read HMATRIX configuration register : register offset

Returns the value of the register at .

Definition at line 45 of file hmatrix.c.

void hmatrix_sfr_clear_bits ( unsigned int  slave_id,
u32  mask 
)

hmatrix_sfr_set_bits - clear bits in a slave's Special Function Register : operate on the SFR belonging to this slave : mask of bits to be cleared in the SFR

Definition at line 78 of file hmatrix.c.

void hmatrix_sfr_set_bits ( unsigned int  slave_id,
u32  mask 
)

hmatrix_sfr_set_bits - set bits in a slave's Special Function Register : operate on the SFR belonging to this slave : mask of bits to be set in the SFR

Definition at line 61 of file hmatrix.c.

void hmatrix_write_reg ( unsigned long  offset,
u32  value 
)

hmatrix_write_reg - write HMATRIX configuration register : register offset : value to be written to the register at

Definition at line 31 of file hmatrix.c.

Variable Documentation

struct clk at32_hmatrix_clk

Definition at line 738 of file at32ap700x.c.