mmc: core: Refactor bus speed selection code