From patchwork Thu Jan 3 01:44:39 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: 154701 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp165573ljp; Wed, 2 Jan 2019 17:47:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xrw4YGu9Dom/WTHb9GXpcG+mOUKdWwib8X6cQCbv0jxPGx03LT3FACwNU0ZQ7p3OI+qyxl X-Received: by 2002:a50:a246:: with SMTP id 64mr41372359edl.43.1546480033042; Wed, 02 Jan 2019 17:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546480033; cv=none; d=google.com; s=arc-20160816; b=gLdvuziMyMGPp4EteYvYl+rvwP4q4NLeRN9Fl5QAnBEWniSpOzKymDXAxVg8LtUrAc 997qfcboa+t1BZn0F68f9wEN1qtyvFdsU5byKK6qZCS2IJtsz3NttQgY6UpeSSzSJfWd qBVIajC/1ajign+D0QDQ6gpjMMl9wjpaLiV0gvFnfUcGACHeS76P7wJCy8UThvR5uGsc NczhAlIckMC1ksFqGIncmfRlFgDffdtjdO6DbsGXOv61noFTMtrVkpJPKPzKIlC5mLgI Xun9eDpQywLb/sSLp185Z0YZWp1H51m3TjIQsSyf9kUmaro2ptsRqeTVTfehIOVAe0Bs mA+Q== 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=K2CyObMc3PNdUXAHGmjaEBWBQ5UuBkvzMhZzz1eeGiU=; b=0gHX7Qxq9UAeInxkL4xQAYe6q1UyL2dK3XUWoLE2T1XfbG+akprJ84m23r0N897sCb X7ztjBDfh9HmognWEA+vioXO5zzY5dMAK2nL0sBouyD24cFzSbzC7Ex/yZ6INW7cLq0W K4b9MzNOFzPh/3oH9EUccdiNh39B5utEMcr0RRRGK4sJObighR2P1XB2nNPoXVKOLQmu qvtv2aSTElk3lYMsgjqscq6GnwgroRFdwp1lqcHndpjcNFjQZSLTcD3QabBL6lXJfqW/ vmtr9U9gLCo1aUR7U6fbosD569sG+FRuu1A76WK0azO81dKkM6tKDc1/X/IgtXZgUGIO pAOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="C2X1/xe6"; 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 f20-v6si8529690ejc.222.2019.01.02.17.47.12; Wed, 02 Jan 2019 17:47:13 -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="C2X1/xe6"; 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 A8231C21D72; Thu, 3 Jan 2019 01:46:20 +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 BEE83C21DA1; Thu, 3 Jan 2019 01:45:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 43D8CC21D83; Thu, 3 Jan 2019 01:45:02 +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 78D26C21DCA for ; Thu, 3 Jan 2019 01:44:58 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id b14so27700492edt.6 for ; Wed, 02 Jan 2019 17:44:58 -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=UhvONJDDVdL+Gyibb2+snYb+nKtFIFdW5rCJsmlEuXE=; b=C2X1/xe6wFJI/PgJM/rhJd93+/1qghnU85F19tvlhbnxLYH1P+WffsYiOFNXWLQSk+ 5XQjsjm30Au6bUt3Szx9jn8f7A+5Kz+ePFRUKN9a2DFg4No1YOcNT/L0tt3D1i7ihU1F FOfGU2IXdgWACsuMsVnpisgJL4YPPUiUC3DLU= 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=UhvONJDDVdL+Gyibb2+snYb+nKtFIFdW5rCJsmlEuXE=; b=bUtYIU8uMMT+k6WGUry3tZCk8Ov2RnYCZoVFHFCFsos/NlaRqvYlTyc23qdGGtUnLt Rime15zyt2DwExzQX4QBLhILCqQrOJNsWWWNtBkuL+o0Q1VpUXrmmXEJ82gtxwAhe75p 9m0cSveTgHN0Wg3x1s/5BXJb1IEd2+IkiTaBf6IH8jJYHE1lbKZrKykMLecFj/RHYLiM qCejVSsxLMBMk+BHl6r9xj51NycDwwXd8i2OSshM51vS2EXBDDfrLv/ZpDv127RwgZ2o C23GqS/Xb1Z5dfYwmqz+2Zpyk+VE2KVIUeVH/Um3SKDTbDtcv1vKPJcaYsaAApTqfXAl ZzrA== X-Gm-Message-State: AA+aEWbzke9gpTg/n5yrIQjJWz39CG1RlW77TTinzgpFVC215T59mIMU ua4cGYxXcPwmNdFYz2lkUfACx6oQ+WctBQ== X-Received: by 2002:a50:af21:: with SMTP id g30mr38594428edd.234.1546479897760; Wed, 02 Jan 2019 17:44:57 -0800 (PST) Received: from localhost.localdomain (D4CCACC7.cm-2.dynamic.ziggo.nl. [212.204.172.199]) by smtp.gmail.com with ESMTPSA id g5-v6sm13036720ejm.15.2019.01.02.17.44.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 17:44:56 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Thu, 3 Jan 2019 01:44:39 +0000 Message-Id: <20190103014444.11134-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190103014444.11134-1-bryan.odonoghue@linaro.org> References: <20190103014444.11134-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Cc: fabio.estevam@nxp.com Subject: [U-Boot] [PATCH 3/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 --- arch/arm/dts/imx7s-warp.dts | 11 ----------- board/warp7/warp7.c | 34 ---------------------------------- configs/warp7_bl33_defconfig | 1 + configs/warp7_defconfig | 1 + 4 files changed, 2 insertions(+), 45 deletions(-) diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts index c44db20734..615ed7ed80 100644 --- a/arch/arm/dts/imx7s-warp.dts +++ b/arch/arm/dts/imx7s-warp.dts @@ -251,17 +251,6 @@ status = "okay"; }; -&usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; - bus-width = <4>; - keep-power-in-suspend; - no-1-8-v; - non-removable; - vmmc-supply = <®_brcm>; - status = "okay"; -}; - &usdhc3 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc3>; 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