warning...

Ed Sutter edsutterjr at gmail.com
Sat Jul 18 13:24:10 UTC 2015


Jarielle,
Just pulled in the patches and built, but there's a warning generated
when cpuio.c is compiled...

 > cpuio.c: In function 'mpu_pll_init':
 > cpuio.c:286:21: warning: 'cm_clksel_dpll_mpu' is used uninitialized in this function [-Wuninitialized]
 >   cm_clksel_dpll_mpu &= ~0x0007FF7F;

Without digging in too deep, it looks like a typo.
Line 285 should be initializing cm_clksel_dpll_mpu instead of cmclkmode_dpll_mpu...

     // Set the ARM core frequency to 1 GHz
     cm_clkmode_dpll_mpu = CM_WKUP_REG(CM_CLKSEL_DPLL_MPU);
     cm_clksel_dpll_mpu &= ~0x0007FF7F; <<<<<This is line 286
     cm_clksel_dpll_mpu |= 1000 << 8;
     cm_clksel_dpll_mpu |= 23;
     CM_WKUP_REG(CM_CLKSEL_DPLL_MPU) = cm_clksel_dpll_mpu;
     cm_div_m2_dpll_mpu = CM_WKUP_REG(CM_DIV_M2_DPLL_MPU);
     cm_div_m2_dpll_mpu &= ~0x0000001F;
     cm_div_m2_dpll_mpu |= 0x00000001;
     CM_WKUP_REG(CM_DIV_M2_DPLL_MPU) = cm_div_m2_dpll_mpu;


Assuming you have the same set of tools I have (from RTEMS), then you probably missed
the warning because it streamed off your screen quickly (it was at the top of the build
output).  To avoid that problem, just pipe all make output to a file...

make rebuild 2>&1 | tee make.out

Then grep for "arning" in the make.out file or just open the file and check it visually.

Lemme know if my above assumption is true.  If yes, I'll just make the change as
part of this push.
Ed




More information about the umon-devel mailing list