Changeset 0f2c80a in mainline
- Timestamp:
- 2012-11-22T12:54:38Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ab362c
- Parents:
- c739102
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/rootamdm37x/amdm37x.c
rc739102 r0f2c80a 271 271 /* Compute divisors and multiplier 272 272 * See AMDM37x TRM p. 300 for the formula */ 273 assert((base_freq % 100) == 0); 274 const unsigned mult = 1200; 275 const unsigned div = (base_freq / 100) - 1; 273 // TODO: base_freq does not have to be rounded to Mhz 274 // (that's why I used KHz as unit). 275 const unsigned mult = 120; 276 const unsigned div = (base_freq / 1000) - 1; 276 277 const unsigned div2 = 1; 278 if ( ((base_freq % 1000) != 0) || (div > 127)) { 279 ddf_msg(LVL_ERROR, "Rounding error, or divisor to big " 280 "freq: %d, div: %d", base_freq, div); 281 return; 282 }; 283 assert(div <= 127); 277 284 278 285 /* Set multiplier */
Note:
See TracChangeset
for help on using the changeset viewer.