Changeset fde2dab9 in mainline for uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c
- Timestamp:
- 2012-11-20T14:57:30Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8138d4f
- Parents:
- bf2a269
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c
rbf2a269 rfde2dab9 179 179 & MPU_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV_MASK); 180 180 if (multiplier && divisor && divisor2) { 181 /** See AMDM37x TRM p. 300 for the formula */ 181 182 const unsigned freq = 182 ((base_freq / divisor) * multiplier) / divisor2; 183 ((base_freq * multiplier) / (divisor + 1)) 184 / divisor2; 183 185 ddf_msg(LVL_NOTE, "MPU running at %d.%d MHz", 184 186 freq / 1000, freq % 1000); … … 238 240 CLOCK_CONTROL_CM_CLKSEL1_PLL_CORE_DPLL_CLKOUT_DIV_GET(reg); 239 241 if (multiplier && divisor && divisor2) { 242 /** See AMDM37x TRM p. 300 for the formula */ 240 243 const unsigned freq = 241 ((base_freq / divisor) * multiplier) / divisor2;244 ((base_freq * multiplier) / (divisor + 1)) / divisor2; 242 245 ddf_msg(LVL_NOTE, "CORE CLK running at %d.%d MHz", 243 246 freq / 1000, freq % 1000); … … 288 291 & CLOCK_CONTROL_CM_CLKEN2_PLL_EN_PERIPH2_DPLL_MASK) 289 292 != CLOCK_CONTROL_CM_CLKEN2_PLL_EN_PERIPH2_DPLL_LOCK) { 290 /* Compute divisors and multiplier */ 293 /* Compute divisors and multiplier 294 * See AMDM37x TRM p. 300 for the formula */ 291 295 assert((base_freq % 100) == 0); 292 296 const unsigned mult = 1200; 293 const unsigned div = base_freq / 100;297 const unsigned div = (base_freq / 100) - 1; 294 298 const unsigned div2 = 1; 295 299
Note:
See TracChangeset
for help on using the changeset viewer.