mmc: spi: Pull out parts shared between MMC and SPI