We look at the out_done value, but not the in_done value; if we use
the radio DMA for out, we would have to use ao_radio_dma_done to check
for completion. This way, we can ignore that value and use the
existing ao_aes_dma_out_done value.
Signed-off-by: Keith Packard <keithp@keithp.com>
void
ao_aes_init(void)
{
- ao_aes_dma_in = ao_dma_alloc(&ao_aes_dma_in_done);
#if DMA_SHARE_AES_RADIO
- ao_aes_dma_out = ao_radio_dma;
+ ao_aes_dma_in = ao_radio_dma;
#else
- ao_aes_dma_out = ao_dma_alloc(&ao_aes_dma_out_done);
+ ao_aes_dma_in = ao_dma_alloc(&ao_aes_dma_in_done);
#endif
+ ao_aes_dma_out = ao_dma_alloc(&ao_aes_dma_out_done);
S0CON = 0;
ENCIE = 1;
}