Changeset 0130f653 in rtems
- Timestamp:
- Sep 13, 2005, 1:13:34 PM (15 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 4a243b5
- Parents:
- b5496de
- Location:
- c/src/lib/libcpu/powerpc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/powerpc/ChangeLog
rb5496de r0130f653 1 2005-09-12 Thomas Doerfler <Thomas.Doerfler@imd-systems.de> 2 3 PR 527/bsps 4 PR 822/bsps 5 * mpc8xx/clock/clock.c: Currently the MBX8xx BSP does not boot, 6 because some logical errors are in the startup code. Additionally, 7 the mpc8xx shared clock driver does not support the clocking scheme 8 of some of the board variants, which are clocked from a 32768Hz (!) 9 external crystal. 10 1 11 2005-08-12 Phil Torre <ptorre@zetron.com> 2 12 -
c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
rb5496de r0130f653 72 72 unsigned desiredLevel; 73 73 uint32_t pit_value; 74 75 pit_value = (rtems_configuration_get_microseconds_per_tick() * 76 rtems_cpu_configuration_get_clicks_per_usec()) - 1 ; 77 74 rtems_unsigned32 mf_value; 75 rtems_unsigned32 extclk_value; 76 rtems_boolean force_prescaler = FALSE; 77 if (rtems_cpu_configuration_get_clicks_per_usec() == 0) { 78 /* 79 * oscclk is too low for PIT, compute extclk and derive PIT from there 80 */ 81 mf_value = m8xx.plprcr >> 20; 82 pit_value = (_CPU_Table.clock_speed 83 / (mf_value+1) 84 / 1000 85 / 4 86 * rtems_configuration_get_microseconds_per_tick() 87 / 1000); 88 m8xx.sccr |= (1<<23); 89 force_prescaler = TRUE; 90 } 91 else { 92 pit_value = (rtems_configuration_get_microseconds_per_tick() * 93 rtems_cpu_configuration_get_clicks_per_usec()); 94 95 m8xx.sccr &= ~(1<<23); 96 } 97 if ((pit_value > 0xffff) || force_prescaler){ 98 /* 99 * try to activate prescaler 100 * NOTE: divider generates odd values now... 101 */ 102 pit_value = pit_value / 128; 103 m8xx.sccr |= (1<<24); 104 } 105 else { 106 m8xx.sccr &= ~(1<<24); 107 } 108 78 109 if (pit_value > 0xffff) { /* pit is only 16 bits long */ 79 110 rtems_fatal_error_occurred(-1); 80 111 } 81 m8xx.sccr &= ~(1<<24); 82 m8xx.pitc = pit_value; 112 m8xx.pitc = pit_value - 1; 83 113 84 114 desiredLevel = BSP_get_clock_irq_level();
Note: See TracChangeset
for help on using the changeset viewer.