cc2538: spi: Bug fix and various improvements