altos: Move SPI functions to architecture-specific location