mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
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:
@@ -163,12 +163,16 @@ void kl_lowsetup(void)
|
|||||||
putreg32(regval, KL_SIM_SOPT2);
|
putreg32(regval, KL_SIM_SOPT2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
regval = getreg32(KL_SIM_SCGC5);
|
|
||||||
regval |= SIM_SCGC5_PORTA;
|
|
||||||
putreg32(regval, KL_SIM_SCGC5);
|
|
||||||
|
|
||||||
regval = getreg32(KL_SIM_SCGC4);
|
regval = getreg32(KL_SIM_SCGC4);
|
||||||
|
#ifdef CONFIG_KL_UART0
|
||||||
regval |= SIM_SCGC4_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);
|
putreg32(regval, KL_SIM_SCGC4);
|
||||||
|
|
||||||
regval = getreg32(KL_SIM_SOPT2);
|
regval = getreg32(KL_SIM_SOPT2);
|
||||||
|
|||||||
Reference in New Issue
Block a user