* mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
@ 2012-01-09 1:06 Jaehoon Chung
2012-01-09 9:41 ` James Hogan
0 siblings, 1 reply; 5+ messages in thread
From: Jaehoon Chung @ 2012-01-09 1:06 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Kyungmin Park, Will Newton, James Hogan
In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1".
Finally, FIFO_DEPTH = bit[27:16] + 1.
Now, Used the 0x7ff. but 0xfff is right.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 94e22382..0e34279 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1949,7 +1949,7 @@ static int dw_mci_probe(struct platform_device *pdev)
* should put it in the platform data.
*/
fifo_size = mci_readl(host, FIFOTH);
- fifo_size = 1 + ((fifo_size >> 16) & 0x7ff);
+ fifo_size = 1 + ((fifo_size >> 16) & 0xfff);
} else {
fifo_size = host->pdata->fifo_depth;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
2012-01-09 1:06 mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation Jaehoon Chung
@ 2012-01-09 9:41 ` James Hogan
2012-01-11 9:28 ` James Hogan
0 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2012-01-09 9:41 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc, Chris Ball, Kyungmin Park, Will Newton
On 01/09/2012 01:06 AM, Jaehoon Chung wrote:
> In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1".
> Finally, FIFO_DEPTH = bit[27:16] + 1.
>
> Now, Used the 0x7ff. but 0xfff is right.
Nice catch. The patch itself looks okay, but I don't think the commit
message is very understandable, maybe something like this would be better?:
In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
to use the mask 0xfff instead of 0x7ff.
Cheers
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
2012-01-09 9:41 ` James Hogan
@ 2012-01-11 9:28 ` James Hogan
2012-01-11 9:59 ` Jaehoon Chung
0 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2012-01-11 9:28 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: linux-mmc, Chris Ball, Kyungmin Park, Will Newton
On 09/01/12 09:41, James Hogan wrote:
> On 01/09/2012 01:06 AM, Jaehoon Chung wrote:
>> In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1".
>> Finally, FIFO_DEPTH = bit[27:16] + 1.
>>
>> Now, Used the 0x7ff. but 0xfff is right.
>
> Nice catch. The patch itself looks okay, but I don't think the commit
> message is very understandable, maybe something like this would be better?:
>
> In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
> FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
> to use the mask 0xfff instead of 0x7ff.
>
> Cheers
> James
Are you happy having your signed-off-by against this identical patch with
a modified message Jaehoon?
From: Jaehoon Chung <jh80.chung@samsung.com>
In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
to use the mask 0xfff instead of 0x7ff.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
---
drivers/mmc/host/dw_mmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index cc54808..6ea6185 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2075,7 +2075,7 @@ static int dw_mci_probe(struct platform_device *pdev)
* should put it in the platform data.
*/
fifo_size = mci_readl(host, FIFOTH);
- fifo_size = 1 + ((fifo_size >> 16) & 0x7ff);
+ fifo_size = 1 + ((fifo_size >> 16) & 0xfff);
} else {
fifo_size = host->pdata->fifo_depth;
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
2012-01-11 9:28 ` James Hogan
@ 2012-01-11 9:59 ` Jaehoon Chung
2012-01-11 19:14 ` Chris Ball
0 siblings, 1 reply; 5+ messages in thread
From: Jaehoon Chung @ 2012-01-11 9:59 UTC (permalink / raw)
To: James Hogan
Cc: Jaehoon Chung, linux-mmc, Chris Ball, Kyungmin Park, Will Newton
Hi James,
Thank you..:)
Best Regards,
Jaehoon Chung
On 01/11/2012 06:28 PM, James Hogan wrote:
> On 09/01/12 09:41, James Hogan wrote:
>> On 01/09/2012 01:06 AM, Jaehoon Chung wrote:
>>> In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1".
>>> Finally, FIFO_DEPTH = bit[27:16] + 1.
>>>
>>> Now, Used the 0x7ff. but 0xfff is right.
>>
>> Nice catch. The patch itself looks okay, but I don't think the commit
>> message is very understandable, maybe something like this would be better?:
>>
>> In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
>> FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
>> to use the mask 0xfff instead of 0x7ff.
>>
>> Cheers
>> James
>
> Are you happy having your signed-off-by against this identical patch with
> a modified message Jaehoon?
>
> From: Jaehoon Chung <jh80.chung@samsung.com>
>
> In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
> FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
> to use the mask 0xfff instead of 0x7ff.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: James Hogan <james.hogan@imgtec.com>
> ---
> drivers/mmc/host/dw_mmc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index cc54808..6ea6185 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2075,7 +2075,7 @@ static int dw_mci_probe(struct platform_device *pdev)
> * should put it in the platform data.
> */
> fifo_size = mci_readl(host, FIFOTH);
> - fifo_size = 1 + ((fifo_size >> 16) & 0x7ff);
> + fifo_size = 1 + ((fifo_size >> 16) & 0xfff);
> } else {
> fifo_size = host->pdata->fifo_depth;
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
2012-01-11 9:59 ` Jaehoon Chung
@ 2012-01-11 19:14 ` Chris Ball
0 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2012-01-11 19:14 UTC (permalink / raw)
To: Jaehoon Chung; +Cc: James Hogan, linux-mmc, Kyungmin Park, Will Newton
Hi,
On Wed, Jan 11 2012, Jaehoon Chung wrote:
> Hi James,
>
> Thank you..:)
>
> Best Regards,
> Jaehoon Chung
>
> On 01/11/2012 06:28 PM, James Hogan wrote:
>
>> On 09/01/12 09:41, James Hogan wrote:
>>> On 01/09/2012 01:06 AM, Jaehoon Chung wrote:
>>>> In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1".
>>>> Finally, FIFO_DEPTH = bit[27:16] + 1.
>>>>
>>>> Now, Used the 0x7ff. but 0xfff is right.
>>>
>>> Nice catch. The patch itself looks okay, but I don't think the commit
>>> message is very understandable, maybe something like this would be better?:
>>>
>>> In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
>>> FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
>>> to use the mask 0xfff instead of 0x7ff.
>>>
>>> Cheers
>>> James
>>
>> Are you happy having your signed-off-by against this identical patch with
>> a modified message Jaehoon?
>>
>> From: Jaehoon Chung <jh80.chung@samsung.com>
>>
>> In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to
>> FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it
>> to use the mask 0xfff instead of 0x7ff.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Reviewed-by: James Hogan <james.hogan@imgtec.com>
Thanks, merged to mmc-next for 3.3.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-11 19:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 1:06 mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation Jaehoon Chung
2012-01-09 9:41 ` James Hogan
2012-01-11 9:28 ` James Hogan
2012-01-11 9:59 ` Jaehoon Chung
2012-01-11 19:14 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).