From patchwork Mon Apr 12 12:12:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 419550 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1665670jaj; Mon, 12 Apr 2021 04:53:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj2iMO8cq/snYc7lQ1N5i2Zy4mKPhwq5aiXSHpeX6tMUoFeq8GN8lCwuWLRSn2s29/URiA X-Received: by 2002:aa7:d541:: with SMTP id u1mr28872226edr.95.1618228413306; Mon, 12 Apr 2021 04:53:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1618228413; cv=pass; d=google.com; s=arc-20160816; b=H26oGfIICq9A2QRRkS/aSPV7Mk6cv2k2Emj9DypOoGT1gevJeUFk8oH7EXPFJLKlfO b4POyIB8z0sKottE3eOTzTNZj9pDpyuNgIpCdocYUYt+0/4FEmk1Tsw6hyS/8LlSFSF9 QFX87/YFcHpddZZa/9RnqKoQ0QP6547nCZAVkMwgdUdDLs0sxAPdEoerRpU9cnh5uePE kq9s+gAErKvN5GU3Vs/rjSVQDHSJvT8UDbRxfuEIt2KC0rhcehSlKgVaE+dvd8mbDLQG yk470tujijZbnEXya6sQeMoSaXO63ZutFiZaORFRZbWaGtwfFT/7uEZ/xk0dwfXWfoZz +i8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=JjPxo2FXxIDkkmqm7R+gYAaHY+o5zPQ9kUSv77oiQ4o=; b=MZ8DtnciIAF+8O6WNbo3Vcz+5xzfTeKXkvc69Q1InaVxueBNTw5tlJe4jwswtXRWsG zUN/UUgtrvJaqQqZgHO/6AleQ/nPikTH8nwnXJCOqlhxZtgHTnXLkgoWMhBE+es5kqO2 Dznp62xi7SckREOFKG9GBw/Cbl6Q1ojBnNYCrsrjc+hZtYxnbrR3KNKdqCNrR4PBShPL j359unNwskPp88sbzK5+IF/BJVSODMg097O7WQHsf8AkkprjQ5wdIXmzqjCpv0AxXWKQ T5Vn0w0f+rjZ7+fArIkQx6dFeYgqvXK0YW0cb2r5K997VVe0/wAslCPZ8WYHAoUTHBf5 JFBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=EvsEHneD; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id o6si8586825edi.226.2021.04.12.04.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 04:53:33 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=EvsEHneD; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13FDD81FF8; Mon, 12 Apr 2021 13:53:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.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=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="EvsEHneD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E9AF81FF3; Mon, 12 Apr 2021 13:52:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02on060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe05::60e]) (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 8A6EF800D6 for ; Mon, 12 Apr 2021 13:42:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJKRdR79DddwU9dEL97B678IJFFq9800zwHZXv0FkJOu3Z7gfQWNDss9UZGsyPaLKwim3H1qLzsgC/DiJgU+H1YHrWJ1iKBcs1wbwAHDd03D8/wdgp15u3JpGPbIQOLOAtYA3AjqLtp/mgZZ6ok3PwNyyx9OhzHW9Fbi95dA3Uv3f9k4JwzjhOv4RIGZXBTHbtmbaVmLu0ApLMnujwIvf/2tVoMaw6k5yNncNvjqMgvb2DDN+4OWGgeuZhO28alkYs67Gtf61l1jcx6enfXZ/esi4p3V6yqw4KwDiMKBkuOZR13Q5w/wB8UA5XGRcazSsnqnaXdYHWiQwtrGzHgp/A== 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=JjPxo2FXxIDkkmqm7R+gYAaHY+o5zPQ9kUSv77oiQ4o=; b=FnImGH8S96OmQbnBvoIp9lcZw2pudGLQoZgKtdo0WauG6J+6IW1pNodpa+SlpguJqBULPWM5npRUmFvFPF4bXrz44eFdFET/x5+MV7+J8shDPbDp0umMKutIqHPTzwGsUFRDwP8o6j3uy8GhKgFkzt34tpqigQV0rsscFqbCSeYeqXOUEduQBC3X2jsXmwx+atcdXG43Ke/syNkm0MM+BON1lfODTHWj4ZR22QfaQegCF2r6IAOog/dNuTeA3ebRc+/+bFy6nggLz2L69C4wPe1d0LBXe0tPm2Le/T5EzPR/CMOfZYq6+FOHoOeGoOsKeyolBxve4/azC1sYTBVERQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JjPxo2FXxIDkkmqm7R+gYAaHY+o5zPQ9kUSv77oiQ4o=; b=EvsEHneD9oHTm88+PGy44OgynWt+J++02M/QUMbQ1qdsyxUgwZhzf1r2ITvCEFpJ6oERbNTZsXh98W50TZQQ8TGMeYEkermJYaup3o3bizktWhnzRId+wyprNJAJq224+f5KcBP9gV81bfT7j14H5Qun/IjDexS4vcNf+/orDzo= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5244.eurprd04.prod.outlook.com (2603:10a6:10:21::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Mon, 12 Apr 2021 11:42:13 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf%11]) with mapi id 15.20.3999.032; Mon, 12 Apr 2021 11:42:13 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Peng Fan Subject: [PATCH 17/37] drivers: mmc: fsl_esdhc_imx: support i.MX8ULP Date: Mon, 12 Apr 2021 20:12:46 +0800 Message-Id: <20210412121306.11484-18-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210412121306.11484-1-peng.fan@oss.nxp.com> References: <20210412121306.11484-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16 via Frontend Transport; Mon, 12 Apr 2021 11:42:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91260929-507f-40d5-5056-08d8fda80295 X-MS-TrafficTypeDiagnostic: DB7PR04MB5244: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TlFegeYuqUn7cKjy92sYouB8z8Qz6H5XGzFA48VToKw+feJIyN9rnVKssgd4+6o63UyQsVtiNskFq7+goCSPfH9RIlAfHutkxi7exhNyKITdBfmxfxUIKim3cymKHWm9w7JSjpLHtYjy4qMsVzUWh8jJrnlGhqBZh8i9v3ysFBhn0Sm5XZ9ofkqCDlBbgxT5IPfbqawzAhKJxVpVL4t5s5bvSv5u+vuqbtvcM6T7OUwkXISmNidPgOIt5mtWWaaLlNvtinBiqPvzks/9HdoB9WQg6iF+b4NXNad0GKDKd3TQFJSL2/9efT/SEwnNgFriKAIRsGHCivHWw54rPdFTAbpzVAF8624v8ujRcsRoQENPRuytB/B7EMTzvDfqnie3eSr4NAaXqjmgQeXQ/BnNOFE3rJU4SXOzH3cxSEVhdanzteWwwb8HHLiGYSzp5PmpupYRx1SWX5/oVceKKoKm1Azp23z8go0ey/5x2GWzIKs5mY13qkmJOUHkbcLZEYhiy4fVvI/tC65qq/Cu9pUWPGxcdUZ5gKwrOdJWOOzOfst6ax+JRqzepK3dxJHrdjXXh45Ovu/GjlmWFLElCHw1j6ZVLSFzZKNkXq+HZ66eCBjJzFFI+uuTeDyE92S7tqUQMR252lfaM8jJn8vGyIBu2ar9dySfWnaBu++FrHd2uFo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(16526019)(26005)(186003)(6506007)(38100700002)(66946007)(66556008)(66476007)(316002)(8936002)(38350700002)(4326008)(956004)(478600001)(6486002)(5660300002)(6666004)(86362001)(6512007)(2616005)(2906002)(8676002)(52116002)(83380400001)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 4dXL3qmf0EkMl8sTFpMUQhykaWYqgOBST/BLak46dJ0aOWASfwGVrD3u7LbpYBuS1sKPMnd2szr1q2TdU8RLuS6LLrlSu2xJtoFckfzMKwFDtzhHVEYFbL4V5iKqHU7QKpDpLxW4JYcv2oX7zH+ayd0aaADYMQ3IgvVZxUZHx3O5xW5dvpzIcoBRviPKorrkzmpmf+5oia1mCkA5Cy3o33kMIPeXbpnA8hzzd8RVZCJ6+w2WHhohNnjItD0n8UeTbuWVjB7UzxzzM554wH/Hxho6Tz0f0w73Kt5/evKp80lZ+l8FJ0aohILh7iEpmIQbMxRsVA7FlAXWuBAwq6BV8dQboSunK0W7jX2BFEPoE8pjQYB+O6zAVvVmxnB7gMn09Uajh5Foxmvr1ySCLGee6J9ECRPIUHuSp+tFr3yhkjKojLvvzwAZ6DxFFpMYCz4u/whjrAYUtM59KEAQ6cwKCX5gKOAPZRYx//k5GnYqjsYB/UhZQKtob4TzlQWxXkbOqTBJ525oPkmDpM8xiWzRKESvNE18A9ym5IeKgi16ot2a351+NIGT9XTR+qjD502UktovGZvYBc1JypYXw9C5V5RFQ1BxitDdusewp6Gc7/tZUn6Wh5d0AlLFRPZ1MhOkk4OIKMrQviJsshGIY5VLGGX33KisBt1z2hETfyuk0k15fvU2ywHLiyH9cgJB/nLRQaJ6bKj/rXwx7q3/rtNio+0Rts6tpbeFKJ1hVSuF2Kjhc6qA6SSpruEkn6EnPrO2KbuBIvak5/JgtRurNa87+Ka+FB8JAU4uhUccCPac2njzrvb/JMovT9/1J1uG/PBaAkO5EbO2lKpTfYQUREAY9QNLJUu4FWIwdWGBjPj1W4Ow5XB6M1CBzXIqKYDprgaxezHoTNyWxFyK3ckjI9kUBg1nb2oPlF2AYid//1yplYDOK5aUqqKn2x4r+1DWkOmIo7nIYq6BmDNtTTE2q000vkCxR+cMype4xctX07imXAaRaW7+2f/B6rPy66DRpFmexUwmJPsLe4VS2SbmXBsBfAZAzkwUKGwRYZRmnCb/ufJ6uBsSxFXASikeNF9u4VpySoqE24KNUuPuNP9y8uRCpkI3ZI7Y/Uzn2nEZ3csOjGekdQsDqr4kwNWjgcwgCBANLuei7OJLFglZ5X6FNRg3dUJsdOKlu/BeH3uZVj0v6X/Fk5R9GYbik6h9JZ9MdWkkgTInIeWXY/msZFtgQOm3wyKj76LmdGv5lT7VdkFr4BGtbM3bdNYQijUIFvNNkz4QNTljehhy8lvbgajjhtvK4pbzwu1S0LblPX2eIUH5HFllSSPy2+CgX7FqxtMEjXPoDiDDOpv0X2i+sYNWuzHqWA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91260929-507f-40d5-5056-08d8fda80295 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2021 11:42:12.3872 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e4CsvuULDmjvTYXXcYMD13CboiFuYWWqcPpUilor33bKeukMbsNtx1tKnRFy266Ng84yWFoUcIxh19BrzRK/kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5244 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.102.4 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan i.MX8ULP reuse same SDHC IP as i.MX8M, so follow i.MX8M code logic. Signed-off-by: Peng Fan --- drivers/mmc/Kconfig | 2 +- drivers/mmc/fsl_esdhc_imx.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) -- 2.30.0 diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 197aa82040..5c42e469b3 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -804,7 +804,7 @@ config FSL_ESDHC_IMX config FSL_USDHC bool "Freescale/NXP i.MX uSDHC controller support" - depends on MX6 || MX7 ||ARCH_MX7ULP || IMX8 || IMX8M || IMXRT || TARGET_S32V234EVB + depends on MX6 || MX7 ||ARCH_MX7ULP || IMX8 || IMX8M || IMX8ULP || IMXRT || TARGET_S32V234EVB select FSL_ESDHC_IMX help This enables the Ultra Secured Digital Host Controller enhancements diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index a4675838e5..4c7c2dd93c 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -291,7 +291,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, { int timeout; struct fsl_esdhc *regs = priv->esdhc_regs; -#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) || \ + defined(CONFIG_IMX8ULP) dma_addr_t addr; #endif uint wml_value; @@ -304,7 +305,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, esdhc_clrsetbits32(®s->wml, WML_RD_WML_MASK, wml_value); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) || \ + defined(CONFIG_IMX8ULP) addr = virt_to_phys((void *)(data->dest)); if (upper_32_bits(addr)) printf("Error found for upper 32 bits\n"); @@ -341,7 +343,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, esdhc_clrsetbits32(®s->wml, WML_WR_WML_MASK, wml_value << 16); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) || \ + defined(CONFIG_IMX8ULP) addr = virt_to_phys((void *)(data->src)); if (upper_32_bits(addr)) printf("Error found for upper 32 bits\n"); @@ -406,7 +409,8 @@ static void check_and_invalidate_dcache_range unsigned end = 0; unsigned size = roundup(ARCH_DMA_MINALIGN, data->blocks*data->blocksize); -#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) +#if defined(CONFIG_S32V234) || defined(CONFIG_IMX8) || defined(CONFIG_IMX8M) || \ + defined(CONFIG_IMX8ULP) dma_addr_t addr; addr = virt_to_phys((void *)(data->dest));