forked from Imagelibrary/rtems
bsp/mpc55xx: Add MPC55XX_SYSTEM_CLOCK_DIVIDER
This commit is contained in:
@@ -73,6 +73,11 @@ RTEMS_BSPOPTS_SET([MPC55XX_FMPLL_MFD],[*] ,[12])
|
||||
RTEMS_BSPOPTS_HELP([MPC55XX_FMPLL_MFD],
|
||||
[Must be defined to be the PLL multiplication factor for clock generation])
|
||||
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK_DIVIDER],[mpc5674f*],[2])
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_SYSTEM_CLOCK_DIVIDER],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([MPC55XX_SYSTEM_CLOCK_DIVIDER],
|
||||
[system clock divider])
|
||||
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_EMIOS_PRESCALER],[gwlcfm],[66])
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_EMIOS_PRESCALER],[mpc5643l*],[])
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_EMIOS_PRESCALER],[*] ,[1])
|
||||
|
||||
@@ -83,6 +83,9 @@
|
||||
generation */
|
||||
#undef MPC55XX_REFERENCE_CLOCK
|
||||
|
||||
/* system clock divider */
|
||||
#undef MPC55XX_SYSTEM_CLOCK_DIVIDER
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
||||
@@ -95,11 +95,6 @@ void bsp_start(void)
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
ppc_cpu_id_t myCpu;
|
||||
ppc_cpu_revision_t myCpuRevision;
|
||||
#if defined(MPC55XX_BOARD_MPC5674FEVB)
|
||||
unsigned system_clock_divider = 2;
|
||||
#else
|
||||
unsigned system_clock_divider = 1;
|
||||
#endif
|
||||
|
||||
null_pointer_protection();
|
||||
|
||||
@@ -119,7 +114,7 @@ void bsp_start(void)
|
||||
/*
|
||||
* determine clock speed
|
||||
*/
|
||||
bsp_clock_speed = mpc55xx_get_system_clock() / system_clock_divider;
|
||||
bsp_clock_speed = mpc55xx_get_system_clock() / MPC55XX_SYSTEM_CLOCK_DIVIDER;
|
||||
|
||||
/* Time reference value */
|
||||
bsp_clicks_per_usec = bsp_clock_speed / 1000000;
|
||||
|
||||
Reference in New Issue
Block a user