Hello,
After taking a look at the AR9331 datasheet I see that the UART lines (GPIO 9/10) can be reprogrammed to be extra chip selects for the SPI controller. I have an SPI peripheral I would like to connect and the bandwidth required makes bit-banging impractical.
I see I need to modify some bits in 0x18040028 to disable the UART and enable the extra CS. Also, I need to set the appropriate bit in SPI control register at 0x1F000008 to select my peripheral and deselect the flash.
My question is, if my process gets pre-empted during a data transfer, I need to make sure the flash is selected again by writing the old value back into 0x1F000008 before something else tries to access the flash and causes a kernel panic. How do I go about doing that?
Thanks!