All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw-mmc: modify the condition for platdata of blk-setting
@ 2012-01-16  2:45 Jaehoon Chung
  2012-01-16 10:20 ` Will Newton
  0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2012-01-16  2:45 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Will Newton, James Hogan, Kyungmin Park

When use the IDMAC, we can also want to use the pdata->blk-setting.
So if pdata->blk-setting is unset, use the default value.
if not, use the pdata->blk-setting.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/mmc/host/dw_mmc.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0e34279..d458aaa 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1714,13 +1714,6 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
 		mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
-#ifdef CONFIG_MMC_DW_IDMAC
-	mmc->max_segs = host->ring_size;
-	mmc->max_blk_size = 65536;
-	mmc->max_blk_count = host->ring_size;
-	mmc->max_seg_size = 0x1000;
-	mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
-#else
 	if (host->pdata->blk_settings) {
 		mmc->max_segs = host->pdata->blk_settings->max_segs;
 		mmc->max_blk_size = host->pdata->blk_settings->max_blk_size;
@@ -1729,13 +1722,20 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 		mmc->max_seg_size = host->pdata->blk_settings->max_seg_size;
 	} else {
 		/* Useful defaults if platform data is unset. */
+#ifdef CONFIG_MMC_DW_IDMAC
+		mmc->max_segs = host->ring_size;
+		mmc->max_blk_size = 65536;
+		mmc->max_blk_count = host->ring_size;
+		mmc->max_seg_size = 0x1000;
+		mmc->max_req_size = mmc->max_seg_size * mmc->max_blk_count;
+#else
 		mmc->max_segs = 64;
 		mmc->max_blk_size = 65536; /* BLKSIZ is 16 bits */
 		mmc->max_blk_count = 512;
 		mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
 		mmc->max_seg_size = mmc->max_req_size;
-	}
 #endif /* CONFIG_MMC_DW_IDMAC */
+	}
 
 	host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
 	if (IS_ERR(host->vmmc)) {
-- 
1.7.4.1

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

* Re: [PATCH] mmc: dw-mmc: modify the condition for platdata of blk-setting
  2012-01-16  2:45 [PATCH] mmc: dw-mmc: modify the condition for platdata of blk-setting Jaehoon Chung
@ 2012-01-16 10:20 ` Will Newton
  2012-02-04 22:01   ` Chris Ball
  0 siblings, 1 reply; 3+ messages in thread
From: Will Newton @ 2012-01-16 10:20 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc, Chris Ball, Will Newton, James Hogan, Kyungmin Park

On Mon, Jan 16, 2012 at 2:45 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> When use the IDMAC, we can also want to use the pdata->blk-setting.
> So if pdata->blk-setting is unset, use the default value.
> if not, use the pdata->blk-setting.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)

Looks good.

Acked-by: Will Newton <will.newton@imgtec.com>

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

* Re: [PATCH] mmc: dw-mmc: modify the condition for platdata of blk-setting
  2012-01-16 10:20 ` Will Newton
@ 2012-02-04 22:01   ` Chris Ball
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-02-04 22:01 UTC (permalink / raw)
  To: Will Newton
  Cc: Jaehoon Chung, linux-mmc, Will Newton, James Hogan, Kyungmin Park

Hi,

On Mon, Jan 16 2012, Will Newton wrote:
> On Mon, Jan 16, 2012 at 2:45 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> When use the IDMAC, we can also want to use the pdata->blk-setting.
>> So if pdata->blk-setting is unset, use the default value.
>> if not, use the pdata->blk-setting.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>>  drivers/mmc/host/dw_mmc.c |   16 ++++++++--------
>>  1 files changed, 8 insertions(+), 8 deletions(-)
>
> Looks good.
>
> Acked-by: Will Newton <will.newton@imgtec.com>

Thanks, pushed to mmc-next for 3.4.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2012-02-04 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-16  2:45 [PATCH] mmc: dw-mmc: modify the condition for platdata of blk-setting Jaehoon Chung
2012-01-16 10:20 ` Will Newton
2012-02-04 22:01   ` Chris Ball

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.