Re: [PATCH v2 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Namjae Jeon
2012/4/12 Girish K S : > On 11 April 2012 19:24, Namjae Jeon wrote: >> Hi. Subhash. Hi. >> Have you considered return -EINVAL in switch ? > That is case which should never enter. Would you explain more why entering never in case? >> And looks complex more.. how about getting bus_width and ddr valu

Re: [PATCH 1/1] [PATCH v4 1/1] mmc: Support of DUAL BUFFER DESC[ring] mode for dw_mmc

2012-04-11 Thread Shashidhar Hiremath
Hi Chris, Any updates on when this patch can be pushed ? On Thu, Jan 19, 2012 at 3:59 PM, Will Newton wrote: > On Tue, Jan 17, 2012 at 1:46 PM, Shashidhar Hiremath > wrote: >> Hi , >>  Any update on this patch ? > > I'm happy to see it merged based on those numbers. It might be worth > adding

Re: [PATCH v2 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Girish K S
On 11 April 2012 19:24, Namjae Jeon wrote: > Hi. Subhash. > Have you considered return -EINVAL in switch ? That is case which should never enter. > And looks complex more.. how about getting bus_width and ddr value > from argument ? bus_width is already a argument of mmc_select_powerclass. > > Tha

Re: [PATCH v2] mmc: core: eMMC in Sleep mode before suspend

2012-04-11 Thread Chris Ball
Hi, On Thu, Sep 08 2011, Balaji T K wrote: > Put MMC to sleep if it supports SLEEP/AWAKE (CMD5) > in the mmc suspend so that Vcc (NAND core) can be cut > to minimize power consumption. > eMMC put into SLEEP can respond to CMD0 or H/W reset or CMD5. > Current implemention on resume from suspend rel

Re: swap on eMMC and other flash

2012-04-11 Thread Minchan Kim
On 04/12/2012 12:57 AM, Arnd Bergmann wrote: On Wednesday 11 April 2012, Minchan Kim wrote: On Tue, Apr 10, 2012 at 08:32:51AM +, Arnd Bergmann wrote: I should have written more general term. I means write amplication but WAF(Write Amplication Factor) is more popular. :( D'oh. Thanks for

Re: [PATCH 1/2] mmc: Avoid null pointer dereference

2012-04-11 Thread Namjae Jeon
2012/4/12 Philippe De Swert : > After the null check on md the code jumped to cmd_done, which then > will dereference md in mmc_blk_put. This patch avoids the possible > null pointer dereference in that case. > > Signed-off-by: Philippe De Swert This patch is good also. Reviewed-by: Namjae Jeon -

Re: [PATCH 2/2] mmc: Remove dead code

2012-04-11 Thread Namjae Jeon
2012/4/12 Philippe De Swert : > bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1) > will cause the function to return. So in in the second test it > definitly is different from 0, and the third test is redundant. > > Signed-off-by: Philippe De Swert > --- Looks good to me. Reviewed-

Re: [PATCH 2/2] mmc: Remove dead code

2012-04-11 Thread Philip Rakity
Acked-by: Philip Rakity On Apr 11, 2012, at 1:32 PM, Philippe De Swert wrote: > bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1) > will cause the function to return. So in in the second test it > definitly is different from 0, and the third test is redundant. > > Signed-off-by

[PATCH 2/2] mmc: Remove dead code

2012-04-11 Thread Philippe De Swert
bus_width is passed to the function and when 0 (MMC_BUS_WIDTH_1) will cause the function to return. So in in the second test it definitly is different from 0, and the third test is redundant. Signed-off-by: Philippe De Swert --- drivers/mmc/core/mmc.c |6 +- 1 file changed, 1 insertion(

[PATCH 1/2] mmc: Avoid null pointer dereference

2012-04-11 Thread Philippe De Swert
After the null check on md the code jumped to cmd_done, which then will dereference md in mmc_blk_put. This patch avoids the possible null pointer dereference in that case. Signed-off-by: Philippe De Swert --- drivers/mmc/card/block.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

Re: [PATCH v2] mmc: remove imxmmc driver

2012-04-11 Thread Chris Ball
Hi, On Wed, Apr 11 2012, Sascha Hauer wrote: > This driver is broken since 2.6.31 when the traditional i.MX1 > support was removed. > > In theory the i.MX1 mmc controller can be supported by the mxcmmc > driver which basically is the same hardware. However, the i.MX1 > controller has severe bugs w

Re: [PATCH] mmc: remove imxmmc driver

2012-04-11 Thread Sascha Hauer
On Wed, Apr 11, 2012 at 04:05:51PM -0400, Chris Ball wrote: > Hi Sascha, > > On Wed, Apr 11 2012, Sascha Hauer wrote: > > This driver is broken since 2.6.31 when the traditional i.MX1 > > support was removed. > > > > In theory the i.MX1 mmc controller can be supported by the mxcmmc > > driver whic

[PATCH v2] mmc: remove imxmmc driver

2012-04-11 Thread Sascha Hauer
This driver is broken since 2.6.31 when the traditional i.MX1 support was removed. In theory the i.MX1 mmc controller can be supported by the mxcmmc driver which basically is the same hardware. However, the i.MX1 controller has severe bugs which made several workarounds necessary which resulted in

Re: [PATCH] mmc: remove imxmmc driver

2012-04-11 Thread Chris Ball
Hi Sascha, On Wed, Apr 11 2012, Sascha Hauer wrote: > This driver is broken since 2.6.31 when the traditional i.MX1 > support was removed. > > In theory the i.MX1 mmc controller can be supported by the mxcmmc > driver which basically is the same hardware. However, the i.MX1 > controller has severe

[PATCH] mmc: remove imxmmc driver

2012-04-11 Thread Sascha Hauer
This driver is broken since 2.6.31 when the traditional i.MX1 support was removed. In theory the i.MX1 mmc controller can be supported by the mxcmmc driver which basically is the same hardware. However, the i.MX1 controller has severe bugs which made several workarounds necessary which resulted in

Re: [PATCH] mmc: remove linux/blkdev.h include from host drivers

2012-04-11 Thread Chris Ball
Hi, On Wed, Apr 11 2012, Sascha Hauer wrote: >> Should imxmmc simply be removed from drivers/mmc/host? Do any of the >> more current i.MX MMC drivers support the same hardware? > > It has long been on my todo list to remove this driver. The more recent > i.MX use the mxcmmc driver which is basica

Re: [PATCH] mmc: remove linux/blkdev.h include from host drivers

2012-04-11 Thread Sascha Hauer
On Wed, Apr 11, 2012 at 11:39:12AM -0400, Chris Ball wrote: > Hi Sascha, Wolfram, > > On Tue, Apr 10 2012, Dmitry Artamonow wrote: > > I've compile tested everything with and without CONFIG_BLOCK enabled, > > except for imxmmc.c - this driver seems to be long time broken > > (at least since the re

Re: swap on eMMC and other flash

2012-04-11 Thread Arnd Bergmann
On Wednesday 11 April 2012, Minchan Kim wrote: > On Tue, Apr 10, 2012 at 08:32:51AM +, Arnd Bergmann wrote: > > > > > > I should have written more general term. I means write amplication but > > > WAF(Write Amplication Factor) is more popular. :( > > > > D'oh. Thanks for the clarification. No

Re: [PATCH] mmc: remove linux/blkdev.h include from host drivers

2012-04-11 Thread Chris Ball
Hi Sascha, Wolfram, On Tue, Apr 10 2012, Dmitry Artamonow wrote: > I've compile tested everything with and without CONFIG_BLOCK enabled, > except for imxmmc.c - this driver seems to be long time broken > (at least since the removal of mach-imx in 2.6.31 - see commit > 1341d34ffc296f98dc84876f35f31

Re: [PATCH] mmc: remove linux/blkdev.h include from host drivers

2012-04-11 Thread Ludovic Desroches
Hi Dmitry, Le 04/10/2012 09:06 PM, Dmitry Artamonow a écrit : None of mmc host drivers using linux/blkdev.h header really need anything from it. The slight exception is atmel-mci, which uses blkdev.h only because it indirectly pulls asm/cacheflush.h So remove any inclusion of blkdev.h - it shou

Re: [PATCH V4]mmc: remove MMC bus legacy suspend/resume method

2012-04-11 Thread Chris Ball
Hi, On Wed, Apr 11 2012, Ulf Hansson wrote: > On 04/11/2012 01:54 PM, Chuanxiao Dong wrote: >> MMC bus is using legacy suspend/resume method, which is not compatible if >> runtime pm callbacks are used. In this scenario, MMC bus suspend/resume >> callbacks cannot be called when system entering S3.

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Chris Ball
Hi, On Wed, Apr 11 2012, Rajendra Nayak wrote: > of_have_populated_dt() is not expected to be used in drivers but > instead only in early platform init code. > Drivers on the other hand should rely on dev->of_node or of_match_device(). > Besides usage of of_have_populated_dt() also throws up build

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread T Krishnamoorthy, Balaji
On Wed, Apr 11, 2012 at 3:33 PM, Rajendra Nayak wrote: > of_have_populated_dt() is not expected to be used in drivers but > instead only in early platform init code. > Drivers on the other hand should rely on dev->of_node or of_match_device(). > Besides usage of of_have_populated_dt() also throws

Re: [PATCH v2 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Namjae Jeon
Hi. Subhash. Have you considered return -EINVAL in switch ? And looks complex more.. how about getting bus_width and ddr value from argument ? Thanks. 2012/4/11 Subhash Jadavani : > With current implementation of power class selection, > mmc_select_powerclass() should never fail. So treat any erro

Re: [PATCH V4]mmc: remove MMC bus legacy suspend/resume method

2012-04-11 Thread Ulf Hansson
On 04/11/2012 01:54 PM, Chuanxiao Dong wrote: MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for syste

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Rob Herring
On 04/11/2012 05:03 AM, Rajendra Nayak wrote: > of_have_populated_dt() is not expected to be used in drivers but > instead only in early platform init code. > Drivers on the other hand should rely on dev->of_node or of_match_device(). > Besides usage of of_have_populated_dt() also throws up build e

Re: [PATCH v2 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Girish K S
On 11 April 2012 17:05, Subhash Jadavani wrote: > With current implementation of power class selection, > mmc_select_powerclass() should never fail. So treat any error > returned by this function as serious enough to skip the card > initialization. > > Signed-off-by: Subhash Jadavani > --- >  dri

[PATCH V4]mmc: remove MMC bus legacy suspend/resume method

2012-04-11 Thread Chuanxiao Dong
MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for system sleeping mode Signed-off-by: Chuanxiao Dong

RE: [PATCH V3]mmc: remove MMC bus legacy suspend/resume method

2012-04-11 Thread Dong, Chuanxiao
> -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@stericsson.com] > Sent: Tuesday, April 10, 2012 10:33 PM > To: Dong, Chuanxiao > Cc: linux-mmc@vger.kernel.org; linux...@lists.linux-foundation.org; > c...@laptop.org; linus.wall...@linaro.org; r...@sisk.pl > Subject: Re: [PATCH

[PATCH v2 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Subhash Jadavani
With current implementation of power class selection, mmc_select_powerclass() should never fail. So treat any error returned by this function as serious enough to skip the card initialization. Signed-off-by: Subhash Jadavani --- drivers/mmc/core/mmc.c | 26 +++--- 1 files c

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Felipe Balbi
On Wed, Apr 11, 2012 at 03:59:55PM +0530, Rajendra Nayak wrote: > On Wednesday 11 April 2012 03:56 PM, Felipe Balbi wrote: > >On Wed, Apr 11, 2012 at 03:54:28PM +0530, Rajendra Nayak wrote: > >>On Wednesday 11 April 2012 03:39 PM, Felipe Balbi wrote: > >>>On Wed, Apr 11, 2012 at 03:33:13PM +0530, R

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Rajendra Nayak
On Wednesday 11 April 2012 03:56 PM, Felipe Balbi wrote: On Wed, Apr 11, 2012 at 03:54:28PM +0530, Rajendra Nayak wrote: On Wednesday 11 April 2012 03:39 PM, Felipe Balbi wrote: On Wed, Apr 11, 2012 at 03:33:13PM +0530, Rajendra Nayak wrote: @@ -1564,7 +1564,7 @@ static void omap_hsmmc_set_ios

Re: swap on eMMC and other flash

2012-04-11 Thread Adrian Hunter
On 04/04/12 15:47, Arnd Bergmann wrote: > On Wednesday 04 April 2012, Adrian Hunter wrote: >> On 30/03/12 21:50, Arnd Bergmann wrote: >>> (sorry for the duplicated email, this corrects the address of the android >>> kernel team, please reply here) >>> >>> On Friday 30 March 2012, Arnd Bergmann wrot

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Felipe Balbi
On Wed, Apr 11, 2012 at 03:54:28PM +0530, Rajendra Nayak wrote: > On Wednesday 11 April 2012 03:39 PM, Felipe Balbi wrote: > >On Wed, Apr 11, 2012 at 03:33:13PM +0530, Rajendra Nayak wrote: > >>@@ -1564,7 +1564,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, > >>struct mmc_ios *ios) > >>

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Rajendra Nayak
On Wednesday 11 April 2012 03:39 PM, Felipe Balbi wrote: On Wed, Apr 11, 2012 at 03:33:13PM +0530, Rajendra Nayak wrote: @@ -1564,7 +1564,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) * can't be allowed when booting with device

Re: [PATCH] mmc: remove linux/blkdev.h include from host drivers

2012-04-11 Thread Will Newton
On Tue, Apr 10, 2012 at 8:06 PM, Dmitry Artamonow wrote: > None of mmc host drivers using linux/blkdev.h header > really need anything from it. The slight exception is > atmel-mci, which uses blkdev.h only because it indirectly > pulls asm/cacheflush.h > > So remove any inclusion of blkdev.h - it

Re: [PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Felipe Balbi
On Wed, Apr 11, 2012 at 03:33:13PM +0530, Rajendra Nayak wrote: > @@ -1564,7 +1564,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, > struct mmc_ios *ios) >* can't be allowed when booting with device >* tree. >*/ > -

[PATCH] mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage

2012-04-11 Thread Rajendra Nayak
of_have_populated_dt() is not expected to be used in drivers but instead only in early platform init code. Drivers on the other hand should rely on dev->of_node or of_match_device(). Besides usage of of_have_populated_dt() also throws up build error as below which was reported by Balaji TK, when om

Re: swap on eMMC and other flash

2012-04-11 Thread Minchan Kim
On Tue, Apr 10, 2012 at 08:32:51AM +, Arnd Bergmann wrote: > On Tuesday 10 April 2012, Minchan Kim wrote: > > 2012-04-09 오후 9:35, Arnd Bergmann 쓴 글: > > > >> > > >> I understand it's best for writing 64K in your statement. > > >> What the 8K, 16K? Could you elaborate relation between 8K, 16K a

Re: [PATCH v1 1/1] mmc: core: skip card initialization if power class selection fails

2012-04-11 Thread Namjae Jeon
Hi. Chris. You're right~ we can optmize code properly by moving printk to mmc_select_powerclass. Thanks for your reply. 2012/4/10 Chris Ball : > Hi, > > On Mon, Apr 09 2012, Namjae Jeon wrote: >> Hi Subhash. >> There are duplicate printks in three places. Is there no way to avoid >> duplicate pri