Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static void set_gp_weight ( int  gp_id,
u8  weight 
) [static]

This function sets the weight of general purpose signals

Parameters:
gp_id number of general purpose bit
weight the weight of the general purpose bit

Definition at line 133 of file dvfs_v2.c.

Referenced by init_dvfs_controller().

{
      u32 reg;

      if (gp_id < 9) {
            reg = __raw_readl(MXC_CCM_LTR3);
            reg = (reg & ~(MXC_CCM_LTR3_WSW_MASK(gp_id))) |
                (weight << MXC_CCM_LTR3_WSW_OFFSET(gp_id));
            __raw_writel(reg, MXC_CCM_LTR3);
      } else if (gp_id < 16) {
            reg = __raw_readl(MXC_CCM_LTR2);
            reg = (reg & ~(MXC_CCM_LTR2_WSW_MASK(gp_id))) |
                (weight << MXC_CCM_LTR2_WSW_OFFSET(gp_id));
            __raw_writel(reg, MXC_CCM_LTR2);
      }
}


Generated by  Doxygen 1.6.0   Back to index