public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dw_mmc: set the debounce value and remove duplicated offset
@ 2011-02-21  8:57 Jaehoon Chung
  2011-02-21 10:23 ` Will Newton
  0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2011-02-21  8:57 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: will.newton, Chris Ball, Kyungmin Park

This patch is set the debouce value..
This value do not need to be changed with every command.
So we set the value in probe function.

And DATA register offset is duplicated..

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

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 62c8440..b3f94ff 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1623,6 +1623,9 @@ static int dw_mci_probe(struct platform_device *pdev)
 	/* Put in max timeout */
 	mci_writel(host, TMOUT, 0xFFFFFFFF);
 
+	/* Set the debounce value */
+	mci_writel(host, DEBNCE, 0xFFFFFF);
+
 	/*
 	 * FIFO threshold settings  RxMark  = fifo_size / 2 - 1,
 	 *                          Tx Mark = fifo_size / 2 DMA Size = 8
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 5dd55a7..f492837 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -51,7 +51,6 @@
 #define SDMMC_DSCADDR		0x094
 #define SDMMC_BUFADDR		0x098
 #define SDMMC_DATA		0x100
-#define SDMMC_DATA_ADR		0x100
 
 /* shift bit field */
 #define _SBF(f, v)		((v) << (f))

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

* Re: [PATCH] dw_mmc: set the debounce value and remove duplicated offset
  2011-02-21  8:57 [PATCH] dw_mmc: set the debounce value and remove duplicated offset Jaehoon Chung
@ 2011-02-21 10:23 ` Will Newton
  2011-02-22  2:18   ` Jaehoon Chung
  0 siblings, 1 reply; 3+ messages in thread
From: Will Newton @ 2011-02-21 10:23 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Kyungmin Park

On Mon, Feb 21, 2011 at 8:57 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> This patch is set the debouce value..
> This value do not need to be changed with every command.
> So we set the value in probe function.
>
> And DATA register offset is duplicated..
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    3 +++
>  drivers/mmc/host/dw_mmc.h |    1 -
>  2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 62c8440..b3f94ff 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1623,6 +1623,9 @@ static int dw_mci_probe(struct platform_device *pdev)
>        /* Put in max timeout */
>        mci_writel(host, TMOUT, 0xFFFFFFFF);
>
> +       /* Set the debounce value */
> +       mci_writel(host, DEBNCE, 0xFFFFFF);
> +

As I understand it this is the reset value of the DEBNCE register? Why
do we need to set it at all?

>        /*
>         * FIFO threshold settings  RxMark  = fifo_size / 2 - 1,
>         *                          Tx Mark = fifo_size / 2 DMA Size = 8
> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
> index 5dd55a7..f492837 100644
> --- a/drivers/mmc/host/dw_mmc.h
> +++ b/drivers/mmc/host/dw_mmc.h
> @@ -51,7 +51,6 @@
>  #define SDMMC_DSCADDR          0x094
>  #define SDMMC_BUFADDR          0x098
>  #define SDMMC_DATA             0x100
> -#define SDMMC_DATA_ADR         0x100

This part is fine.

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

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

* Re: [PATCH] dw_mmc: set the debounce value and remove duplicated offset
  2011-02-21 10:23 ` Will Newton
@ 2011-02-22  2:18   ` Jaehoon Chung
  0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2011-02-22  2:18 UTC (permalink / raw)
  To: Will Newton
  Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Chris Ball,
	Kyungmin Park

Will Newton wrote:
> On Mon, Feb 21, 2011 at 8:57 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> This patch is set the debouce value..
>> This value do not need to be changed with every command.
>> So we set the value in probe function.
>>
>> And DATA register offset is duplicated..
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
>> ---
>>  drivers/mmc/host/dw_mmc.c |    3 +++
>>  drivers/mmc/host/dw_mmc.h |    1 -
>>  2 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index 62c8440..b3f94ff 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -1623,6 +1623,9 @@ static int dw_mci_probe(struct platform_device *pdev)
>>        /* Put in max timeout */
>>        mci_writel(host, TMOUT, 0xFFFFFFFF);
>>
>> +       /* Set the debounce value */
>> +       mci_writel(host, DEBNCE, 0xFFFFFF);
>> +
> 
> As I understand it this is the reset value of the DEBNCE register? Why
> do we need to set it at all?

If need to set other value, we can change the debounce value (5~25ms).
This value is default reset value.

> 
>>        /*
>>         * FIFO threshold settings  RxMark  = fifo_size / 2 - 1,
>>         *                          Tx Mark = fifo_size / 2 DMA Size = 8
>> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
>> index 5dd55a7..f492837 100644
>> --- a/drivers/mmc/host/dw_mmc.h
>> +++ b/drivers/mmc/host/dw_mmc.h
>> @@ -51,7 +51,6 @@
>>  #define SDMMC_DSCADDR          0x094
>>  #define SDMMC_BUFADDR          0x098
>>  #define SDMMC_DATA             0x100
>> -#define SDMMC_DATA_ADR         0x100
> 
> This part is fine.
> 
> Acked-by: Will Newton <will.newton@imgtec.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

end of thread, other threads:[~2011-02-22  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21  8:57 [PATCH] dw_mmc: set the debounce value and remove duplicated offset Jaehoon Chung
2011-02-21 10:23 ` Will Newton
2011-02-22  2:18   ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox