spi: core: Protect DMA code by #ifdef CONFIG_HAS_DMA