From patchwork Tue Jun 29 02:32:11 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: 468279 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4507029jao; Mon, 28 Jun 2021 19:03:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFoe0jFKFLO+1UIFdowhxGB48bU1W4lYwO/coFgLcUoh67CWWVzCuFb44SCuC83YRQAugK X-Received: by 2002:a05:6402:1c1a:: with SMTP id ck26mr36151690edb.230.1624932183894; Mon, 28 Jun 2021 19:03:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624932183; cv=pass; d=google.com; s=arc-20160816; b=dKgRhmhhVeF+seZN4fENUfzjX9Qoe7OXVpSMezNB+HN7RnIWgACVVOFFLygEUIgV3r wxIopK/UDSHYreeZD+S9oKAaJWBsvv0zePsbV/4zksOegnoJGRGuUgXdFNTSVKLJ4pnW SW4Bn9i7UdaVSBWJ+srrh6ahciokBHi6i2eKOn+SEsLEgTdoc/F0gJ65rjFFxCVUdEla S3yqFbbf8ZrHhMZ/q/w50DGd7LaAUQ6znCop9RS+NlatS5Jwv0445814jpRNklLF1man J/lv+YrI7lX5K940mypvg80+KsfXM6jNBuomj5rpikO6Ai0hpqDdCo1zrlUYttLzCAjy TigQ== 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=qLNkkOVhmrZ0GIvB+2O92NMwGf0U9Fwu/VccjcLaFB0=; b=bsCaKQWIDk5tWKd0opwvHUddkZnF6sidMgsg41+0rvNkQGLrUMf6FUh454cF670z+q enqEUlmOd279FYP2Qr2Q4KEa8UO8kwmiNl58pP9lTGClHpenxp4Ph4QWW5bXN5OQbYqG EFbQTR8IXB9L7Pl0SeXMhDycMoTHX+sLDbxSt5Cgn2x+IB5Dyaox28pVBMHTEuKq8Ufw g0cRnjrt1jvsKB4YxHAtFqnu4Ldkytkhxj86LrSbyTtHYDKyD+/F110koNzkDkUknrA+ oang06RdKV8Bvga/YBkoaBsk0OpwVtL7h/0U9Pkkn27shD+v5LagdtOfkT7VLdD+iVod zvrg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=HiVt06X4; 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 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id o22si15759060edq.154.2021.06.28.19.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 19:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=HiVt06X4; 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 85.214.62.61 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 94E8082EF1; Tue, 29 Jun 2021 04:00:30 +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="HiVt06X4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3D2FD8310F; Tue, 29 Jun 2021 04:00:03 +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=-0.9 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 EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on061e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::61e]) (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 AF13B82F4D for ; Tue, 29 Jun 2021 03:59:55 +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=ajAIdsTEZvtBYQ8SXNMYxJVP1rzY4mJSREOtQAae+jzC4kGBCcSDmbdYhl80BycAtV8UTuRGnm93mRuOPQdnXZyyMS9Gl5AUhkzV1lcewbsh8JMq6zygt051h77RZWeOetFTMddDQWNsZLGuB2+45Mc/NmKvni1ySPjGC6uf4/J7jyUttD/hrfPLNqyB7ZrlMOhIgiyLuiakQqdRyDHS1HjRIcb2jvFuvyER5mUPg6hgFDYtxGRRYeOF4kL0aJ4ejlh5lozQCb2zfyXRRfsqVbmUHuQXHVR50ZBmjUTe14a7nLQjEFC/HSohvOUluupFN05kgYk1TcIhEcIr0IWtHA== 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=qLNkkOVhmrZ0GIvB+2O92NMwGf0U9Fwu/VccjcLaFB0=; b=AlI/iBth7gSN6qDhM9aleZ5Owleh8ZjT6dZsA0CpxT9PzxkH9Eo6B3JkXgmOibxEH9hwXQ6V3M8/B7iJmHBekXStc4yHAg8cu6yK2vO/Xh7wxgctB5Sj74HQjctGmEDiq86CVCUDsf/wgNR5J73aSXJ2XK4d1SF3Obw9d1NkH/DG1E9iPzDvPGaxdmm/jmx7UXTVHvpWkPknM5mLspd8/axMhFIybe6l1qktogkgsYUAW9QKM+bNh7OB1BfTuXY4J6Nxn3NQvsGuIgbP35/665LQwWxxyowXnHrF1K4iCBF9kcO2cKVF4rMTxSMdxNN+zW8HUzXCV2xqcaVRus+UEQ== 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=qLNkkOVhmrZ0GIvB+2O92NMwGf0U9Fwu/VccjcLaFB0=; b=HiVt06X4tuIK6bLfpwumg6sS/uRQe1XRtCUC74olz5hVBWTHKtb8WVaw0cXfwrlTKEaT1A+BqI8jXwM5vImKjrtwtqkJvdRdIDGYPIRsgEXsXkwE0MyDIVSctJYs87NuTIfuFFIiIN/2MhUB7vilnBSdn+E/UGZ8wxTL2iBUSLY= 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 DB7PR04MB4633.eurprd04.prod.outlook.com (2603:10a6:5:36::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Tue, 29 Jun 2021 01:59:54 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4264.026; Tue, 29 Jun 2021 01:59:54 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH V2 17/46] drivers: mmc: fsl_esdhc_imx: support i.MX8ULP Date: Tue, 29 Jun 2021 10:32:11 +0800 Message-Id: <20210629023240.22394-18-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210629023240.22394-1-peng.fan@oss.nxp.com> References: <20210629023240.22394-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) 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 SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Tue, 29 Jun 2021 01:59:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93fd5409-1236-4649-f83e-08d93aa1967b X-MS-TrafficTypeDiagnostic: DB7PR04MB4633: 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: Fuu4176yVEq6ExyIN8RMdscAhWAC8fNk/8WNIVtBjrdGRkun5V4uRXStnm0Cp1KcFQXgSS11zqSpgpveoKxKhqApRBRhjK9mBr6YikM/VU4soC2zIqiXlFPHTCoxEruIYP4KVKBI9LIj8O5WIM2HCxJU8FU6q73H1pyUWH3XCvyVE43FZD/IigPdvC+W8f7lEW8iXVnsEWQgI91eD9Un5HLb5RAlsCrsZvSI63RhnZplc5AA+CP2NW4ZNU6uJp3EaecE/fYUhpCesYB9/hECQDt51dR66L+7fesDSE2xI0SACB2t9mOcTfUoq88EjUpxzkFCK3pkqWh3iSFlQjSGYYpPJ2cM++3iDAjc9ecE13qZypgY4QpNXATjiOJGumWzo3pEpRixfN8PhD16cKd4dZRJG9sNR2G4P0lBOi/gAZ4MYRxdOcC49YZcukpr4lirL7IKby4WrSTPPdi1Hn2EOoJ3nTEEi9dqeFRrPj/iCmBofZwqzR2BUsQmIiKOniqd1V97E6nKQ5WGgGiwqimDwS+Q3dVd/xKFTkL+661/29YpN2W5BM6gpVyC2vPOimJ+1U/TR5BQ++lcnFh93cm8cb3UHj5jWq5hH3egZQZpLD/zm+PlEJu5nU/y7pj7Pfd1kLxUAcjcWAyIwXj9v7zl3lr0fTINs1x3HlRxy9WYrV1Y5lXEP2G9TjA/tOp9wNQSC1LNzFaRpFa9z2GKkfoG5g== 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)(346002)(376002)(39860400002)(136003)(366004)(396003)(16526019)(66946007)(38100700002)(38350700002)(8936002)(6666004)(4326008)(26005)(83380400001)(6506007)(1076003)(186003)(8676002)(2906002)(478600001)(6486002)(2616005)(956004)(5660300002)(52116002)(86362001)(66476007)(6512007)(316002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qSJHHMwKQvyqu5UUn3c3b9BJrJDIIdZcPPc+BLmq7KMnUyKJ+I66UxTF+2QJ6jBKQkxJcbpBllyYELKI3t3Z0FQIgOvZbAB/XGAkZD4pLl3tGEw+G6GUx8XktdADD4rn087TSpg2fSHIUjLgQLWfp4is3CDuF95FONeMq5xOV3/7h8fC26GHd7QCXEngZFdh/dtTa1ssIFE8iffB9772CEm06G0Lqb3BnLCmO2btj1AtWahXy/2ZC3jLk2bNL3VYx88Uwu/+Wqh9X3nZMekJ7cU3Z5bsnzxiNz9JTzTxrQfadkraaOIHKZ94YrpPQnmw3TdtQwpzk+Vs1b4NtsS2YbzvGF3AJHxz0PStfQNZgjYCmH/87Ln08RfYObjGoL05y6xRAd270KvQI5L9CMv/I4X1JcJ6+QeLtHh0eAILhUP4PEkMBsOCUdZbHJxGX7NVu8UKLL/fBJEwOWv5b167a4DpIJyX5q6ry99oujotz0WDtz8RFvSPMvj+beWXQrl3oQYQdKfew3Hqqp5wMplzkbUPiyQ4o8t+BR+hV7bZD6RHC+l0S4a0+AeiCsL+OG0kayHqrWzReEwEGxG8LhHcTbcMFXDble4AWLDAxMWJuEtdWNpv8PO4LfNoKERD1i9QRx8PfAYMUFvKV+fDQrnwTi0yj0N8zHL5g1yVbBR3eJ1YQSJYxYpSx//sJuloNAbFGnBDaaEP7RTRkKx/JqGWQ0yhmGAWJ3Bf+2A0vbvPVUv/1XljHM6ZZTptZ2p9pmoD3qKVQzL7Pl91e3kP5l/+dO/v5io8tnBTR4cNfuDJ5HP5WdbUM6nsPXRv2527pUidcdqp+KZZyUIjZjHSNulmXroO6nU5XY06QYJv3qilwp0Hj0SOJsXrjHRh2CVvwj7fiFGmVlGKG/QrrC2s52t9jBSSWCUextyvee+PjecRUuZOYfDGd8NnUhCIvQgehIxsiAdNYogZFqpwGzaLDTZil035JV7X187qG55RYu3ZFJKnMvRm3tmvMuCmNW7IAHpTs1SFCW7piIWFgT40PzaLtUA6UCXyMctSyF4FCLQKZKTPTWa2F2fgTjbhoPg57WHs21irmB9zGY+U6gvOYnKul12ivIYfxLMOv68qBjaNJa5Nwkv5o1bmxXEP4g0vzSB0l4FNuDv+/2DRfsHsYn+CxajIhJAa+D8dMyYDXSW2wyntQIe/0eYAk414XNII0ozcS6olgG0wyQmalvyX9/BxBxs9TqfjIVgPqOUFr1szSHfFohclAtos2S7OrU8FA72BcEP9JKw4VWMX2JR4PCp+ETbiSCxaGYbuPC3RVqDkSIs0vw3P/5GMy7QiRowiKdhr X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93fd5409-1236-4649-f83e-08d93aa1967b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 01:59:54.0347 (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: BPMOvaloiNXpWrAmgI9SbNOiSCQrp6dS6o/rjn5SVNuA3mflq4SFo8wVMy7yUSTwKBVK+b92heAV5u0ETLyxtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4633 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 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 0909f502a1..4b0a0c12e4 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -813,7 +813,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 + depends on MX6 || MX7 ||ARCH_MX7ULP || IMX8 || IMX8M || IMX8ULP || IMXRT 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 566ce046ae..e2fbdfdc6f 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));