altos/lpc: Reset SPI device at startup time
[fw/altos] / src / lpc / ao_spi_lpc.c
index ff107e40dd0339fb01eed124f30c282116e1bf7a..c3587698e1d26f55ac1b7b583b2ab76f7707b6ed 100644 (file)
@@ -199,7 +199,8 @@ ao_spi_init(void)
        /* Turn on the clock */
        lpc_scb.ssp1clkdiv = 1;
 
-       /* De-assert reset */
+       /* Reset the device */
+       lpc_scb.presetctrl &= ~(1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
        lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
        ao_spi_channel_init(1);
 #endif /* HAS_SPI_1 */