Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp538105yba; Wed, 15 May 2019 05:53:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2mFfo6PNLCOd9Q01LUboyymXVCSmA/tpH97lsETt6cBHvLRqyqZEhnMGyu+MW4sa6qzto X-Received: by 2002:a63:40b:: with SMTP id 11mr27707793pge.31.1557924789300; Wed, 15 May 2019 05:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557924789; cv=none; d=google.com; s=arc-20160816; b=Brd/w+QEGvHDkmbape8gIktqyqnLbCze00K8udFkt7U6/R/XH2ntKB6C3aJQv30z28 Tqv//heoCznWE2ZhGn00Si6eG6IwEvLSNXLNAPokIWYTtkL5z6yoH+2tmwK2uglTmN/E 20Q7C87prqc/ey5qUjidF6w8a1p8xh9+bSgC+wDgW6ELiYu7wNm8ezYg6m4V87I0GEMb ZeawB6N1HYzBpCjO5G+MuBlanWQ53jB5mQIlyR8aomT8xZWLTtpKHdc4zSS2V82CUpr4 1HJ75qltUFknHNxehpnzQZso8U8RufSJp1a8NPBX1MbLjdAlSnvHg8t655Gr2Nk7YRWO u0/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:dkim-signature; bh=Fg6OP2DED752HjsMq0NXZ5WlRg7LvFxNGMaPYkthNUY=; b=ZnFniDJegA0qdyHBzoch5qzkBTRb9pH5B/fLvRPAmCiJ+ABiGQ4Lem8UZ98DMlnWiH GNcf5T+Robb5xEVjJhN9hxrqXkRl2PujcnDVTY9GQ7fAntD3Nc9PAOdxufsYG2eyCcGJ ca5CDoCHRGKgiF/rSVRsSv0cxEJpPyVYiXZl3gnm8EP8w+pbsAXSQAxWbXksbGnvTvYM 32t/nxd1A+sGZdTKmxoJI5/wgL7Z09zat7WzXfBUUsJMA4im1XpTV5V51UsTRMKOTE+S 3gA2wKlrd7dnaBnHzTb14n/Yd5aVV5HTP+5IFPO0IPDgCa4QQNvjaYTvW5UbavG4juAK kjyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hrYt0/ao"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si1739909pgp.478.2019.05.15.05.52.52; Wed, 15 May 2019 05:53:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hrYt0/ao"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbfEOMvj (ORCPT + 99 others); Wed, 15 May 2019 08:51:39 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41499 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbfEOMvj (ORCPT ); Wed, 15 May 2019 08:51:39 -0400 Received: by mail-wr1-f66.google.com with SMTP id d12so2534169wrm.8 for ; Wed, 15 May 2019 05:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Fg6OP2DED752HjsMq0NXZ5WlRg7LvFxNGMaPYkthNUY=; b=hrYt0/aoSO+OJYi45mrG6h3xhg24TJsWQOaYbAqf/14KTr9tZzZwjtb37abQRsU4xw ScqubFPj8CjpxrQ3JpCeZa8uG5HR64PVoo352fY2k9nUlTYyEjdrACMhHM2lnEalNzIJ 3hg6JiSgu/Qyko65UeMCT8hx7uwEcudODuWvKf48U5u92mu2n9z1IwftNgrzDoajS/5o PINRMFaWApSaldNe55zR/y+g00obzx4T7YzJHeGWF6vvdNUWJa4ptGLLRM2rbCWseLiN S1nD+GZGX191eGNHZHVI7RF8WEFgwn9+9s7FRzh/ndxgK1/9wDj+tjQzAcPMa/G1aemW 64vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Fg6OP2DED752HjsMq0NXZ5WlRg7LvFxNGMaPYkthNUY=; b=YTB8ArIeJfrSLlc1LrAbX0JLphHT5iSwzoz0AMxzJkJBjn+Bk31NIp2+G4ednemzbW XKTyYFVDOrM+qnfPTVk7h2veVJV0Rk+5fpOlQ+ebCWNZCIK1DcBG6y6siNtXC3JEBySX qUzOrI+AxG9JKFoHGnKnP/rEoNISGg59IaoFgpI7tfkA8fPJFPGSXX4Ae52hwmNfhvRA xZhqEXfVXK/Ar0p+Z+r22yF/FZKHPpNpFEIylmv5i5WHjp1uPuwMlicuiYcIEDeeb5m8 7azDzvKr5BRh6srRE/x36+gJLTTkNQnOmKJrWbxD2U1M5ugixLsrlddBQoBsxzACz2k0 beSg== X-Gm-Message-State: APjAAAUWXvJHDQ095MNgVUcc24Gke5qhw1Nh2pr8f/O9hybBEop/B2rp wgPMh3xDVRVPnb/12oSXEkRsN+BhDRsiYA== X-Received: by 2002:a5d:4b0a:: with SMTP id v10mr21281017wrq.115.1557924696502; Wed, 15 May 2019 05:51:36 -0700 (PDT) Received: from [10.1.2.12] (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id l16sm3057132wrb.40.2019.05.15.05.51.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 05:51:35 -0700 (PDT) Subject: Re: [PATCH 2/3] mmc: meson-gx: add ddr-access-quirk To: Ulf Hansson Cc: Kevin Hilman , baylibre-upstreaming@groups.io, "linux-mmc@vger.kernel.org" , "open list:ARM/Amlogic Meson..." , Linux ARM , Linux Kernel Mailing List References: <20190513091548.16674-1-narmstrong@baylibre.com> <20190513091548.16674-3-narmstrong@baylibre.com> From: Neil Armstrong Openpgp: preference=signencrypt Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfIRXdslbrxi4pk5VKU6ZP9AKsN NtMZntB8WrBTtkAZfZbTF7850uwd3eU5cN/7N1Q6g0JQihE7w4GlIkEpQ8vwSg5W7hkx3yQ6 2YzrUZh/b7QThXbNZ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W4trmui NIJCOku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: <610fa8f2-29ec-96c6-b238-a1f444ad1c5b@baylibre.com> Date: Wed, 15 May 2019 14:51:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/05/2019 13:34, Ulf Hansson wrote: > On Mon, 13 May 2019 at 11:16, Neil Armstrong wrote: >> >> On the Amlogic G12A SoC family, (only) the SDIO controller fails to access >> the data from DDR, leading to a broken controller. > > Could you possibly make it more clear that this is about the internal > DMA support in the controller that is broken? > > Did you consider to use the controller without using the DMA mode? Is > that possible? No we can only use the DMA, in block mode (using our bounce buffer mode) or in descriptor mode. > >> >> But each MMC controller has 1,5KiB of SRAM after the registers, that can >> be used as bounce buffer to avoid direct DDR access from the integrated >> DMAs (this SRAM may be used by the boot ROM when DDR is not yet initialized). > > I think "DDR" is a confusing terminology, that goes for the DT binding > as well. What about using "DRAM" instead? Seems better, I'll wait on Rob's feedback on this a few more days. > > In any case, using the SRAM seems like it could work. However, just so > I get this right, it solely dedicated to the SDIO controller or may > someone else also try to use it? This SRAM is dedicated to *each* MMC controller. Not sure if other masters could access it, but it would be unfortunate. I'll add these details in the commit log. > >> >> The quirk is to disable the chained descriptor for this controller, and >> use this SRAM memory zone as buffer for the bounce buffer fallback mode. >> >> The performance hit hasn't been evaluated, but the fix has been tested >> using a WiFi AP6398S SDIO module, and the iperf3 Bandwidth measurement gave >> 55.2 Mbits/sec over a 63 Hours long test, with the SDIO ios set as High-Speed >> at 50MHz clock. It gave 170 Mbits/sec as SDR104 and 200MHz clock. > > If possible to not use DMA, it would be interesting to compare numbers. :-) I could activate this quirk on a MMC or SDcard dedicated controller and compare, but SDIO and MMC/SDcard transactions are really different. We compared it on the AXG platform with the same MMC controller revision, CPU freq, DRAM technology, kernel revision and the peak WiFi "speed" was equivalent, but with a slighly superior CPU usage. > >> >> Signed-off-by: Neil Armstrong >> --- >> drivers/mmc/host/meson-gx-mmc.c | 65 ++++++++++++++++++++++++++------- >> 1 file changed, 52 insertions(+), 13 deletions(-) >> >> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c >> index c5a8af4ca76b..6ef465304052 100644 >> --- a/drivers/mmc/host/meson-gx-mmc.c >> +++ b/drivers/mmc/host/meson-gx-mmc.c >> @@ -129,6 +129,9 @@ >> #define SD_EMMC_TXD 0x94 >> #define SD_EMMC_LAST_REG SD_EMMC_TXD >> >> +#define SD_EMMC_SRAM_DATA_BUF_LEN 1536 >> +#define SD_EMMC_SRAM_DATA_BUF_OFF 0x200 >> + >> #define SD_EMMC_CFG_BLK_SIZE 512 /* internal buffer max: 512 bytes */ >> #define SD_EMMC_CFG_RESP_TIMEOUT 256 /* in clock cycles */ >> #define SD_EMMC_CMD_TIMEOUT 1024 /* in ms */ >> @@ -168,6 +171,8 @@ struct meson_host { >> unsigned long req_rate; >> bool ddr; >> >> + bool ddr_access_quirk; >> + >> struct pinctrl *pinctrl; >> struct pinctrl_state *pins_default; >> struct pinctrl_state *pins_clk_gate; >> @@ -232,11 +237,20 @@ static struct mmc_command *meson_mmc_get_next_command(struct mmc_command *cmd) >> static void meson_mmc_get_transfer_mode(struct mmc_host *mmc, >> struct mmc_request *mrq) >> { >> + struct meson_host *host = mmc_priv(mmc); >> struct mmc_data *data = mrq->data; >> struct scatterlist *sg; >> int i; >> bool use_desc_chain_mode = true; >> >> + /* >> + * When Controller DMA cannot directly access DDR memory, disable >> + * support for Chain Mode to directly use the internal SRAM using >> + * the bounce buffer mode. >> + */ >> + if (host->ddr_access_quirk) >> + return; >> + >> /* >> * Broken SDIO with AP6255-based WiFi on Khadas VIM Pro has been >> * reported. For some strange reason this occurs in descriptor >> @@ -1049,6 +1063,10 @@ static int meson_mmc_probe(struct platform_device *pdev) >> host->dev = &pdev->dev; >> dev_set_drvdata(&pdev->dev, host); >> >> + /* The G12A SDIO Controller needs an SRAM bounce buffer */ >> + host->ddr_access_quirk = device_property_read_bool(&pdev->dev, >> + "amlogic,ddr-access-quirk"); >> + >> /* Get regulators and the supported OCR mask */ >> host->vqmmc_enabled = false; >> ret = mmc_regulator_get_supply(mmc); >> @@ -1146,9 +1164,16 @@ static int meson_mmc_probe(struct platform_device *pdev) >> goto err_init_clk; >> >> mmc->caps |= MMC_CAP_CMD23; >> - mmc->max_blk_count = CMD_CFG_LENGTH_MASK; >> + if (host->ddr_access_quirk) { >> + /* Limit to the available sram memory */ >> + mmc->max_segs = SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size; >> + mmc->max_blk_count = mmc->max_segs; >> + } else { >> + mmc->max_blk_count = CMD_CFG_LENGTH_MASK; >> + mmc->max_segs = SD_EMMC_DESC_BUF_LEN / >> + sizeof(struct sd_emmc_desc); >> + } >> mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; >> - mmc->max_segs = SD_EMMC_DESC_BUF_LEN / sizeof(struct sd_emmc_desc); >> mmc->max_seg_size = mmc->max_req_size; >> >> /* >> @@ -1158,15 +1183,27 @@ static int meson_mmc_probe(struct platform_device *pdev) >> */ >> mmc->caps2 &= ~MMC_CAP2_HS400; >> >> - /* data bounce buffer */ >> - host->bounce_buf_size = mmc->max_req_size; >> - host->bounce_buf = >> - dma_alloc_coherent(host->dev, host->bounce_buf_size, >> - &host->bounce_dma_addr, GFP_KERNEL); >> - if (host->bounce_buf == NULL) { >> - dev_err(host->dev, "Unable to map allocate DMA bounce buffer.\n"); >> - ret = -ENOMEM; >> - goto err_free_irq; >> + if (host->ddr_access_quirk) { >> + /* >> + * The MMC Controller embeds 1,5KiB of internal SRAM >> + * that can be used to be used as bounce buffer. >> + * In the case of the G12A SDIO controller, use these >> + * instead of the DDR memory >> + */ >> + host->bounce_buf_size = SD_EMMC_SRAM_DATA_BUF_LEN; >> + host->bounce_buf = host->regs + SD_EMMC_SRAM_DATA_BUF_OFF; >> + host->bounce_dma_addr = res->start + SD_EMMC_SRAM_DATA_BUF_OFF; >> + } else { >> + /* data bounce buffer */ >> + host->bounce_buf_size = mmc->max_req_size; >> + host->bounce_buf = >> + dma_alloc_coherent(host->dev, host->bounce_buf_size, >> + &host->bounce_dma_addr, GFP_KERNEL); >> + if (host->bounce_buf == NULL) { >> + dev_err(host->dev, "Unable to map allocate DMA bounce buffer.\n"); >> + ret = -ENOMEM; >> + goto err_free_irq; >> + } >> } >> >> host->descs = dma_alloc_coherent(host->dev, SD_EMMC_DESC_BUF_LEN, >> @@ -1208,8 +1245,10 @@ static int meson_mmc_remove(struct platform_device *pdev) >> >> dma_free_coherent(host->dev, SD_EMMC_DESC_BUF_LEN, >> host->descs, host->descs_dma_addr); >> - dma_free_coherent(host->dev, host->bounce_buf_size, >> - host->bounce_buf, host->bounce_dma_addr); >> + >> + if (!host->ddr_access_quirk) >> + dma_free_coherent(host->dev, host->bounce_buf_size, >> + host->bounce_buf, host->bounce_dma_addr); >> >> clk_disable_unprepare(host->mmc_clk); >> clk_disable_unprepare(host->core_clk); >> -- >> 2.21.0 >> Thanks for reviewing, > > Kind regards > Uffe >