public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* Re: A few queries dw_mmc driver
       [not found]   ` <CANYdXnrYaqck5ekWtjcP+HDmRcav3kxew6dVuv5jgemURR3uZw@mail.gmail.com>
@ 2011-08-02 21:47     ` James Hogan
  2011-08-04 10:20       ` James Hogan
  0 siblings, 1 reply; 2+ messages in thread
From: James Hogan @ 2011-08-02 21:47 UTC (permalink / raw)
  To: Shashidhar Hiremath, linux-mmc, Will

Hi Shashidhar

(resending in form that won't get bounced from linux-mmc list).

On 08/02/2011 12:53 PM, Shashidhar Hiremath wrote:
> Hi James,
>   Sorry for interrupting you,
> 
> I had a few queries on mmc driver. Can you please help on this

I've CC'd the linux-mmc list as both questions involve mostly generic MMC.

> 1>
> ------------------------------------------------------------------------------
> What do the following elements in the mmc_host struct signify:
>   max_segs,max_block_size,max_block_count,max_seg_size,max_req_size

I'm not familiar with these myself, but as far as I can tell they
signify the limits of the DMAC (which is why they're set differently
depending on whether the internal DMAC or the platform specific DMAC is
used):
http://lxr.linux.no/#linux+v3.0/drivers/mmc/host/dw_mmc.c#L1421

>   I was adding the support for Dual_Buffer Descriptors support in dw_mmc
> driver.Does it require a change in the above elements of mmc_host
> structure ?

I don't know, but I'll see if I can find out.

> ------------------------------------------------------------------------------
> 
> 2>
> ------------------------------------------------------------------------------
> I have observed in most of the drivers that the switching between PIO
> mode and the DMA mode is being done based on the data_size. Instead can
> this be made independent of data_size and be coded such that ,it only
> depends on the menu-config option and driver uses only one ?

I can see the use of that (I've forced PIO mode myself during debugging
or running mmc_test), but whether this is an acceptable thing to have
upstream as a config option I don't know.

Regards
James


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A few queries dw_mmc driver
  2011-08-02 21:47     ` A few queries dw_mmc driver James Hogan
@ 2011-08-04 10:20       ` James Hogan
  0 siblings, 0 replies; 2+ messages in thread
From: James Hogan @ 2011-08-04 10:20 UTC (permalink / raw)
  To: Shashidhar Hiremath, linux-mmc, Will

Hi Shashidhar

On 08/02/2011 10:47 PM, James Hogan wrote:
>>   I was adding the support for Dual_Buffer Descriptors support in dw_mmc
>> driver.Does it require a change in the above elements of mmc_host
>> structure ?
> 
> I don't know, but I'll see if I can find out.

The initial IDMAC settings were relatively sane defaults taken from the
original NXP driver, and things that were deducted from the source. Most
of the values pertain to the block layer:

* max_seg_size   /* upper limit on size of a coalesced segment */
* max_segs       /* upper limit on hw data segments in a request */
* max_req_size   /* maximum number of bytes in one request */
* max_blk_size   /* maximum size of one mmc block */
* max_blk_count  /* maximum number of blocks in one request */

They may not be the most efficient defaults, as they used the whole of
the IDMAC bandwidth (max_segs and max_blk_count are the size of the
whole ring buffer, and max_seg_size is the size of the largest DMA
transferrable block) but this shouldn't hinder a dual-buffered
implementation.

Cheers
James


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-04 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CANYdXnrvEJiehbz53WHMriAqn8F0uhnCFEE=x0gy19hfTXZStw@mail.gmail.com>
     [not found] ` <CANYdXnpG2oyXL2wVzdE=h4S1SHR_tsvoBwU4VVDQmTjtU0fL5g@mail.gmail.com>
     [not found]   ` <CANYdXnrYaqck5ekWtjcP+HDmRcav3kxew6dVuv5jgemURR3uZw@mail.gmail.com>
2011-08-02 21:47     ` A few queries dw_mmc driver James Hogan
2011-08-04 10:20       ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox