IPMUX1IPMUX2IPMUX3: opl_hw_ops.h源文件

RTL96xx (RTL9607,...)

opl_hw_ops.h

浏览该文件的文档。
00001 #ifndef _OPL_HW_H_
00002 #define _OPL_HW_H_
00003 
00020 /*--------------------------Macro definition------------------------- */
00021 #define IPMUX_REG_BASE                  0xBF000000      /* default IPMux register address space */
00022 
00023 
00024 
00025 
00031 /*--------------------------type definition------------------------- */
00032 
00033 
00034 
00035 
00036 
00042 /*-----------------global varible/function declaration--------------- */
00043 
00044 
00045 
00046 
00047 
00053 /*-------------------local  function declaration---------------------- */
00054 
00055 
00056 
00057 
00058 
00065 /*--------------local  variable declaration and definition------------- */
00066 
00067 
00068 
00069 
00070 
00077 /*------------------global variable and function exported-------------- */
00078 
00079 
00080 
00081 
00082 
00090 /*----------------------local  function definition--------------------- */
00091 
00092 #define IPMUX_REG_ID2ADDR(regId)        ((u32)IPMUX_REG_BASE + (u32)(regId))
00093 #define IPMUX_REG_ADDR2ID(addr)         ((u32)(addr) - (u32)IPMUX_REG_BASE)
00094 
00095 static inline int ipMuxRegRead(u32 regID, volatile u32 *pval)
00096 {
00097   if (regID % 4 != 0)
00098     return -1;
00099 
00100   *(u32*)(pval) = *(volatile u32 *)IPMUX_REG_ID2ADDR(regID);
00101 
00102   return 0;
00103 }
00104 
00105 static inline int ipMuxRegWrite(u32 regID, u32 val)
00106 {
00107   if (regID % 4 != 0)
00108     return -1;
00109 
00110   *((volatile u32 *)IPMUX_REG_ID2ADDR(regID)) = (u32)(val);
00111 
00112   return 0;
00113 }
00114 
00115 
00116 
00117 
00120 #endif/* _OPL_HW_H_ */

Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by  doxygen 1.3.9.1