From patchwork Fri Jan 18 17:40:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 156033 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3524964jaa; Fri, 18 Jan 2019 09:44:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN4CFBildn6jMsAOXiGBEaFUOSMvXb4UBPvSzhqg9d8JOrG19KCHruzC7Xfz2YwQ3p0L/5zK X-Received: by 2002:aa7:c352:: with SMTP id j18mr16520867edr.295.1547833482552; Fri, 18 Jan 2019 09:44:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547833482; cv=none; d=google.com; s=arc-20160816; b=YG+KtiHgwhRIBR7uED0tHsGMoaZWV0eo/yaBMfmQkU0gohkpnboGt34wcIWbDmsFut s7qaM0XVwU4iTHQJBpsB4n6/9XMQv0TFCJ8OeiqcLN7450eFstJXzmcHsEVhp9oGIdT2 kQw4MLCzAn/kIzElJoOQXgp+KUIr5T7LSMP6FjcBB/iGkwzr9X+oNtfe427nm/zryyjd TGB6arSgKPGeRJm0vREpD4Kz34IVyO6D0j2WN0cpqkkj6B4Fh/1GmaJDF/ucUXzqmXsi 3CwcaIh4vI5oLbndY4QqiTu/kq+t9JPAD5DPnJeXhv01+mIWTX4TcHnU7/L0yotgTNWM Aeig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature; bh=RPdJV8FrKxMvnWYumvu2iq3gYP1tSbFZfC3M0kCWJOU=; b=06KWVFGUrDJQJx54eka6MKdCQVSgwTNCtCfxnHkbtsTQcyHncefE8x7QNHwzvqCpuw jKFAzzQDN3N4fd6LkLUQCAq8UMpbdAa2/PpiMrjSu2hyoDTS3nzV7t0Djea9UjssLYlY 3Z8fsl1HdseqJmpfUA74wXYgDfjnTrxc9r92E1DIrXXhtHofWWOcs9+JP1DZDXvdqogp OFh5prIaBLy6BOVz6O2FXSdOUJGZbHy3XimhxCJ05alF4rDFNA1IquW4FDCd4vs9snmO kMPyUJ2VYdd2Qzc1GNj6xwAOEWJYisxkUBmDpvO5cRGE815k3QZnUeObryPesJkjDfdf Mlhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cjABzeyP; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id hk19-v6si738170ejb.253.2019.01.18.09.44.42; Fri, 18 Jan 2019 09:44:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cjABzeyP; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 0E09AC2210B; Fri, 18 Jan 2019 17:42:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B8CEFC21EB4; Fri, 18 Jan 2019 17:40:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3843EC21DCA; Fri, 18 Jan 2019 17:40:27 +0000 (UTC) Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by lists.denx.de (Postfix) with ESMTPS id 5B4A0C2212E for ; Fri, 18 Jan 2019 17:40:23 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id y20so11746372edw.9 for ; Fri, 18 Jan 2019 09:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xuw69l2NZmlhWut3b0kZtSp+D8LO/IdkttK/+BbS7yg=; b=cjABzeyPUs8jGfTI9eKY7MhSzzLbQRBBaxvW3dVgcXb3uP99l0i6Ndpw/RsWkPoRfZ TF4Rgr4gh4w4SkkGJaw7vIJfuLZ0H5c8ZUMCAWjbFbtewGS+eDiYcfbrlBjIC+QmmPme ftManRHeG0t3q25sZbyeE0TEEPJvQ2tZ0leN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xuw69l2NZmlhWut3b0kZtSp+D8LO/IdkttK/+BbS7yg=; b=X223VU9cVOEvU6Xzi8hrxYe6Aa5zTyl7HLMXWdDCxxCVBf6aVoN9bEgt5p+J1u5nwV oEpU9wrixkcIqgZYwn/ymU4y7KxBqlPRuLUa7uUFxxj/tUQ6N2jUNVPbLS1MhgoQPI2x 4/YKcSFVcDyYzandLIkXCQveml7gedgGuEBIGq0d+CwKUIUDb6ATtzgvreMv63IuTRR9 WS1Wb9Iach4Wzl8o4w0d0ObeUYqdMg+efjOEyREXVl6tP2KWG6FotEUFoosSo8XhvbdG W7GWSP3uMI2rTqvqurlU1YVd5EWeQZ+veh+0xFWFdmqznor9KEjetGjB5YW0zdSL38cz L9/Q== X-Gm-Message-State: AJcUuketUHN6+pE0VkB96oES3Rny1tz1iVEaaAgbf2nBWHI83Ip8lF+u 9XqTwQCEHUmBW89xNrJYEMoblKCiP64= X-Received: by 2002:a17:906:6011:: with SMTP id o17-v6mr15515436ejj.237.1547833222601; Fri, 18 Jan 2019 09:40:22 -0800 (PST) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id l20-v6sm4026339eja.18.2019.01.18.09.40.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 09:40:21 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Fri, 18 Jan 2019 17:40:10 +0000 Message-Id: <20190118174014.17860-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118174014.17860-1-bryan.odonoghue@linaro.org> References: <20190118174014.17860-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Cc: fabio.estevam@nxp.com Subject: [U-Boot] [RESEND] [PATCH v3 4/8] arm: imx7s-warp: Convert to DM MMC initialization X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Converts from fixed initialization of MMC to DM initialization of MMC. Signed-off-by: Bryan O'Donoghue Cc: Albert Aribaud Cc: Peng Fan Cc: Fabio Estevam Cc: Stefano Babic --- board/warp7/warp7.c | 34 ---------------------------------- configs/warp7_bl33_defconfig | 1 + configs/warp7_defconfig | 1 + 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 3d32b3eb52..146d722b15 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -30,8 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUS_PU100KOHM | \ PAD_CTL_HYS) -#define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ - PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM) #define I2C_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU100KOHM) @@ -74,43 +72,11 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL), }; -static iomux_v3_cfg_t const usdhc3_pads[] = { - MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_DATA7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX7D_PAD_SD3_RESET_B__SD3_RESET_B | MUX_PAD_CTRL(USDHC_PAD_CTRL), -}; - static void setup_iomux_uart(void) { imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads)); }; -static struct fsl_esdhc_cfg usdhc_cfg[1] = { - {USDHC3_BASE_ADDR}, -}; - -int board_mmc_getcd(struct mmc *mmc) -{ - /* Assume uSDHC3 emmc is always present */ - return 1; -} - -int board_mmc_init(bd_t *bis) -{ - imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); - - return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); -} - int board_early_init_f(void) { setup_iomux_uart(); diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig index 12141fedd3..b2f943c775 100644 --- a/configs/warp7_bl33_defconfig +++ b/configs/warp7_bl33_defconfig @@ -24,6 +24,7 @@ CONFIG_OF_CONTROL=y CONFIG_CMD_FS_GENERIC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DFU_MMC=y +CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index fee98dfbbe..65d801ffe2 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -33,6 +33,7 @@ CONFIG_OF_CONTROL=y CONFIG_CMD_FS_GENERIC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DFU_MMC=y +CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_OPTEE=y CONFIG_USB=y