stm32f1: SPI: implement speed setting properly