From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4589FC48BE6 for ; Mon, 14 Jun 2021 05:58:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16D0461009 for ; Mon, 14 Jun 2021 05:58:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16D0461009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04AD680412; Mon, 14 Jun 2021 07:58:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="dokdAd1K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4307680412; Mon, 14 Jun 2021 07:58:13 +0200 (CEST) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA83A800B2 for ; Mon, 14 Jun 2021 07:58:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@samsung.com Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210614055804epoutp029b5cc08dc2e7ca4cf8fec8e1c3a5c0cd~IXVTcLSUj1824918249epoutp02R for ; Mon, 14 Jun 2021 05:58:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210614055804epoutp029b5cc08dc2e7ca4cf8fec8e1c3a5c0cd~IXVTcLSUj1824918249epoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1623650284; bh=Elep5DSKC5QyePiQSoLfSZDFPswc9AML6+xFkzAqaqw=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=dokdAd1KxePt6xlM/HGTN+bC3RbcDmvXwvUXMv2aL4wxS98Ps2HlWu4xjhiR1zTWz iue/2pyMcODbljUGugUEbmbSRn3kIf/9jWlE6UMOKRoA/aIYZKF0ap2Ovs8tQHd7OE oQzD3MTGso8dS4SZu9quYqCDXFG1jq15A9djIsck= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20210614055804epcas1p40499494ceda05b7179fe3d1349d138da~IXVTMwDm01772917729epcas1p4m; Mon, 14 Jun 2021 05:58:04 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.152]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4G3LMs2srZz4x9Q5; Mon, 14 Jun 2021 05:58:01 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 67.99.09578.6EFE6C06; Mon, 14 Jun 2021 14:57:58 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210614055758epcas1p23226703006696ae1522f21045b5bdeec~IXVNg58_J0681506815epcas1p24; Mon, 14 Jun 2021 05:57:58 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210614055758epsmtrp191a5c4fb0493992fbf526cd7b5bf7c31~IXVNgEhqg1888218882epsmtrp1l; Mon, 14 Jun 2021 05:57:58 +0000 (GMT) X-AuditID: b6c32a35-fcfff7000000256a-3e-60c6efe6f878 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 0F.09.08163.6EFE6C06; Mon, 14 Jun 2021 14:57:58 +0900 (KST) Received: from [10.113.113.235] (unknown [10.113.113.235]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210614055758epsmtip2848d08dfeaa89e6414a8d214a957c331~IXVNPDV4e2100521005epsmtip2-; Mon, 14 Jun 2021 05:57:58 +0000 (GMT) Subject: Re: [RESEND PATCH v6 2/2] mmc: openpiton: add piton_mmc driver To: Tianrui Wei , u-boot@lists.denx.de Cc: ycliang@andestech.com, rick@andestech.com, peng.fan@nxp.com, jbalkind@ucsb.edu, seanga2@gmail.com, bmeng.cn@gmail.com From: Jaehoon Chung Message-ID: <7c76e66e-5dfa-c67a-20fc-d6fb9da50bea@samsung.com> Date: Mon, 14 Jun 2021 14:58:51 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAA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d74s9+954KzJuW/V1yq2n0xQdcrdxX7ZZcOJCw/d3+X80n6jJebJ5RH3q5a+oDxyrD 9L2beiRCd8oY75/WtODX5mgXJZbijERDLeai4kQAbxeVVRADAAA= X-CMS-MailID: 20210614055758epcas1p23226703006696ae1522f21045b5bdeec X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210612171721epcas1p1a46ad483afab3625ecec3dea5e3e1bcc References: <20210612171650.7247-1-tianrui-wei@outlook.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Tianrui, On 6/14/21 9:28 AM, Tianrui Wei wrote: > Hi Jaehoon, > > > Many thanks for taking the time to review our patches :P > > > On 6/14/2021 6:09 AM, Jaehoon Chung wrote: >> Dear Tianrui, >> >> On 6/13/21 2:16 AM, Tianrui Wei wrote: >>> This commit adds support to piton_mmc driver for OpenPiton-riscv64 >>> In particular, this driver >>> >>> - V6 >>>    . change type of address >>>    . move declarations ahead >>>    . loop style update >>> >>> Signed-off-by: Tianrui Wei >>> Signed-off-by: Jonathan Balkind >>> --- >>>   drivers/mmc/Kconfig     |   9 +++ >>>   drivers/mmc/Makefile    |   1 + >>>   drivers/mmc/piton_mmc.c | 169 ++++++++++++++++++++++++++++++++++++++++ >>>   3 files changed, 179 insertions(+) >>>   create mode 100644 drivers/mmc/piton_mmc.c >>> >>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig >>> index 8901456967..096d6a930c 100644 >>> --- a/drivers/mmc/Kconfig >>> +++ b/drivers/mmc/Kconfig >>> @@ -727,6 +727,15 @@ config MMC_SUNXI_HAS_MODE_SWITCH >>>       bool >>>       depends on MMC_SUNXI >>>   +config MMC_PITON >>> +    bool "MMC support for OpenPiton SoC" >>> +    depends on DM_MMC && BLK >>> +    help >>> +        This selects support for the SD host controller on >>> +        OpenPiton SoC. Note that this SD controller directly >>> +        exposes the contents of the SD card as memory mapped, >>> +        so there is no manual configuration required >> Fix indentation. > > > Will do > > >> >>> + >>>   config GENERIC_ATMEL_MCI >>>       bool "Atmel Multimedia Card Interface support" >>>       depends on DM_MMC && BLK && ARCH_AT91 >>> diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile >>> index 89d6af3db3..cc08b41d0d 100644 >>> --- a/drivers/mmc/Makefile >>> +++ b/drivers/mmc/Makefile >>> @@ -72,6 +72,7 @@ obj-$(CONFIG_MMC_SDHCI_XENON)        += xenon_sdhci.o >>>   obj-$(CONFIG_MMC_SDHCI_ZYNQ)        += zynq_sdhci.o >>>     obj-$(CONFIG_MMC_SUNXI)            += sunxi_mmc.o >>> +obj-$(CONFIG_MMC_PITON)         += piton_mmc.o >> Ditto. >> >>>   obj-$(CONFIG_MMC_UNIPHIER)        += tmio-common.o uniphier-sd.o >>>   obj-$(CONFIG_RENESAS_SDHI)        += tmio-common.o renesas-sdhi.o >>>   obj-$(CONFIG_MMC_BCM2835)        += bcm2835_sdhost.o >>> diff --git a/drivers/mmc/piton_mmc.c b/drivers/mmc/piton_mmc.c >>> new file mode 100644 >>> index 0000000000..32671d1a89 >>> --- /dev/null >>> +++ b/drivers/mmc/piton_mmc.c >>> @@ -0,0 +1,169 @@ >>> +// SPDX-License-Identifier: GPL-2.0+ >>> +/* >>> + * (C) Copyright 2009 SAMSUNG Electronics >>> + * Minkyu Kang >>> + * Jaehoon Chung >>> + * Portions Copyright 2011-2019 NVIDIA Corporation >>> + * Portions Copyright 2021 Tianrui Wei >>> + * This file is adapted from tegra_mmc.c >>> + * Tianrui Wei >>> + */ >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +struct piton_mmc_plat { >>> +    struct mmc_config cfg; >>> +    struct mmc mmc; >>> +}; >>> + >>> +struct piton_mmc_priv { >>> +    void __iomem *piton_mmc_base_addr; /* peripheral id */ >>> +}; >>> + >>> +/* >>> + * see mmc_read_blocks to see how it is used. >>> + * start block is hidden at cmd->arg >>> + * also, initialize the block size at init >>> + */ >>> +static int piton_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, >>> +                                                            struct mmc_data *data) >> Ditto. > > > Will do > > >> >>> +{ >>> +    /* check first if this is a pure command */ >>> +    if (!data) >>> +        return 0; >>> + >>> +    struct piton_mmc_priv *priv = dev_get_priv(dev); >>> +    u32 *buff, *start_addr; >>> +    size_t byte_cnt, start_block; >>> + >>> +    buff = (u32 *)data->dest; >>> +    start_block = cmd->cmdarg; >>> +    start_addr = priv->piton_mmc_base_addr + start_block; >>> + >>> +    /* if there is a read */ >>> +    if (data->flags & MMC_DATA_READ) { >>> +        for (byte_cnt = data->blocks * data->blocksize; byte_cnt; >>> +                 byte_cnt -= sizeof(u32)) { >>> +            *buff++ = readl(start_addr++); >>> +        } >>> +    } else { >>> +        return -ENOSYS; >> Is is right to return -ENOSYS? MMC_DATA_WRITE doesn't support? > > > Will change to support it > > >> >>> +    } >>> + >>> +    return 0; >>> +} >>> + >>> +static int piton_mmc_ofdata_to_platdata(struct udevice *dev) >>> +{ >>> +    struct piton_mmc_priv *priv = dev_get_priv(dev); >>> +    struct piton_mmc_plat *plat = dev_get_platdata(dev); >>> +    struct mmc_config *cfg; >>> +    struct mmc *mmc; >>> +    /* fill in device description */ >>> +    struct blk_desc *bdesc; >>> + >>> +    priv->piton_mmc_base_addr = (void *)dev_read_addr(dev); >>> +    cfg = &plat->cfg; >>> +    cfg->name = "PITON MMC"; >>> +    cfg->host_caps = MMC_MODE_8BIT; >>> +    cfg->f_max = 100000; >> f_max is 100K? I don't think so. > > > We don't use f_max anywhere, so we're setting dummy values :P > > >> >>> +    cfg->f_min = 400000; >>> +    cfg->voltages = MMC_VDD_21_22; >>> + >>> +    mmc = &plat->mmc; >>> +    mmc->read_bl_len = MMC_MAX_BLOCK_LEN; >>> +    mmc->capacity_user = 0x100000000; >>> +    mmc->capacity_user *= mmc->read_bl_len; >>> +    mmc->capacity_boot = 0; >>> +    mmc->capacity_rpmb = 0; >>> +    for (int i = 0; i < 4; i++) >>> +        mmc->capacity_gp[i] = 0; >>> +    mmc->capacity = 0x2000000000ULL; >> Use macro. It's not readable. What's 0x2000000000ULL? > > > Will do > > >> >>> +    mmc->has_init = 1; >> Right? has_init will be set in mmc.c. >> Why it's set to 1 in driver? > > > Our mmc controller directly maps the contents of the SD card into a > > memory region, so there're no configuration registers avaiable. We're > > setting these values to avoid problems with mmc.c > > >> >>> + >>> +    bdesc = mmc_get_blk_desc(mmc); >>> +    bdesc->lun = 0; >>> +    bdesc->hwpart = 0; >>> +    bdesc->type = 0; >>> +    bdesc->blksz = mmc->read_bl_len; >>> +    bdesc->log2blksz = LOG2(bdesc->blksz); >>> +    bdesc->lba = lldiv(mmc->capacity, mmc->read_bl_len); >>> + >>> +    return 0; >>> +} >>> + >>> +/* test if the micro sd card is present >>> + * always return 1, which means present >>> + */ >>> +static int piton_mmc_getcd(struct udevice *dev) >>> +{ >>> +    /* >>> +     * always return 1 >>> +     */ >>> +    return 1; >>> +} >>> + >>> +/* dummy function, piton_mmc don't need initialization >>> + * in hw >>> + */ >>> +static const struct dm_mmc_ops piton_mmc_ops = { >>> +    .send_cmd = piton_mmc_send_cmd, >>> +    .get_cd = piton_mmc_getcd, >>> +}; >>> + >>> +static int piton_mmc_probe(struct udevice *dev) >>> +{ >>> +    struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); >>> +    struct piton_mmc_plat *plat = dev_get_platdata(dev); >>> +    struct mmc_config *cfg = &plat->cfg; >>> + >>> +    cfg->name = dev->name; >>> +    upriv->mmc = &plat->mmc; >>> +    upriv->mmc->has_init = 1; >> Ditto. > > > Ditto > > >> >>> +    upriv->mmc->capacity = 0x2000000000ULL; >> Ditto. > > > Ditto > > >> >>> +    upriv->mmc->read_bl_len = MMC_MAX_BLOCK_LEN; >> readl_blk_len will be set in mmc.c. >> Your driver doesn't use mmc.c? Why do you set to some values in your driver? > > > Ditto > > >> >>> +    return 0; >>> +} >>> + >>> +static int piton_mmc_bind(struct udevice *dev) >>> +{ >>> +    struct piton_mmc_plat *plat = dev_get_platdata(dev); >>> +    struct mmc_config *cfg = &plat->cfg; >>> + >>> +    cfg->name = dev->name; >>> +    cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT; >>> +    cfg->voltages = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34; >>> +    cfg->f_min = 1000000; >>> +    cfg->f_max = 52000000; >>> +    cfg->b_max = U32_MAX; >> Use a readable value instead of U32_MAX. CONFIG_SYS_MMC_MAX_BLK_COUNT or other. > > > Will do. > > > Thanks for your review and helpful comments. We're very keen to get this upstream so I > > will address your issues ASAP and get a new version submitted. Regarding readl_blk_len, > > our MMC is a bit of a special case in that it's directly memory mapped under the hood. > > Can we go ahead with this version or might you have another suggestion? I think that it can be applied after fixing some indentation. It seems that other things can be updated after applied your patches. BTW, which board can this driver be used? Is there open board that can i use? Best Regards, Jaehoon Chung > > > Best regards, > > Tianrui > > >> >> Best Regards, >> Jaehoon Chung >> >>> + >>> +    return mmc_bind(dev, &plat->mmc, cfg); >>> +} >>> + >>> +static const struct udevice_id piton_mmc_ids[] = { >>> +    {.compatible = "openpiton,piton-mmc"}, >>> +    {/* sentinel */} >>> +}; >>> + >>> +U_BOOT_DRIVER(piton_mmc_drv) = { >>> +    .name = "piton_mmc", >>> +    .id = UCLASS_MMC, >>> +    .of_match = piton_mmc_ids, >>> +    .ofdata_to_platdata = piton_mmc_ofdata_to_platdata, >>> +    .bind = piton_mmc_bind, >>> +    .probe = piton_mmc_probe, >>> +    .ops = &piton_mmc_ops, >>> +    .platdata_auto_alloc_size = sizeof(struct piton_mmc_plat), >>> +    .priv_auto_alloc_size = sizeof(struct piton_mmc_priv), >>> +}; >>> >