From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org,
Chris Ball <cjb@laptop.org>, Ian Molton <ian@mnementh.co.uk>
Subject: Re: [PATCH 3/6] mmc: tmio: convert the SDHI MMC driver from MFD to
Date: Mon, 14 Mar 2011 08:01:30 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1103140857350.6125@axis700.grange> (raw)
In-Reply-To: <AANLkTi=ywRE0omJ1t0yxqzMS4k+PpjfFH7aLtWMW7C=3@mail.gmail.com>
On Sun, 13 Mar 2011, Magnus Damm wrote:
> On Fri, Mar 11, 2011 at 4:52 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > On sh-mobile platforms the SDHI driver was using the tmio_mmc SD/SDIO
> > MFD cell driver. Now that the tmio_mmc driver has been split into a
> > core and a separate MFD glue, we can support SDHI natively without the
> > need to emulate an MFD controller. This also allows to support systems
> > with an on-SoC SDHI controller and a separate MFD with a TMIO core.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
>
> Nice, I believe this is the right direction..
>
> > --- a/drivers/mmc/host/tmio_mmc.h
> > +++ b/drivers/mmc/host/tmio_mmc.h
> > @@ -92,7 +92,7 @@ struct tmio_mmc_host {
> > struct tasklet_struct dma_complete;
> > struct tasklet_struct dma_issue;
> > struct scatterlist bounce_sg;
> > -#ifdef CONFIG_TMIO_MMC_DMA
> > +#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
> > u8 bounce_buf[PAGE_CACHE_SIZE] __attribute__((aligned(TMIO_MAX_ALIGN)));
> > #else
> > u8 bounce_buf[1]; /* A dummy in no-DMA case */
>
> ... but it would be nice if all this #ifdeffery could be avoided somehow.
>
> Is it possible to use devres to allocate the bounce buffer dynamically
> in the dma portion of the code?
Well, this #ifdef has been there before, it's not new. But sure, we could
get rid of it. Basically, what you're suggesting, is to allocate that
bounce buffer dynamically - whether or not using devres. Just calling
__get_free_page() in tmio_mmc_request_dma() and __free_pages() in
tmio_mmc_release_dma() should work without any memory-leaking too. Would
this be ok?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2011-03-14 8:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 7:51 [PATCH 0/6] mmc: split the tmio driver into several modules Guennadi Liakhovetski
2011-03-11 7:51 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD glue Guennadi Liakhovetski
2011-03-12 16:05 ` Magnus Damm
2011-03-12 22:48 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD Guennadi Liakhovetski
2011-03-13 3:57 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD glue Magnus Damm
2011-03-13 22:51 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD Guennadi Liakhovetski
2011-03-15 9:01 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD glue Magnus Damm
2011-03-16 11:09 ` Ian Molton
2011-03-16 12:37 ` Magnus Damm
2011-03-21 11:19 ` [PATCH 1/6] mmc: tmio: split core functionality, DMA and MFD Guennadi Liakhovetski
2011-03-11 7:52 ` [PATCH 2/6] sh: ecovec: use the CONFIG_MMC_TMIO symbols instead of Guennadi Liakhovetski
2011-03-12 16:18 ` [PATCH 2/6] sh: ecovec: use the CONFIG_MMC_TMIO symbols instead Magnus Damm
2011-03-12 23:00 ` Guennadi Liakhovetski
2011-03-11 7:52 ` [PATCH 3/6] mmc: tmio: convert the SDHI MMC driver from MFD to a Guennadi Liakhovetski
2011-03-13 4:14 ` Magnus Damm
2011-03-14 8:01 ` Guennadi Liakhovetski [this message]
2011-03-15 9:09 ` Magnus Damm
2011-03-11 7:52 ` [PATCH 4/6] ARM: mach-shmobile: convert boards to use Guennadi Liakhovetski
2011-03-11 7:52 ` [PATCH 5/6] sh: convert boards to use linux/mmc/sh_mobile_sdhi.h Guennadi Liakhovetski
2011-03-11 7:52 ` [PATCH 6/6] mfd: remove now redundant sh_mobile_sdhi.h header Guennadi Liakhovetski
2011-03-15 21:25 ` [PATCH 0/6] mmc: split the tmio driver into several modules Ian Molton
2011-03-21 11:38 ` Guennadi Liakhovetski
2011-03-22 5:31 ` Simon Horman
2011-03-22 12:28 ` Paul Mundt
2011-03-22 22:06 ` Simon Horman
2011-03-23 14:54 ` Paul Mundt
2011-03-23 22:42 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1103140857350.6125@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=cjb@laptop.org \
--cc=ian@mnementh.co.uk \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).