From patchwork Fri Feb 24 00:52:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 1747255 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=q+85OvXG; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PNBF15qbWz2463 for ; Fri, 24 Feb 2023 11:52:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E01B85A00; Fri, 24 Feb 2023 01:52:15 +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="q+85OvXG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C0F085805; Fri, 24 Feb 2023 01:52:13 +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-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 20F3C8579E for ; Fri, 24 Feb 2023 01:52:11 +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-x52f.google.com with SMTP id i34so23589194eda.7 for ; Thu, 23 Feb 2023 16:52:11 -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:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SN9cuOkRqJZn5aQnPXmrXAVjFg6/YS12d+dGsQZItjA=; b=q+85OvXGW0oioxaYfq0My20IdO+A6V81t6rvzuhz6DtQsWQD38j4gCaIpDU7scHevW OcHQ/NFdsn71dAQkDtFHTW/5UFrmWWUX+hRC8Lxp8dbct5wbi53aNdQqgJmfyiZf1jpn j4m4acAApuRD8I/CkON0bm2xKL/DpuC3HYjghESY7y7etPPQu7Q7zQCQeDmn+ugGeD2M jwtfEsfL68+4Y63uTxGG/slSwNZxMm4doEuhiIQGb5SuYUDnvrc7JkXbfHbCXIlSaASn hQxWU9AzIh5KbH3qT0Av27mSvm+iSlKM15wgmTGQ2sgT1ij34f094T9HDZQxaW6vVlAk R3JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SN9cuOkRqJZn5aQnPXmrXAVjFg6/YS12d+dGsQZItjA=; b=fqG2zNusba62h9NF1I5oO5kJWNans5wC1RTv7+0bxEnrfkjDal+Bieihp0ineG82jl HnfjqOQHwrwjmsrRaZtZxoX37AfEUgBwTBTVmvnXRvP1WGrPpFI10U0b4NiOpqpn2ntp lRrNs7pVY0m+w6x6+w/EucfC10LlYUCi0Ba6+Ap0bKFBmjwbE0WTZzgYsOoTMEZvz6+S hWGv0EQj4PpXKzAN2L/T2J7gZRIe0FcmpqjMtRnzMsxGhrGvYLtCGUuh0gKnvhpRso4h 5FyrjuobGubZPFDOUSNUdYtf5vVxbZXGTbH22VSF4NRd6hHpgsbqgLMSmHOqKcU39LVc eJ5A== X-Gm-Message-State: AO0yUKXQOUmcIcB1QNAjJJJupjmDb+YCn9vWagmwARKbqBxQpgRqou/w /q+Fed+rvbVN/6eB2v3hqQxm4A== X-Google-Smtp-Source: AK7set87kLW3LkEqI/JcbyqSj2pNvzKlQCh4zTXCRnBBw/kGpaRosJ6mNUrciq1XREK+/YYPBzV5EQ== X-Received: by 2002:aa7:ccd2:0:b0:4ac:ce82:9825 with SMTP id y18-20020aa7ccd2000000b004acce829825mr14049536edt.16.1677199930663; Thu, 23 Feb 2023 16:52:10 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 16:52:10 -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 1/3] m68k: add mmc device for mcf5441x Date: Fri, 24 Feb 2023 01:52:08 +0100 Message-Id: <20230224005210.664664-1-angelo.dureghello@timesys.com> X-Mailer: git-send-email 2.39.1 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 Add mmc support for the mcf5441x family. Signed-off-by: Angelo Durgehello --- arch/m68k/dts/mcf5441x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/m68k/dts/mcf5441x.dtsi b/arch/m68k/dts/mcf5441x.dtsi index 6769bdc270..6383b50f11 100644 --- a/arch/m68k/dts/mcf5441x.dtsi +++ b/arch/m68k/dts/mcf5441x.dtsi @@ -103,5 +103,13 @@ timeout-loop = <50000>; status = "disabled"; }; + + esdhc1: mmc@0xfc0cc000 { + compatible = "fsl,esdhc"; + reg = <0xfc0cc000 0x8000>; + non-removable; + bus-width = <4>; + status = "disabled"; + }; }; }; From patchwork Fri Feb 24 00:52:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 1747256 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=jg/Ci9mI; 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 4PNBFD1KLFz2463 for ; Fri, 24 Feb 2023 11:52:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8755585805; Fri, 24 Feb 2023 01:52:21 +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="jg/Ci9mI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2C6B8579E; Fri, 24 Feb 2023 01:52:16 +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-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 C13518579E for ; Fri, 24 Feb 2023 01:52:13 +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-x531.google.com with SMTP id f13so48361797edz.6 for ; Thu, 23 Feb 2023 16:52:13 -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=XCcifrFvucwInXc/pMt48IvS5uY0BYy5UL/6OsUz0WI=; b=jg/Ci9mIGmViFCsTubNwbxGtj0Q4gZ/i9lAEMGR35rvpkNY3B7q8ONlsWsmbCvg2Wx EL3n1w3YxZhbSkSKKkfp7rbiuMk/1qh6TADf8u5HvG1f8OOQYqu8re0fN98/6CxXdxyd 89aH0zvvUgMXo9scOq5jKaXwgcY1ZR5+qjTgfOUhLsMC4Vn5TDiVt9TwzXT4d2Oycj0A wjxoJxueZB7hT4qhrBWkV6vI4LEwU4DEKGfazCnYFlhbYNdaolh+Awzpw4Ju4/gTbuJh qKd3xSPrI0RxGc2E+o9T4C3zB6tv67uCs+rioSx3i8Chy6E1Nqp7e72k4iAm9TBBBNeS 2JGA== 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=XCcifrFvucwInXc/pMt48IvS5uY0BYy5UL/6OsUz0WI=; b=gFi0nMJj4Bzj60Ge77ITZUh291SOgLJI2keYDlcKfFm9wzDq8a9EGeAJwxJOyhAsJQ F6GBRlF0TuuHIYdwzAALandRYbqnYj+TPeeeMS6lkmqL6q28TSeaiPFsUcjTikp4vgdL E2DF1ScdFCRld9d9tbuJXsP6rF1bKTO/LgWWHwf+IhloUeac01Yy+LT/aNaT+9pqE5jr BG9cqwxPlBRXLVgQrKDlaKukz68Wo0rmDwtRFam4Tq882ywfLr+Ygh9d+uvkY/llqEJ5 6qmIFM2DE+5+zu/l8SimD5DCq/H0cuV+UFD9lCcZsD2Ab3f6ADE2afsEWrNR7NV/G4aI WNXw== X-Gm-Message-State: AO0yUKUqQAaodd0JeAo+0Scz2/iwHyUlbKBSM4dSyzGL+R2z2P53aqgW kXfMOCCqY/FZ2nxMt6Euh71cWw== X-Google-Smtp-Source: AK7set8HGqyVwuqVXlOKRAJyRZ53JwEsTAFVcTDOK1+weZ0nSyGVLzrkcYbEX7UxD2va1edNmEJBKQ== X-Received: by 2002:a17:907:7e81:b0:8aa:502c:44d4 with SMTP id qb1-20020a1709077e8100b008aa502c44d4mr29868775ejc.2.1677199933256; Thu, 23 Feb 2023 16:52:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 16:52:12 -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 2/3] board: stmark2: add mmc support Date: Fri, 24 Feb 2023 01:52:09 +0100 Message-Id: <20230224005210.664664-2-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 Enable mmc boot. Signed-off-by: Angelo Durgehello --- arch/m68k/dts/stmark2.dts | 4 ++++ configs/stmark2_defconfig | 12 ++++++++++-- include/configs/stmark2.h | 6 ++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/arch/m68k/dts/stmark2.dts b/arch/m68k/dts/stmark2.dts index 3688651e59..9532a01b2f 100644 --- a/arch/m68k/dts/stmark2.dts +++ b/arch/m68k/dts/stmark2.dts @@ -41,3 +41,7 @@ status = "okay"; mii-base = <0>; }; + +&esdhc1 { + status = "okay"; +}; diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig index ae7a9cf6da..ab95baa148 100644 --- a/configs/stmark2_defconfig +++ b/configs/stmark2_defconfig @@ -14,9 +14,9 @@ CONFIG_SYS_MONITOR_LEN=262144 CONFIG_TIMESTAMP=y CONFIG_SYS_MONITOR_BASE=0x47E00400 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/bin/init devtmpfs.mount=1" +CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1" CONFIG_USE_BOOTCOMMAND=y -CONFIG_BOOTCOMMAND="sf probe 0:1 50000000; sf read ${loadaddr} 0x100000 ${kern_size}; bootm ${loadaddr}" +CONFIG_BOOTCOMMAND="run boot_sd; bootm ${loadaddr} ${loadaddr_ramfs}" # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SYS_MALLOC_BOOTPARAMS=y CONFIG_HUSH_PARSER=y @@ -32,6 +32,12 @@ CONFIG_CMD_SPI=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_MMC=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_DOS_PARTITION=y CONFIG_MTDIDS_DEFAULT="nor0=spi-flash.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:1m(u-boot),7m(kernel),-(rootfs)" CONFIG_ENV_IS_IN_SPI_FLASH=y @@ -41,6 +47,8 @@ CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="stmark2" # CONFIG_NET is not set CONFIG_MTD=y +CONFIG_MMC=y +CONFIG_FSL_ESDHC_IMX=y CONFIG_DM_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=50000000 CONFIG_SPI_FLASH_ISSI=y diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h index 19589be270..ddb85cc7d1 100644 --- a/include/configs/stmark2.h +++ b/include/configs/stmark2.h @@ -13,10 +13,12 @@ #define LDS_BOARD_TEXT \ board/sysam/stmark2/sbf_dram_init.o (.text*) -#define CFG_EXTRA_ENV_SETTINGS \ +#define CFG_EXTRA_ENV_SETTINGS \ + "boot_sd=load mmc 0:1 ${loadaddr} uImage; " \ + "load mmc 0:1 ${loadaddr_ramfs} uRamfs\0" \ "kern_size=0x700000\0" \ "loadaddr=0x40001000\0" \ - "-(rootfs)\0" \ + "loadaddr_ramfs=0x41001000\0" \ "update_uboot=loady ${loadaddr}; " \ "sf probe 0:1 50000000; " \ "sf erase 0 0x80000; " \ 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;