From patchwork Wed Jul 22 12:53:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dong Aisheng X-Patchwork-Id: 6844331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43D66C05AC for ; Wed, 22 Jul 2015 14:06:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22C46206C7 for ; Wed, 22 Jul 2015 14:06:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBBC02058E for ; Wed, 22 Jul 2015 14:06:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHudR-0006io-3s; Wed, 22 Jul 2015 14:04:37 +0000 Received: from mail-by2on0120.outbound.protection.outlook.com ([207.46.100.120] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHucb-00064Z-F2 for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 14:03:47 +0000 Received: from CO2PR03CA0039.namprd03.prod.outlook.com (10.141.194.166) by BY1PR03MB1418.namprd03.prod.outlook.com (10.162.127.148) with Microsoft SMTP Server (TLS) id 15.1.213.14; Wed, 22 Jul 2015 14:03:34 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::131) by CO2PR03CA0039.outlook.office365.com (2a01:111:e400:1414::38) with Microsoft SMTP Server (TLS) id 15.1.201.16 via Frontend Transport; Wed, 22 Jul 2015 14:03:34 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; gmail.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (TLS) id 15.1.213.8 via Frontend Transport; Wed, 22 Jul 2015 14:03:33 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t6ME2iY5019637; Wed, 22 Jul 2015 07:03:27 -0700 From: Dong Aisheng To: Subject: [PATCH V2 07/11] mmc: sdhci-esdhc-imx: move all non dt probe code into one function Date: Wed, 22 Jul 2015 20:53:06 +0800 Message-ID: <1437569590-5228-8-git-send-email-aisheng.dong@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437569590-5228-1-git-send-email-aisheng.dong@freescale.com> References: <1437569590-5228-1-git-send-email-aisheng.dong@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:yAQNp4lSDGp4IIjvLbjV/j+ZRexiXIxk8LqLWYFroOUMwY2yBLI/+5Ly2xOUJ6yHIeJx/huJIgnAVrGRzQXq3VSCcsUeKvVVIGvmM/nH1mLt5TZsTlHZE7z+AshWW3MTAcTa8MCBC/iuaHdASSb7f+j52slML5rFihBBVI61cJmj52nCPK4Zs9bNyHs9L2NZwUBj/TlTwMNeAYlBgtqWpkU0RL0zdw1a1ZJNCAPG11WtijG/PuZ8vHVQdBIQmsDxDedPXzJCSoxEFRHKCoZgEreF28kqD6UMAPlUEhywC1Pm3Cxky4xhJYPipbt+ZOdhafk3PthxjaBi8qZuq9npkA29eFo1+9zItH4jeq2qIfaXjgcZYmX+6ER4sDu81esDkcB3zZ4g60JrPs3CfBFPgcodZ10IeVQJpZA00sDCn32KGfCHbqvKI5IvtR//brQ4 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(76176999)(5001960100002)(230783001)(50986999)(110136002)(104016003)(19580395003)(46102003)(5003940100001)(33646002)(50226001)(62966003)(50466002)(48376002)(47776003)(87936001)(229853001)(19580405001)(77156002)(106466001)(2351001)(5001920100001)(36756003)(6806004)(105606002)(189998001)(86362001)(92566002)(2950100001)(85426001)(77096005); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1418; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 2:xemW0iiw4Yb3uyQzBofo7kCHpuiA2HOCpNkpUvS/tCWZdFylZ1DzoBsrMdbCwYC/; 3:NzMYrNjoBdfYJqcqyRa7jReNzYFJyMSqk5CmtmwAAdhR8ZPb4i3i5wLN/rRZwF02gh7ModdkBobyd844HiT4FuBeQX+hjANnRFf3IOmkyx/K9lUMVTF6HhVON2NGxF06jzZYKUTvSyW+tGFjHPzgE+0YRG7TUbNp1s0eHNTBYiNT1iAIg0Wud4Rfa3ewybgo6g6Hqz91/Ch276FFkev/2qdWPq8JxE8ZDytsJJM6etI=; 25:9o7S4ofzYUzryLJrXr5p7etQzkk6RqSCf8/fI8u0nt2jNjq3FcAwVPbBtV+rayzcRPze5Z0dOXMGN+ENp8wt77aOPs0f5rrmDyOeQKTXhOybireVl0l7fJcEFN3U/3FiCzUbCV8ebkQIqzrPBIsHU1Q9qa7bdgq72wYRm4OYe7SOjaPgve572qL+F7RIw+lQNANzwSCrADf6b2gsbV+VKiJgHmtg8TfzmjD9tsEKCmhNXzcArPmLzAjyMEpoWfGi; 20:8/YtZVqUdVF8mbeAgZQS99swJr4evaNcGihaGwnxJf8718yFvNQt+c56EQRK1HIparvMHNzNhOLIjZpMTXftoeNbuIpjyPiFyW2IsGq9D3N1aT6EcGaUTJRjLrINkjj+OvyxgZI4kWJ8ykB8CExHkjv8glXLxusFHwn+xpGWh9ObAKw+oxqlYQptQOVaGPudTRMja4U2Qj9ckH2DZ6K46UbVklqsIIWU7CtF8SPJ2RQ2q/VNhc2YEm8g7AhDvonKVy0iJXuwvU39pF3+q67rGehF19xbwhaxZ4sZxlhHCtJypzRQaYksm5bcfPMSsdqD1h4hGrjNhGjHW1wLxBKp5WtLmWbiCNB4IUeF3UH0KOs= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1418; BY1PR03MB1418: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR03MB1418; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1418; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 4:P6jlb7YZGdXpjVUWYYaO2EFcwZSJHvQwun33h5BStGclpF5lYlYPlUfdBgSNr+BCAg2gq5Y1ySMNImVt1LIWzBHpibWhdYFkv1fz2E92RecIP+QeRB9Y9+rmt3aZkseNKVVhD8bWWTf4sWBck6X15+i98c7V8p/TbNss4+fsnehyPvGVlOEGZHLEXe1hIYtpPpnzMXBlRM6oDD9Z8wfgpbAllxVSlDsnLepASv+wjmUWqGtn6jRpwKCu2uUEPEtsY3gP/cj9cEb5ccl1RpBme2eoSPiMIEXb0MdTfqDII+U= X-Forefront-PRVS: 0645BEB7AA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1418; 23:UHLWO0LuRWcYHam/1ymQKPtEP9PFslSqnfLkGQzoC?= =?us-ascii?Q?cpFCdb5zpdI3wJXqBl0Nzen1jJk6OX67u0DlX+IWWFk7tFJOEswTY29V7iNi?= =?us-ascii?Q?azGQTVPkzROsCA3+jKr9yIVixiMkNHvM38pFpxO9OtF435o8nWeOkrZSM6Oc?= =?us-ascii?Q?ExjLTseU/rFNUBKMjKiBHUZYvQlLU3Y/RkJpI+Wva6mf94AgN7YQhLEcIW9c?= =?us-ascii?Q?UrB6w8Kjh3XWJSwb+eOnGJf0Kw/rkPzvS7vFVMH9E+mtJ26hU9XSoTbGvm5N?= =?us-ascii?Q?epXOzSffDpe3wTtIcCy1by/Cdw9saZjilm8ioEGmLZd/m5+bUEL6V/r5Ho/R?= =?us-ascii?Q?U/twKf1r3qCHd0fCVWDY2z2js/IdgcdgVOmTB6UX1g33+0zOH1I80YXlxUfV?= =?us-ascii?Q?Y5ji/HE7RbHHpjDhhe8h6DdAfNY1gNd/2ZJyIGlIJocMSY0zDAyNzH+P1COI?= =?us-ascii?Q?3AuknK4DJggE7wpl85ghtfMPv6aByi6rvNufhURGBcqX1ULaFRmb28eV2qZN?= =?us-ascii?Q?SO5br//DDbqqev9Z+3upHtSa4Rx4NhqkVaaApRsvZgKFooSRJfKBeFI1nWPQ?= =?us-ascii?Q?+0YOqbvgRxGeYGREzUAb6t1lcNEzbPThnBKQNzHw4b6YCmyxy2tgzGHEhYvJ?= =?us-ascii?Q?rDhDF1XCN4juxnBZjPbiIaJAxrB6ldaB7zMntG1tFMRfbkvfjm3vT6jplzKI?= =?us-ascii?Q?LnrQWQfKQL7LT6clW0bihLxShKTvxksVTHxZDo2SxvAllXRNUkf14FqwlbXV?= =?us-ascii?Q?6UH9sebMDFMHFNpnMBUSjpFJIVwvFr1fR0SSrHvhgtwdJjsZ62HcZ6/2Ah5Y?= =?us-ascii?Q?vf3exFy4fqUIng8hiWog/hW5uVRlLfq2qwc/Y+Guq31MoABbIEY61ETWv+WW?= =?us-ascii?Q?fMJgEqOHG4eIqrDRYDMny6ZesZUVMQkXv5K+0jfzsKt44fGDtTmTHLFo5ycF?= =?us-ascii?Q?AOaGnBxX1upLf3Td+FklVmbJNsS+/32QEfuth+AAA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 5:bsb5WmsiPy/bAXQInyhbM3BQvav+PbLGavD6NIj6ac3/xBNMxpw0ZjHd2cqGSKAD3ggKNAUJIyyI9NosA9TVHjTjS2kFAqNfU95tTUJb0+e/cZlD3s3IP1DhwqWR+SsVFjxDyjE5u6yYOJzkg4lB7w==; 24:PNlQBbv4upXkfjy9179HmB3aeuDE35xrZ3tmnn4h/4WnHKSBkHdoTYKMSu2zFUCrgviatemAskyI5yDKaEFeXGNczSvJ84tnNAgMdADRpIg=; 20:HnDmPN53fmxpw7eTyYhsuvP6m6nTht1fHT3anaRVxUA7Fd6xhyrK9PwXFYr4wm+QIKy+NII9javqtfx9nJwTYA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2015 14:03:33.3047 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1418 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150722_070345_562739_B37AE78C X-CRM114-Status: GOOD ( 20.54 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@freescale.com, marex@denx.de, ulf.hansson@linaro.org, hs@denx.de, p.zabel@pengutronix.de, tharvey@gateworks.com, shawn.guo@linaro.org, s.hauer@pengutronix.de, ipaton0@gmail.com, chris@printf.net, rabeeh@solid-run.com, troy.kisky@boundarydevices.com, smoch@web.de, gwenhael.goavec-merou@armadeus.com, rmk+kernel@arm.linux.org.uk, lisovy@gmail.com, s.trumtrar@pengutronix.de, robertcnelson@gmail.com, b29396@freescale.com, linux-arm-kernel@lists.infradead.org, LW@KARO-electronics.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is an incremental fix of commit e62bd351b("mmc: sdhci-esdhc-imx: Do not break platform data boards"). After commit 8d86e4fcccf6 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()"), we do not need to run the check of boarddata->wp_type/cd_type/max_bus_width again for dt platform since those are already handled by mmc_of_parse(). Current code only exclude the checking of wp_type for dt platform which does not make sense. This patch moves all non dt probe code into one function. Besides, since we only support SD3.0/eMMC HS200 for dt platform, the support_vsel checking and ultra high speed pinctrl state are also merged into sdhci_esdhc_imx_probe_dt. Then we have two separately probe function for dt and non dt type. This can make the driver probe more clearly. Signed-off-by: Dong Aisheng --- drivers/mmc/host/sdhci-esdhc-imx.c | 179 +++++++++++++++++++------------------ 1 file changed, 94 insertions(+), 85 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 4815391..10f03ee 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -878,14 +878,12 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = { static int sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, struct sdhci_host *host, - struct esdhc_platform_data *boarddata) + struct pltfm_imx_data *imx_data) { struct device_node *np = pdev->dev.of_node; + struct esdhc_platform_data *boarddata = &imx_data->boarddata; int ret; - if (!np) - return -ENODEV; - if (of_get_property(np, "non-removable", NULL)) boarddata->cd_type = ESDHC_CD_PERMANENT; @@ -917,6 +915,26 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, mmc_of_parse_voltage(np, &host->ocr_mask); + /* sdr50 and sdr104 needs work on 1.8v signal voltage */ + if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) && + !IS_ERR(imx_data->pins_default)) { + imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl, + ESDHC_PINCTRL_STATE_100MHZ); + imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl, + ESDHC_PINCTRL_STATE_200MHZ); + if (IS_ERR(imx_data->pins_100mhz) || + IS_ERR(imx_data->pins_200mhz)) { + dev_warn(mmc_dev(host->mmc), + "could not get ultra high speed state, work on normal mode\n"); + /* + * fall back to not support uhs by specify no 1.8v quirk + */ + host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + } + } else { + host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + } + /* call to generic mmc_of_parse to support additional capabilities */ ret = mmc_of_parse(host->mmc); if (ret) @@ -931,22 +949,85 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, static inline int sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, struct sdhci_host *host, - struct esdhc_platform_data *boarddata) + struct pltfm_imx_data *imx_data) { return -ENODEV; } #endif +static int sdhci_esdhc_imx_probe_nondt(struct platform_device *pdev, + struct sdhci_host *host, + struct pltfm_imx_data *imx_data) +{ + struct esdhc_platform_data *boarddata = &imx_data->boarddata; + int err; + + if (!host->mmc->parent->platform_data) { + dev_err(mmc_dev(host->mmc), "no board data!\n"); + return -EINVAL; + } + + imx_data->boarddata = *((struct esdhc_platform_data *) + host->mmc->parent->platform_data); + /* write_protect */ + if (boarddata->wp_type == ESDHC_WP_GPIO) { + err = mmc_gpio_request_ro(host->mmc, boarddata->wp_gpio); + if (err) { + dev_err(mmc_dev(host->mmc), + "failed to request write-protect gpio!\n"); + return err; + } + host->mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; + } + + /* card_detect */ + switch (boarddata->cd_type) { + case ESDHC_CD_GPIO: + err = mmc_gpio_request_cd(host->mmc, boarddata->cd_gpio, 0); + if (err) { + dev_err(mmc_dev(host->mmc), + "failed to request card-detect gpio!\n"); + return err; + } + /* fall through */ + + case ESDHC_CD_CONTROLLER: + /* we have a working card_detect back */ + host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION; + break; + + case ESDHC_CD_PERMANENT: + host->mmc->caps |= MMC_CAP_NONREMOVABLE; + break; + + case ESDHC_CD_NONE: + break; + } + + switch (boarddata->max_bus_width) { + case 8: + host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA; + break; + case 4: + host->mmc->caps |= MMC_CAP_4_BIT_DATA; + break; + case 1: + default: + host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; + break; + } + + return 0; +} + static int sdhci_esdhc_imx_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(imx_esdhc_dt_ids, &pdev->dev); struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; - struct esdhc_platform_data *boarddata; int err; struct pltfm_imx_data *imx_data; - bool dt = true; host = sdhci_pltfm_init(pdev, &sdhci_esdhc_imx_pdata, 0); if (IS_ERR(host)) @@ -1038,84 +1119,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536) host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; - boarddata = &imx_data->boarddata; - if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) { - if (!host->mmc->parent->platform_data) { - dev_err(mmc_dev(host->mmc), "no board data!\n"); - err = -EINVAL; - goto disable_clk; - } - imx_data->boarddata = *((struct esdhc_platform_data *) - host->mmc->parent->platform_data); - dt = false; - } - /* write_protect */ - if (boarddata->wp_type == ESDHC_WP_GPIO && !dt) { - err = mmc_gpio_request_ro(host->mmc, boarddata->wp_gpio); - if (err) { - dev_err(mmc_dev(host->mmc), - "failed to request write-protect gpio!\n"); - goto disable_clk; - } - host->mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; - } - - /* card_detect */ - switch (boarddata->cd_type) { - case ESDHC_CD_GPIO: - if (dt) - break; - err = mmc_gpio_request_cd(host->mmc, boarddata->cd_gpio, 0); - if (err) { - dev_err(mmc_dev(host->mmc), - "failed to request card-detect gpio!\n"); - goto disable_clk; - } - /* fall through */ - - case ESDHC_CD_CONTROLLER: - /* we have a working card_detect back */ - host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION; - break; - - case ESDHC_CD_PERMANENT: - host->mmc->caps |= MMC_CAP_NONREMOVABLE; - break; - - case ESDHC_CD_NONE: - break; - } - - switch (boarddata->max_bus_width) { - case 8: - host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA; - break; - case 4: - host->mmc->caps |= MMC_CAP_4_BIT_DATA; - break; - case 1: - default: - host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; - break; - } - - /* sdr50 and sdr104 needs work on 1.8v signal voltage */ - if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) && - !IS_ERR(imx_data->pins_default)) { - imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl, - ESDHC_PINCTRL_STATE_100MHZ); - imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl, - ESDHC_PINCTRL_STATE_200MHZ); - if (IS_ERR(imx_data->pins_100mhz) || - IS_ERR(imx_data->pins_200mhz)) { - dev_warn(mmc_dev(host->mmc), - "could not get ultra high speed state, work on normal mode\n"); - /* fall back to not support uhs by specify no 1.8v quirk */ - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; - } - } else { - host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; - } + if (of_id) + err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data); + else + err = sdhci_esdhc_imx_probe_nondt(pdev, host, imx_data); + if (err) + goto disable_clk; err = sdhci_add_host(host); if (err)