Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-12-21 Thread Ulf Hansson
On 21 December 2012 11:39, Russell King - ARM Linux wrote: > On Fri, Dec 21, 2012 at 11:36:32AM +0100, Ulf Hansson wrote: >> Just wanted to conclude on the way forward. Should we fixup pio_write >> according to how pio_read has been fixed, or should we adapt the check >> for misaligned buffers to

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-12-21 Thread Russell King - ARM Linux
On Fri, Dec 21, 2012 at 11:36:32AM +0100, Ulf Hansson wrote: > Just wanted to conclude on the way forward. Should we fixup pio_write > according to how pio_read has been fixed, or should we adapt the check > for misaligned buffers to what Per proposed? > What do you prefer Russell? It's really sil

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-12-21 Thread Ulf Hansson
On 29 November 2012 12:38, Ulf Hansson wrote: > On 28 November 2012 18:12, Russell King - ARM Linux > wrote: >> On Wed, Nov 28, 2012 at 05:55:13PM +0100, Per Forlin wrote: >>> I have tried to work out an if-statement to check this properly. Here >>> is my conclusion, >>> This only works if sg len

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-29 Thread Ulf Hansson
On 28 November 2012 18:12, Russell King - ARM Linux wrote: > On Wed, Nov 28, 2012 at 05:55:13PM +0100, Per Forlin wrote: >> I have tried to work out an if-statement to check this properly. Here >> is my conclusion, >> This only works if sg len is 1 (in the SDIO case) >> >> if (WRITE) >> align =

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-28 Thread Russell King - ARM Linux
On Wed, Nov 28, 2012 at 05:55:13PM +0100, Per Forlin wrote: > I have tried to work out an if-statement to check this properly. Here > is my conclusion, > This only works if sg len is 1 (in the SDIO case) > > if (WRITE) > align = sg->offset & 3 > else if (READ) > align = 0 > > if (sg->offset &

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-28 Thread Per Forlin
On Mon, Nov 26, 2012 at 11:52 AM, Per Förlin wrote: > On 11/26/2012 11:27 AM, Russell King - ARM Linux wrote: >> On Mon, Nov 26, 2012 at 11:20:32AM +0100, Per Förlin wrote: >>> On 11/22/2012 06:37 PM, Russell King - ARM Linux wrote: On Thu, Nov 22, 2012 at 06:28:30PM +0100, Per Forlin wrote:

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-26 Thread Per Förlin
On 11/26/2012 11:27 AM, Russell King - ARM Linux wrote: > On Mon, Nov 26, 2012 at 11:20:32AM +0100, Per Förlin wrote: >> On 11/22/2012 06:37 PM, Russell King - ARM Linux wrote: >>> On Thu, Nov 22, 2012 at 06:28:30PM +0100, Per Forlin wrote: On Wed, Nov 21, 2012 at 5:50 PM, Russell King - ARM L

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-26 Thread Russell King - ARM Linux
On Mon, Nov 26, 2012 at 11:20:32AM +0100, Per Förlin wrote: > On 11/22/2012 06:37 PM, Russell King - ARM Linux wrote: > > On Thu, Nov 22, 2012 at 06:28:30PM +0100, Per Forlin wrote: > >> On Wed, Nov 21, 2012 at 5:50 PM, Russell King - ARM Linux > >> wrote: > >>> On Wed, Nov 21, 2012 at 05:13:55PM

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-26 Thread Per Förlin
On 11/22/2012 06:37 PM, Russell King - ARM Linux wrote: > On Thu, Nov 22, 2012 at 06:28:30PM +0100, Per Forlin wrote: >> On Wed, Nov 21, 2012 at 5:50 PM, Russell King - ARM Linux >> wrote: >>> On Wed, Nov 21, 2012 at 05:13:55PM +0100, Per Forlin wrote: On Wed, Nov 21, 2012 at 4:38 PM, Russell

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-22 Thread Ulf Hansson
On 21 November 2012 17:50, Russell King - ARM Linux wrote: > On Wed, Nov 21, 2012 at 05:13:55PM +0100, Per Forlin wrote: >> On Wed, Nov 21, 2012 at 4:38 PM, Russell King - ARM Linux >> wrote: >> > On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote: >> >> /* >> >> + * Validate mmc prereq

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-22 Thread Russell King - ARM Linux
On Thu, Nov 22, 2012 at 06:28:30PM +0100, Per Forlin wrote: > On Wed, Nov 21, 2012 at 5:50 PM, Russell King - ARM Linux > wrote: > > On Wed, Nov 21, 2012 at 05:13:55PM +0100, Per Forlin wrote: > >> On Wed, Nov 21, 2012 at 4:38 PM, Russell King - ARM Linux > >> wrote: > >> > On Fri, Oct 12, 2012 a

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-22 Thread Russell King - ARM Linux
On Thu, Nov 22, 2012 at 02:43:10PM +0100, Ulf Hansson wrote: > The mmci_pio_read|write functions are being provided with sg element > buffers, which may have any length and any address alignment, as you > stated. > > This example is a read: > -sg-list has 2 elements. > -sg-element [0], is 3 bytes

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-22 Thread Per Forlin
On Wed, Nov 21, 2012 at 5:50 PM, Russell King - ARM Linux wrote: > On Wed, Nov 21, 2012 at 05:13:55PM +0100, Per Forlin wrote: >> On Wed, Nov 21, 2012 at 4:38 PM, Russell King - ARM Linux >> wrote: >> > On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote: >> >> /* >> >> + * Validate mmc

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-21 Thread Russell King - ARM Linux
On Wed, Nov 21, 2012 at 05:13:55PM +0100, Per Forlin wrote: > On Wed, Nov 21, 2012 at 4:38 PM, Russell King - ARM Linux > wrote: > > On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote: > >> /* > >> + * Validate mmc prerequisites > >> + */ > >> +static int mmci_validate_data(struct mmci_h

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-21 Thread Per Forlin
On Wed, Nov 21, 2012 at 4:38 PM, Russell King - ARM Linux wrote: > On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote: >> /* >> + * Validate mmc prerequisites >> + */ >> +static int mmci_validate_data(struct mmci_host *host, >> + struct mmc_data *data) >> +{ >>

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-11-21 Thread Russell King - ARM Linux
On Fri, Oct 12, 2012 at 04:02:02PM +0200, Ulf Hansson wrote: > /* > + * Validate mmc prerequisites > + */ > +static int mmci_validate_data(struct mmci_host *host, > + struct mmc_data *data) > +{ > + if (!data) > + return 0; > + > + if (!host->variant->

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-10-15 Thread Johan Rudholm
2012/10/12 Ulf Hansson : > From: Ulf Hansson > > For the ux500v2 variant non power of two block sizes are supported. > This will make it possible to decrease data overhead for SDIO > transfers. Although we need to put some constraints to the alignment > of the buffers when enabling this feature. >

Re: [PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-10-12 Thread Linus Walleij
On Fri, Oct 12, 2012 at 4:02 PM, Ulf Hansson wrote: > From: Ulf Hansson > > For the ux500v2 variant non power of two block sizes are supported. > This will make it possible to decrease data overhead for SDIO > transfers. Although we need to put some constraints to the alignment > of the buffers

[PATCH] mmc: mmci: Support non-power-of-two block sizes for ux500v2 variant

2012-10-12 Thread Ulf Hansson
From: Ulf Hansson For the ux500v2 variant non power of two block sizes are supported. This will make it possible to decrease data overhead for SDIO transfers. Although we need to put some constraints to the alignment of the buffers when enabling this feature. Buffers must be 4 bytes aligned due