From: Jaehoon Chung <jh80.chung@samsung.com>
To: Girish K S <girish.shivananjappa@linaro.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
Seungwon Jeon <tgih.jun@samsung.com>,
linux-mmc@vger.kernel.org, cjb@laptop.org,
will.newton@imgtec.com, James Hogan <James.Hogan@imgtec.com>
Subject: Re: [PATCH] Revert "mmc: dw_mmc: Add check for IDMAC configuration"
Date: Tue, 11 Sep 2012 13:46:05 +0900 [thread overview]
Message-ID: <504EC20D.2030105@samsung.com> (raw)
In-Reply-To: <CAGxe1ZFqp_WZNfBNf=LNNBvKh2oscVHAuy0J-mx2-3xjBLh66Q@mail.gmail.com>
On 09/11/2012 01:40 PM, Girish K S wrote:
> On 11 September 2012 10:06, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> On 09/11/2012 12:46 PM, Girish K S wrote:
>>> On 11 September 2012 07:53, Seungwon Jeon <tgih.jun@samsung.com> wrote:
>>>> This reverts commit 94c6cee91(Add check for IDMAC configuration).
>>>> Synopsys says that only if internal dmac is not present, optional
>>>> external dma interface is present. When internal dmac is present,
>>>> '0' value in DMA_INTERFACE of HCON is reasonable. DMA_INTERFACE
>>>> indicates external dma interface. And idmac initialization is
>>>> prohibited now. So, let's revert this commit.
>>>
>>> There is no register, or a field in any register which says IDMAC present.
>>> I can see only use_idmac bit field in CTRL register.
>>> So in first place how will i know whether IDMAC is present? Have you
>>> assumed that IDMAC is present.
>>> I would like to know without assuming, whether IDMAC is present.
>>> If i have missed out something let me know. i will check and revert back
>> I understood that if INTERNAL_DMAC at HCON register is set to 1, we didn't consdier the DMA_INTERFACE's value.
> I cannot see any field by name INTERNAL_DMAC in the HCON: can you
> please tell me the bit position of it.
> I think INTERNAL_DMAC is the signal interface to AXI master.
Sorry, You're right. there is no field for INTERNAL_DMAC at HCON register.
>> So although dma_interface is set to 0 or others, host can use the internal DMA.
>>
>> Best Regards,
>> Jaehoon Chung
>>>
>>>>
>>>> CC: Girish K S <girish.shivananjappa@linaro.org>
>>>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>>>> ---
>>>> drivers/mmc/host/dw_mmc.c | 15 ++-------------
>>>> 1 files changed, 2 insertions(+), 13 deletions(-)
>>>>
>>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>>>> index 36f98c0..dcbe9aa 100644
>>>> --- a/drivers/mmc/host/dw_mmc.c
>>>> +++ b/drivers/mmc/host/dw_mmc.c
>>>> @@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
>>>> static int dw_mci_idmac_init(struct dw_mci *host)
>>>> {
>>>> struct idmac_desc *p;
>>>> - int i, dma_support;
>>>> + int i;
>>>>
>>>> /* Number of descriptors in the ring buffer */
>>>> host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
>>>>
>>>> - /* Check if Hardware Configuration Register has support for DMA */
>>>> - dma_support = (mci_readl(host, HCON) >> 16) & 0x3;
>>>> -
>>>> - if (!dma_support || dma_support > 2) {
>>>> - dev_err(&host->dev,
>>>> - "Host Controller does not support IDMA Tx.\n");
>>>> - host->dma_ops = NULL;
>>>> - return -ENODEV;
>>>> - }
>>>> -
>>>> - dev_info(&host->dev, "Using internal DMA controller.\n");
>>>> -
>>>> /* Forward link the descriptor list */
>>>> for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
>>>> p->des3 = host->sg_dma + (sizeof(struct idmac_desc) * (i + 1));
>>>> @@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)
>>>> /* Determine which DMA interface to use */
>>>> #ifdef CONFIG_MMC_DW_IDMAC
>>>> host->dma_ops = &dw_mci_idmac_ops;
>>>> + dev_info(&host->dev, "Using internal DMA controller.\n");
>>>> #endif
>>>>
>>>> if (!host->dma_ops)
>>>> --
>>>> 1.7.0.4
>>>>
>>>>
>>> --
>>> 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
>>>
>>
> --
> 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
>
next prev parent reply other threads:[~2012-09-11 4:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 2:23 [PATCH] Revert "mmc: dw_mmc: Add check for IDMAC configuration" Seungwon Jeon
2012-09-11 3:46 ` Girish K S
2012-09-11 4:36 ` Jaehoon Chung
2012-09-11 4:40 ` Girish K S
2012-09-11 4:46 ` Jaehoon Chung [this message]
2012-09-11 5:46 ` Seungwon Jeon
2012-09-11 5:58 ` Girish K S
2012-09-11 6:39 ` Seungwon Jeon
2012-09-11 7:11 ` Girish K S
2012-09-11 7:14 ` Girish K S
2012-09-12 2:21 ` Seungwon Jeon
2012-09-12 4:08 ` Girish K S
2012-09-17 11:15 ` Will Newton
2012-09-19 6:03 ` Chris Ball
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=504EC20D.2030105@samsung.com \
--to=jh80.chung@samsung.com \
--cc=James.Hogan@imgtec.com \
--cc=cjb@laptop.org \
--cc=girish.shivananjappa@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tgih.jun@samsung.com \
--cc=will.newton@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox