Re: [PATCH] drivers/mmc/card/block.c: fix potential null dereference 'idata'

2011-05-10 Thread Chris Ball
Hi, On Mon, May 09 2011, Vladimir Motyka wrote: > When allocation of idata failed there was a null dereference. Also avoid > calling kfree where it is needn't. > > --- > diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c > index 407836d..126c7f4 100644 > --- a/drivers/mmc/card/block.

Re: [PATCH] mmc: fixed wrong SD card detection

2011-05-10 Thread Chris Ball
Hi Jaehoon, On Fri, May 06 2011, Jaehoon Chung wrote: > This patch added mmc_power_off after mmc_attach_sd() > > i found that didn't detect the second card insert.(using SDHCI) > you can see the below log. > > i want to know that somebody know this issue... > > ->first card inserted (correct card

Re: [PATCH v3] sdio: optimized SDIO IRQ handling for single irq

2011-05-10 Thread Chris Ball
Hi Per, On Thu, May 05 2011, Per Forlin wrote: > From: Stefan Nilsson XK > > If there is only 1 function interrupt registered it is possible to > improve performance by directly calling the irq handler > and avoiding the overhead of reading the CCCR registers. > > Signed-off-by: Per Forlin > Ack

Re: [PATCH v4 00/15] add support for host controller v3.00

2011-05-10 Thread Chris Ball
Hi Arindam, On Thu, May 05 2011, Arindam Nath wrote: > The patches below add support for Host Controller v3.00 as per the > spec v3.00. It also adds support for UHS-I cards as per Physical > Layer Specification v3.01. I've pushed 01-11 to mmc-next now, and will push 12-15 once they're resubmitted

Re: [PATCH v4 11/15] mmc: sdhci: add support for retuning mode 1

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Host Controller v3.00 can support retuning modes 1,2 or 3 depending on > the bits 46-47 of the Capabilities register. Also, the timer count for > retuning is indicated by bits 40-43 of the same register. We initialize > timer_list for retuning the fir

Re: [PATCH v4 10/15] mmc: sdhci: add support for programmable clock mode

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Host Controller v3.00 supports programmable clock mode as an optional > feature. The support for this mode is indicated by non-zero value in > bits 48-55 of the Capabilities register. If supported, the actual > value of Clock Multiplier is one more th

Re: [PATCH v4 09/15] mmc: sdhci: enable preset value after uhs initialization

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > According to the Host Controller spec v3.00, setting Preset Value Enable > in the Host Control2 register lets SDCLK Frequency Select, Clock Generator > Select and Driver Strength Select to be set automatically by the Host > Controller based on the UHS

Re: [PATCH v4 08/15] mmc: sd: add support for tuning during uhs initialization

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Host Controller needs tuning during initialization to operate SDR50 > and SDR104 UHS-I cards. Whether SDR50 mode actually needs tuning is > indicated by bit 45 of the Host Controller Capabilities register. > A new command CMD19 has been defined in the

Re: [PATCH v4 07/15] mmc: sd: report correct speed and capacity of uhs cards

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Since only UHS-I cards respond with S18A set in response to ACMD41, > we set the card as ultra-high-speed after successfull initialization. > We need to decide whether a card is SDXC based on the C_SIZE field > of CSDv2.0 register. According to Physic

Re: [PATCH v4 06/15] mmc: sd: set current limit for uhs cards

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > We decide on the current limit to be set for the card based on the > Capability of Host Controller to provide current at 1.8V signalling, > and the maximum current limit of the card as indicated by CMD6 > mode 0. We then set the current limit for the

Re: [PATCH v4 05/15] mmc: sd: add support for uhs bus speed mode selection

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > This patch adds support for setting UHS-I bus speed mode during UHS-I > initialization procedure. Since both the host and card can support > more than one bus speed, we select the highest speed based on both of > their capabilities. First we set the b

Re: [PATCH v4 04/15] mmc: sdhci: reset sdclk before setting high speed enable

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > As per Host Controller spec v3.00, we reset SDCLK before setting > High Speed Enable, and then set it back to avoid generating clock > gliches. Before enabling SDCLK again, we make sure the clock is > stable, so we use sdhci_set_clock(). > > Signed-of

Re: [PATCH v4 03/15] mmc: sd: add support for driver type selection

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > This patch adds support for setting driver strength during UHS-I > initialization prcedure. Since UHS-I cards set S18A (bit 24) in > response to ACMD41, we use this as a base for UHS-I initialization. > We modify the parameter list of mmc_sd_get_cid()

Re: [PATCH v4 02/15] mmc: sd: query function modes for uhs cards

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > SD cards which conform to Physical Layer Spec v3.01 can support > additional Bus Speed Modes, Driver Strength, and Current Limit > other than the default values. We use CMD6 mode 0 to read these > additional card functions. The values read here will b

Re: [PATCH v4 01/15] mmc: sd: add support for signal voltage switch procedure

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Host Controller v3.00 adds another Capabilities register. Apart > from other things, this new register indicates whether the Host > Controller supports SDR50, SDR104, and DDR50 UHS-I modes. The spec > doesn't mention about explicit support for SDR12 a

Re: [PATCH] dw_mmc: fixed regulator control

2011-05-10 Thread Jaehoon Chung
Chris Ball wrote: > Hi Jaehoon, > > On Mon, May 02 2011, Jaehoon Chung wrote: >> Hi Chris.. >> >> Thanks for comments... >> I think that could confuse that message when didn't set CONFIG_REGULATOR. > > The message *does not appear* when CONFIG_REGULATOR is unset, because > NULL -- which the regul

Re: [PATCH v4 12/15] sdhci pxa add platform specific code for UHS signaling

2011-05-10 Thread Chris Ball
Hi, On Thu, May 05 2011, Arindam Nath wrote: > Marvell controller requires 1.8V bit in UHS control register 2 > be set when doing UHS. eMMC does not require 1.8V for DDR. > add platform code to handle this. > > Signed-off-by: Philip Rakity > Reviewed-by: Arindam Nath > --- > drivers/mmc/host/s

Re: [PATCH v4 13/15] mmc eMMC signal voltage does not use CMD11

2011-05-10 Thread Chris Ball
Hi Arindam, If this patch was written by Philip, it should begin with: From: Philip Rakity (And if it was written by you, it should have your S-o-b line.) On Thu, May 05 2011, Arindam Nath wrote: > eMMC chips do not use CMD11 when changing voltage. Add extra > argument to call to indicate if

Re: [PATCH] dw_mmc: fixed regulator control

2011-05-10 Thread Chris Ball
Hi Jaehoon, On Mon, May 02 2011, Jaehoon Chung wrote: > Hi Chris.. > > Thanks for comments... > I think that could confuse that message when didn't set CONFIG_REGULATOR. The message *does not appear* when CONFIG_REGULATOR is unset, because NULL -- which the regulator subsystem returns via the reg

Re: [PATCH] mmc: tmio: fix PM in DMA mode

2011-05-10 Thread Chris Ball
Hi Guennadi, On Fri, Apr 29 2011, Guennadi Liakhovetski wrote: > DMA mode has to be re-enabled during a resume. > > Signed-off-by: Guennadi Liakhovetski > --- > drivers/mmc/host/tmio_mmc_dma.c | 21 - > drivers/mmc/host/tmio_mmc_pio.c |1 + > 2 files changed, 13 inserti

Re: [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-10 Thread Mark Brown
On Tue, May 10, 2011 at 10:02:14PM +0200, Antonio Ospite wrote: > So, I am going to remove the ifdefs anyway but use IS_ERR_OR_NULL(); > how does that sound? Am I still missing anything? Looks good to me. > Or changing the regulator_get() stub to return an error (-ENOSYS?) might > be worth it?

Re: [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-10 Thread Russell King - ARM Linux
On Tue, May 10, 2011 at 10:02:14PM +0200, Antonio Ospite wrote: > I was blindly trusting code already in mainline again, and for that I > apologize, I finally took the time to look at the implementation > of IS_ERR() and test its use, and being IS_ERR(NULL) true it is not what > we want indeed, see

Re: [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-10 Thread Antonio Ospite
On Mon, 9 May 2011 22:36:12 +0200 Mark Brown wrote: > On Mon, May 09, 2011 at 09:23:25PM +0100, Russell King - ARM Linux wrote: > > > NAK. This has been proposed before, and rejected. See the comments > > against the original proposal: > > > http://www.arm.linux.org.uk/developer/patches/viewp

[PATCHv1] mmc_test: minor clean up, use t = &test.area everywhere

2011-05-10 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 75 +-- 1 files changed, 44 insertions(+), 31 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 35252c1..233cdfa 100644 --- a/drivers/mmc/card/mmc_te

[PATCHv2.1] mmc: omap_hsmmc: split duplicate code to calc_divisor() function

2011-05-10 Thread Andy Shevchenko
There are two places where the same calculations are done. Let's split them to separate function. In addition the new function is simplified by usage DIV_ROUND_UP kernel macro. Signed-off-by: Andy Shevchenko Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 46

[PATCHv2.1] mmc: omap_hsmmc: reduce a bit the error handlers in probe()

2011-05-10 Thread Andy Shevchenko
The code contains the similarities in the error path of probe function. Let's combine them at one place. Signed-off-by: Andy Shevchenko Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 17 ++--- 1 files changed, 6 insertions(+), 11 deletions(-) diff --git a/driver

Re: [PATCH] pxamci: remove an ifdef about CONFIG_REGULATOR

2011-05-10 Thread Sergei Shtylyov
Hello. On 10-05-2011 0:11, Antonio Ospite wrote: Don't wrap regulator_get() inside an #ifdef CONFIG_REGULATOR anymore, as now (since be1a50d) Need the summary of that commit cited too -- for the human readers. it correctly degenerates and returns NULL when the regulator framework is disa

Re: [PATCH] drivers/mmc/card/block.c: fix potential null dereference 'idata'

2011-05-10 Thread Julia Lawall
On Tue, 10 May 2011, Andy Shevchenko wrote: > On Mon, May 9, 2011 at 7:12 PM, Julia Lawall wrote: > > I guess there is also a point at which idata has been successfully > > allocated but idata->buf has not. > And? kfree() simple ignores NULL pointers. Unnecessarily calling a function suggests th

Re: [PATCH] drivers/mmc/card/block.c: fix potential null dereference 'idata'

2011-05-10 Thread Andy Shevchenko
On Mon, May 9, 2011 at 7:12 PM, Julia Lawall wrote: > I guess there is also a point at which idata has been successfully > allocated but idata->buf has not. And? kfree() simple ignores NULL pointers. I would prefer to see previous version of patch, but let maintainer to choose. -- With Best Rega