Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-03 Thread Ulf Hansson
On Thu, 3 Sep 2020 at 02:41, Rich Felker wrote: > > On Wed, Sep 02, 2020 at 05:51:16PM +0200, Geert Uytterhoeven wrote: > > Hi Rich, > > > > On Wed, Sep 2, 2020 at 5:43 PM Rich Felker wrote: > > > On Wed, Sep 02, 2020 at 10:31:47AM +0200, Ulf Hansson wrote: > > > > On Tue, 1 Sep 2020 at 17:40,

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-02 Thread Rich Felker
On Wed, Sep 02, 2020 at 05:51:16PM +0200, Geert Uytterhoeven wrote: > Hi Rich, > > On Wed, Sep 2, 2020 at 5:43 PM Rich Felker wrote: > > On Wed, Sep 02, 2020 at 10:31:47AM +0200, Ulf Hansson wrote: > > > On Tue, 1 Sep 2020 at 17:40, Christoph Hellwig wrote: > > > > On Tue, Sep 01, 2020 at

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-02 Thread Geert Uytterhoeven
Hi Rich, On Wed, Sep 2, 2020 at 5:43 PM Rich Felker wrote: > On Wed, Sep 02, 2020 at 10:31:47AM +0200, Ulf Hansson wrote: > > On Tue, 1 Sep 2020 at 17:40, Christoph Hellwig wrote: > > > On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote: > > > > > I still don't think this makes sense,

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-02 Thread Rich Felker
On Wed, Sep 02, 2020 at 10:31:47AM +0200, Ulf Hansson wrote: > On Tue, 1 Sep 2020 at 17:40, Christoph Hellwig wrote: > > > > On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote: > > > > I still don't think this makes sense, as the dma_mask should always > > > > be non-NULL here. > > > > >

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-02 Thread Rich Felker
On Tue, Sep 01, 2020 at 05:40:49PM +0200, Christoph Hellwig wrote: > On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote: > > > I still don't think this makes sense, as the dma_mask should always > > > be non-NULL here. > > > > If that is the case, I wonder how the driver could even have

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-02 Thread Ulf Hansson
On Tue, 1 Sep 2020 at 17:40, Christoph Hellwig wrote: > > On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote: > > > I still don't think this makes sense, as the dma_mask should always > > > be non-NULL here. > > > > If that is the case, I wonder how the driver could even have worked

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-01 Thread Ulf Hansson
On Tue, 1 Sep 2020 at 17:06, Christoph Hellwig wrote: > > On Tue, Sep 01, 2020 at 05:04:38PM +0200, Ulf Hansson wrote: > > +#ifdef CONFIG_HAS_DMA > > +static int mmc_spi_dma_alloc(struct mmc_spi_host *host) > > +{ > > + struct spi_device *spi = host->spi; > > + struct device *dev; > > + >

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-01 Thread Christoph Hellwig
On Tue, Sep 01, 2020 at 05:36:17PM +0200, Ulf Hansson wrote: > > I still don't think this makes sense, as the dma_mask should always > > be non-NULL here. > > If that is the case, I wonder how the driver could even have worked without > DMA. > > Because in the existing code, host->dma_dev gets

Re: [PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-01 Thread Christoph Hellwig
On Tue, Sep 01, 2020 at 05:04:38PM +0200, Ulf Hansson wrote: > +#ifdef CONFIG_HAS_DMA > +static int mmc_spi_dma_alloc(struct mmc_spi_host *host) > +{ > + struct spi_device *spi = host->spi; > + struct device *dev; > + > + if (!spi->master->dev.parent->dma_mask) > + return

[PATCH v2] mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset

2020-09-01 Thread Ulf Hansson
The commit cd57d07b1e4e ("sh: don't allow non-coherent DMA for NOMMU") made CONFIG_NO_DMA to be set for some platforms, for good reasons. Consequentially, CONFIG_HAS_DMA doesn't get set, which makes the DMA mapping interface to be built as stub functions, but also prevent the mmc_spi driver from