Re: MMC core debugfs support (was Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers)

2008-02-25 Thread Pierre Ossman
On Thu, 14 Feb 2008 15:00:05 +0100 Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > > I've started working on this, but I've run into a problem: The mmc core > structures don't seem to keep any references to the current request. So > I don't really have any information to put into the 'req' file a

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-14 Thread Haavard Skinnemoen
On Thu, 14 Feb 2008 11:34:03 -0700 "Dan Williams" <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 1:36 AM, Haavard Skinnemoen > <[EMAIL PROTECTED]> wrote: > > It's ok to use PIO for small and/or odd transfers like "read 2 bytes > > from this SDIO register", something that the mmc-block driv

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-14 Thread Dan Williams
On Thu, Feb 14, 2008 at 1:36 AM, Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: [..] > > > 2/ Fall back to PIO for a few transfers > > Which means killing performance for large transfers. Not really an > option. > > It's ok to use PIO for small and/or odd transfers like "read 2 bytes > from thi

MMC core debugfs support (was Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers)

2008-02-14 Thread Haavard Skinnemoen
[removing lots of people from Cc] On Wed, 13 Feb 2008 19:30:51 +0100 Pierre Ossman <[EMAIL PROTECTED]> wrote: > > +static int req_dbg_open(struct inode *inode, struct file *file) > > +{ > > And this should go into the core. I've started working on this, but I've run into a problem: The mmc co

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-14 Thread Haavard Skinnemoen
On Wed, 13 Feb 2008 16:55:54 -0700 "Dan Williams" <[EMAIL PROTECTED]> wrote: > Well, the other two possibilities are: > > 1/ Spin/sleep until a descriptor shows up Won't work since the transfer hasn't been started yet, so it will spin indefinitely. I guess we could return, send the command and

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-13 Thread Dan Williams
On Feb 13, 2008 2:06 PM, Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > On Wed, 13 Feb 2008 12:11:58 -0700 > "Dan Williams" <[EMAIL PROTECTED]> wrote: > > > > + desc = chan->device->device_prep_slave(chan, > > > + sg_dma_address(sg), direction, > > > +

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-13 Thread Haavard Skinnemoen
On Wed, 13 Feb 2008 12:11:58 -0700 "Dan Williams" <[EMAIL PROTECTED]> wrote: > > + desc = chan->device->device_prep_slave(chan, > > + sg_dma_address(sg), direction, > > + DMA_SLAVE_WIDTH_32BIT, > > +

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-13 Thread Dan Williams
On Jan 29, 2008 11:10 AM, Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: [..] > +/* > + * Returns a mask of flags to be set in the command register when the > + * command to start the transfer is to be sent. > + */ > +static u32 atmci_prepare_data(struct mmc_host *mmc, struct mmc_data *data) [..] >

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-13 Thread Haavard Skinnemoen
On Wed, 13 Feb 2008 19:30:51 +0100 Pierre Ossman <[EMAIL PROTECTED]> wrote: > I think this was meant to go away. > And this should go into the core. > I also pointed this out. mmc_remove_host() will synchronize this for > you. Right. Sorry. I focused so much on getting the driver to work correc

Re: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-02-13 Thread Pierre Ossman
On Tue, 29 Jan 2008 19:10:13 +0100 Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > + > +/* Those printks take an awful lot of time... */ > +#ifndef DEBUG > +static unsigned int fmax = 1500U; > +#else > +static unsigned int fmax = 100U; > +#endif > +module_param(fmax, uint, 0444); > +MODULE

[RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers

2008-01-29 Thread Haavard Skinnemoen
This is a driver for the MMC controller on the AP7000 chips from Atmel. It should in theory work on AT91 systems too with some tweaking, but since the DMA interface is quite different, it's not entirely clear if it's worth it. This driver has been around for a while in BSPs and kernel sources prov