]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/spi/mxs_spi.c
mxs: mmc: spi: dma: Better wrap the MXS differences
[karo-tx-uboot.git] / drivers / spi / mxs_spi.c
index bb865b7f4c30eb71f9dfda6b5e4c277e8b7717b7..6acc95a1b4cf13309661be4169b1d733fbe7889a 100644 (file)
@@ -70,7 +70,7 @@ void spi_init(void)
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
        /* MXS SPI: 4 ports and 3 chip selects maximum */
-       if (bus > 3 || cs > 2)
+       if (!mxs_ssp_bus_id_valid(bus) || cs > 2)
                return 0;
        else
                return 1;
@@ -92,7 +92,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
        if (!mxs_slave)
                return NULL;
 
-       if (mxs_dma_init_channel(bus))
+       if (mxs_dma_init_channel(MXS_DMA_CHANNEL_AHB_APBH_SSP0 + bus))
                goto err_init;
 
        mxs_slave->slave.bus = bus;