Coldfire: M5271: Allow board header file to specify clock multiplier
PATCH 4/7 Coldfire: M5271: Allow board header file to specify clock multiplier
M5271 dynamic clock multiplier. It is currently fixed at 100MHz.
Allow the board header file to set their own multiplier and divider. Added the #define for the multiplier and divider to the cpu header file.
Signed-off-by Richard Retanubun <[email protected]>
--- cpu/mcf52x2/cpu_init.c | 7 +++++- include/asm-m68k/m5271.h | 53 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 3 deletions(-)
cpu/mcf52x2/cpu_init.c +6 -1
@@ -181,9 +181,14 @@ void cpu_init_f(void)/* FlexBus Chipselect */ init_fbcs (); +#ifdef CONFIG_SYS_MCF_SYNCR +/* Set clockspeed according to board header file */ +mbar_writeLong (MCF_FMPLL_SYNCR ,CONFIG_SYS_MCF_SYNCR ); +#else /* Set clockspeed to 100MHz */ -mbar_writeShort (MCF_FMPLL_SYNCR , +mbar_writeLong (MCF_FMPLL_SYNCR ,MCF_FMPLL_SYNCR_MFD (0 ) |MCF_FMPLL_SYNCR_RFD (0 )); +#endif while (!mbar_readByte (MCF_FMPLL_SYNSR ) &MCF_FMPLL_SYNSR_LOCK ) ; }
include/asm-m68k/m5271.h +51 -2
76 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH 4/7 Coldfire: M5271: Allow board header file to specify clock multiplier
M5271 dynamic clock multiplier. It is currently fixed at 100MHz.
Allow the board header file to set their own multiplier and divider. Added the #define for the multiplier and divider to the cpu header file.
Signed-off-by Richard Retanubun <[email protected]>
--- cpu/mcf52x2/cpu_init.c | 7 +++++- include/asm-m68k/m5271.h | 53 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 3 deletions(-)
cpu/mcf52x2/cpu_init.c +6 -1
@@ -181,9 +181,14 @@ void cpu_init_f(void)/* FlexBus Chipselect */ init_fbcs (); +#ifdef CONFIG_SYS_MCF_SYNCR +/* Set clockspeed according to board header file */ +mbar_writeLong (MCF_FMPLL_SYNCR ,CONFIG_SYS_MCF_SYNCR ); +#else /* Set clockspeed to 100MHz */ -mbar_writeShort (MCF_FMPLL_SYNCR , +mbar_writeLong (MCF_FMPLL_SYNCR ,MCF_FMPLL_SYNCR_MFD (0 ) |MCF_FMPLL_SYNCR_RFD (0 )); +#endif while (!mbar_readByte (MCF_FMPLL_SYNSR ) &MCF_FMPLL_SYNSR_LOCK ) ; }
include/asm-m68k/m5271.h +51 -2
76 lines not on this page · raw message
Signature · 1 line
1.5.6.5