From patchwork Fri Feb 24 00:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 1747257 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=timesys-com.20210112.gappssmtp.com header.i=@timesys-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=ci64pk8s; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PNBFQ4m45z2463 for ; Fri, 24 Feb 2023 11:52:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 88DAB85A18; Fri, 24 Feb 2023 01:52:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesys.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=timesys-com.20210112.gappssmtp.com header.i=@timesys-com.20210112.gappssmtp.com header.b="ci64pk8s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50069858FB; Fri, 24 Feb 2023 01:52:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0CA498579E for ; Fri, 24 Feb 2023 01:52:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=timesys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angelo.dureghello@timesys.com Received: by mail-ed1-x533.google.com with SMTP id x10so48096961edd.13 for ; Thu, 23 Feb 2023 16:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HfG+JTwv7pgCN8QM//w+7SjeXOUPtIG/sp1HaOhzAQ8=; b=ci64pk8sSWP1VqcI0JvHwamRnJWMGaMu7g3172zlFsotBRafORj6hP4B1K65OYrRFe Fwh5ivrIX9Nmk6sBo8/UShZCvsGk29MFYbewEx26uFiQk8apj5GJVW5SYGA5yoJyY7M2 vPptK8NUHIJ3eDVPKSTaamN1vQyrV7L+5TLxzrKNf8hAc040BsMXKuHvcYBUCaLjFiQL u3uZ6cZUNdCozgZWySKxMidYrSQFYh51lAluEP/cKPS12U+f1SEIU55ZMQwbh8bqy9Up Xfz79rm87khQPFldkCsG8wNOxR4bu9SlSIKvEvJH8epy9rPqydR4D4kC2eXOGx7udpUu qDcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HfG+JTwv7pgCN8QM//w+7SjeXOUPtIG/sp1HaOhzAQ8=; b=R8UgG1EnOmMQ95Jy5rM8fM7rpCaWZvakn+9z8+TiPYmvih2EaL8whvKrbU8doBgZq2 XwArspKoEcpnm/Pkwt6o6Vi9HfaojiZ1eZ6K6n8cu73nGr7yvCoXgGvQby+JO6R/D0h3 rt/IPX59wj4463hxUOS56gkpfV4dedI73VCj8uYxbqfvLFaroo84qB6MxXDl3LyO5eNg Ay2SzkiP219VLZyeyUEmRmirkK4pmgF5hVXb5RhcWURe/jc2yJLipAzzGvxMN+hBCGIv mkCM9bh/i913/Vv9uuxe3qt83mKAU07ioN10of+/zlCqqW4o0huvoAhBiHnc2x1aA+xi ONOQ== X-Gm-Message-State: AO0yUKXCEI/Nh1oixKCnxsVzlJzFfEZH3jE9r9r3HLgxPO3aVTlXMaib Ps7ZB2MK0N93AWf0CHYCnPRtdg== X-Google-Smtp-Source: AK7set8iisMDIKUA5H5GTzflHj/oOATnso1iAVcA+cT/cv274+VCWg9DjiKsN4XtWQGiruRJB0jPOQ== X-Received: by 2002:a17:906:2993:b0:881:23a:aba5 with SMTP id x19-20020a170906299300b00881023aaba5mr20225642eje.11.1677199937538; Thu, 23 Feb 2023 16:52:17 -0800 (PST) Received: from localhost.localdomain (host-95-248-219-54.retail.telecomitalia.it. [95.248.219.54]) by smtp.gmail.com with ESMTPSA id s12-20020a1709066c8c00b008d325e167f3sm5660979ejr.201.2023.02.23.16.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 16:52:17 -0800 (PST) From: Angelo Dureghello To: trini@konsulko.com, peng.fan@nxp.com, jh80.chung@samsung.com Cc: ye.li@nxp.com, u-boot@lists.denx.de, Angelo Durgehello Subject: [PATCH 3/3] mmc: fsl_esdhc_imx: add ColdFire support Date: Fri, 24 Feb 2023 01:52:10 +0100 Message-Id: <20230224005210.664664-3-angelo.dureghello@timesys.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224005210.664664-1-angelo.dureghello@timesys.com> References: <20230224005210.664664-1-angelo.dureghello@timesys.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean From: Angelo Durgehello ColdFire mcf5441x includes the same imx esdhc controller module, so adding minimal code to support it. Signed-off-by: Angelo Durgehello --- drivers/mmc/fsl_esdhc_imx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 66caf683f7..4e15738782 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1381,7 +1381,9 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd) #endif #if CONFIG_IS_ENABLED(DM_MMC) +#if !CONFIG_IS_ENABLED(MCF5441x) #include +#endif __weak void init_clk_usdhc(u32 index) { } @@ -1536,7 +1538,12 @@ static int fsl_esdhc_probe(struct udevice *dev) #else init_clk_usdhc(dev_seq(dev)); +#if IS_ENABLED(CONFIG_MCF5441x) + priv->sdhc_clk = gd->arch.sdhc_clk; +#else priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev)); +#endif + if (priv->sdhc_clk <= 0) { dev_err(dev, "Unable to get clk for %s\n", dev->name); return -EINVAL;