kl: enable the clocks to UART1 and UART2. The previous version would cause a hard fault on startup due to the modules not being clocked. Also drop the GPIO configuration as it's done during kl_start(). From Michael Hope.

This commit is contained in:
Gregory Nutt 2015-05-07 16:42:27 -06:00
parent 292cb9fe2f
commit 2325f2c529

View File

@ -163,12 +163,16 @@ void kl_lowsetup(void)
putreg32(regval, KL_SIM_SOPT2);
#endif
regval = getreg32(KL_SIM_SCGC5);
regval |= SIM_SCGC5_PORTA;
putreg32(regval, KL_SIM_SCGC5);
regval = getreg32(KL_SIM_SCGC4);
#ifdef CONFIG_KL_UART0
regval |= SIM_SCGC4_UART0;
#endif
#ifdef CONFIG_KL_UART1
regval |= SIM_SCGC4_UART1;
#endif
#ifdef CONFIG_KL_UART2
regval |= SIM_SCGC4_UART2;
#endif
putreg32(regval, KL_SIM_SCGC4);
regval = getreg32(KL_SIM_SOPT2);