alpine 3.6
obsolete weakness #43


Weakness Breakdown


An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:



The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

static void Set_MPLL(ScrnInfoPtr pScrn)
  ASTRecPtr pAST = ASTPTR(pScrn);
  UCHAR *mmiobase = pAST->MMIOVirtualAddr;
  ULONG addr, data, param;

  /* Reset MMC */
  MOutdwm(mmiobase, 0x1E6E0000,0xFC600309);
  MOutdwm(mmiobase, 0x1E6E0034,0x00020080);
  for(addr = 0x1e6e0004;addr < 0x1e6e0090;){
    MOutdwm(mmiobase, addr, 0x0);
    addr += 4;
  MOutdwm(mmiobase, 0x1E6E0034,0x00020000);

  MOutdwm(mmiobase, 0x1E6E2000, 0x1688A8A8);
  data = MIndwm(mmiobase, 0x1E6E2070) & 0x00800000;
  if(data){                  /* CLKIN = 25MHz */
    param = 0x930023E0;
  }else{					 /* CLKIN = 24MHz */
    param = 0x93002400;
  MOutdwm(mmiobase, 0x1E6E2020, param);

static void DDR3_Init_AST2500(ScrnInfoPtr pScrn, ULONG *ddr_table)
  ASTRecPtr pAST = ASTPTR(pScrn);
  UCHAR *mmiobase = pAST->MMIOVirtualAddr;

  MOutdwm(mmiobase, 0x1E6E0004,0x00000303);
  MOutdwm(mmiobase, 0x1E6E0010,ddr_table[REGIDX_010]);
  MOutdwm(mmiobase, 0x1E6E0014,ddr_table[REGIDX_014]);
  MOutdwm(mmiobase, 0x1E6E0018,ddr_table[REGIDX_018]);
  MOutdwm(mmiobase, 0x1E6E0020,ddr_table[REGIDX_020]);          /* MODEREG4/6 */
  MOutdwm(mmiobase, 0x1E6E0024,ddr_table[REGIDX_024]);          /* MODEREG5 */
  MOutdwm(mmiobase, 0x1E6E002C,ddr_table[REGIDX_02C] | 0x100);  /* MODEREG0/2 */
  MOutdwm(mmiobase, 0x1E6E0030,ddr_table[REGIDX_030]);          /* MODEREG1/3 */

  /* DDR PHY Setting */
  MOutdwm(mmiobase, 0x1E6E0200,0x02492AAE);
  MOutdwm(mmiobase, 0x1E6E0204,0x00001001);
  MOutdwm(mmiobase, 0x1E6E020C,0x55E00B0B);
  MOutdwm(mmiobase, 0x1E6E0210,0x20000000);
  MOutdwm(mmiobase, 0x1E6E0214,ddr_table[REGIDX_214]);
  MOutdwm(mmiobase, 0x1E6E02E0,ddr_table[REGIDX_2E0]);
  MOutdwm(mmiobase, 0x1E6E02E4,ddr_table[REGIDX_2E4]);
  MOutdwm(mmiobase, 0x1E6E02E8,ddr_table[REGIDX_2E8]); 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.