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=-12.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 AD6C6C2B9F4 for ; Mon, 14 Jun 2021 17:24:21 +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 E376461241 for ; Mon, 14 Jun 2021 17:24:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E376461241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=outlook.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 0AAC182024; Mon, 14 Jun 2021 19:24:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=outlook.com header.i=@outlook.com header.b="ESIPqQ31"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6BAF80EC7; Mon, 14 Jun 2021 19:24:17 +0200 (CEST) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-hk2apc01olkn0811.outbound.protection.outlook.com [IPv6:2a01:111:f400:febc::811]) (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 3E98D80EC7 for ; Mon, 14 Jun 2021 19:24:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tianrui-wei@outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JnWewNBkbBitKIFPfSWR9KmClFo40LFj8260fWhq9l+EQsRPmqRyu2a3AlMCxPUTQT9lWoLjGnTnNMc6Xr6ApTD96yZnqo9f9OuuutCscKDwo5ROBWLAzuWGgSP0RgzZHSsbKbyYFW4Vhr8h8cEM6/NhanLIXvo7nTXBgokTOvzdkGoYqsPae8krMrwuhgTm0U/8yVhaozyOz2i9GoARIcpt1QWgUdAXiQgtXlM2P3VotrGjWznYwTqK0HMiO/HhXeybcsrnaVpA68JM5z6yvZs3N5ZeJJvSaGp0jzUM/s1SLZ89PG7S4A8//1SdSMlLOQOe7zlmIiyRTgASOh0w6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yyxXx8oMq/PM23r4DxShsgSIDWXKjtniRscEXEIkBCo=; b=Jh6l66HWHQkQu0t/0au0Brjvb72rRXAO1geZeIqFvv3osKTgLh6wj8Y4v0xWmeIvmJV5dLQAWmILR0X6hdYhJSmDEMkJbGcrTFS/X6farxzTYsZCq3xh+iAYlhhlzA2WJJ6jxSVmi8aVK0GUU6Jji/UPgSdojpm+bNR4Q4xmu5xsOgvxXZzqr+K9ap1Yh1ym2O/Azwv0LUGgOjSvWWUKskRFGSxdgG8J+w9DRiV7MpeL6ZYrkViKlPlr+Nfxiw0ybj/7BT8IR1TvRzZgu+5im0DAI+ooUxIIKFFe0i4X0GVs1xkyRGpvyrFk4ohipfVt2GE00JVuJCoJFt4wnKdL4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yyxXx8oMq/PM23r4DxShsgSIDWXKjtniRscEXEIkBCo=; b=ESIPqQ3174CzGRSNrS5PPlTzaYgdiLsNEntZP4lVi64kgeKE9SCtajmi7Bw8jzX/KXnLTmtaw5Mbn30lOnkEC8Puw918Zx73jBA/ysHeZktyo6tIkmToSarZPf09pL+Ud13lcddsIAIGyCt9biCSligMcgZWCsWGySKRt0mW/wCaXXm3W5aYrwA3A1dRRQ22H/e4DaBN6fl+Ds1U9VMwUJCm2e0hV41P0dMJjq4mKNZcdteHKSRjqOlC6nAsY3tOR2b+v01sqxd5s2GhmNHXnglJ6yV/H8/pmos88MRKSyhNwWHyHfOLDp0cHLoWq/qCqEoJloy89ZcixBUMbmMd4A== Received: from PS1PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:300:75::16) by KL1PR0401MB4372.apcprd04.prod.outlook.com (2603:1096:820:2c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Mon, 14 Jun 2021 17:24:03 +0000 Received: from PU1APC01FT018.eop-APC01.prod.protection.outlook.com (2603:1096:300:75:cafe::30) by PS1PR01CA0004.outlook.office365.com (2603:1096:300:75::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Mon, 14 Jun 2021 17:24:03 +0000 Received: from SY4PR01MB6798.ausprd01.prod.outlook.com (2a01:111:e400:7ebe::45) by PU1APC01FT018.mail.protection.outlook.com (2a01:111:e400:7ebe::445) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Mon, 14 Jun 2021 17:24:03 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:7C12A79FD87D80E4032C8EBC438E4DEA7EF63A1C136B9172F9B9046365E645E6; UpperCasedChecksum:84A355C76E5BC79E2D8F43CF2CA7D0B15F3ED9639620B777B060F33731316260; SizeAsReceived:9151; Count:48 Received: from SY4PR01MB6798.ausprd01.prod.outlook.com ([fe80::5476:5394:7bb7:6941]) by SY4PR01MB6798.ausprd01.prod.outlook.com ([fe80::5476:5394:7bb7:6941%2]) with mapi id 15.20.4219.025; Mon, 14 Jun 2021 17:24:03 +0000 Subject: Re: [RESEND PATCH v6 2/2] mmc: openpiton: add piton_mmc driver To: Jaehoon Chung , 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 References: <20210612171650.7247-1-tianrui-wei@outlook.com> <7c76e66e-5dfa-c67a-20fc-d6fb9da50bea@samsung.com> From: Tianrui Wei Message-ID: Date: Tue, 15 Jun 2021 01:23:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <7c76e66e-5dfa-c67a-20fc-d6fb9da50bea@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TMN: [Ni7uzJ1583j8d3wymALAEyCjcofsOXmH] X-ClientProxiedBy: HK2PR02CA0173.apcprd02.prod.outlook.com (2603:1096:201:1f::33) To SY4PR01MB6798.ausprd01.prod.outlook.com (2603:10c6:10:137::12) X-Microsoft-Original-Message-ID: <7b8d1488-8bba-481a-a2c6-c911d9b2be85@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.3.161] (180.160.51.170) by HK2PR02CA0173.apcprd02.prod.outlook.com (2603:1096:201:1f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Mon, 14 Jun 2021 17:24:01 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 88af384e-9205-4e53-282a-08d92f5934ac X-MS-TrafficTypeDiagnostic: KL1PR0401MB4372: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w5GMsycFhWV9H2x6hV/POBcmdYD29PxVpfI8Ho6RZ+STwiwug8lB7z3ZIw5UZECCZgSX6miiu0w92Daoeolcc8W3XKH3dU6ITkvRwfsOTecAmtcFLsUno68keHmITb2qn0xK4Hj9xL+bx0L1v00qzRkcsaW/6KcVq0KMCpQv2mM90OBZ9E7GhycVV9NfG/S2thhZX+qoRLFH4/45/kz8rhP5IOAKrlQG/eUyuxkE6XPhjjeQ9+Dsjh41yrzLU4vWbJw0Ttvpa/Ao1p7hpp0PjlZ6TNKCvzfddq7F3+YK5yG3SFmEixaWOK7T0/5uTisZIVKVTj6vmulelV4eKdgIHpSa5BtEr88Vx6YazPKt5dSyqfSzkPS4tZsTUtmQuq/Xs7Acw6Mpym3wj+1uQ2ExfQ== X-MS-Exchange-AntiSpam-MessageData: XcAxi/DNH1sC4fPxfPGGDKHvrUvwXpjM4LL5OWOTyHIlCz8VuWnNLLZwcr3BSOvQcD89tqVKVNAZxRkQGt7UqZOfh/bcEx308l/xqlj+o4cvwaZ273X/hFYA7rNoD+RvPvpr7yEct1e31oFCtbRjoA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88af384e-9205-4e53-282a-08d92f5934ac X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2021 17:24:03.4049 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT018.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0401MB4372 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 Dear Jaehoon, On 6/14/2021 1:58 PM, Jaehoon Chung wrote: > 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 Many thanks for taking the time and energy to review our code! If you want to test this driver, you can try Xilinx vc707, digilent nexys video and genesys 2. As our SoC is fpga based, these development boards are the easiest to work with. If you'd like to try it out, you could try the design as documented in the other patch's board documentation :P Best Regards, Tianrui > >> >> 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), >>>> +}; >>>>