From patchwork Wed Jan 9 16:47:30 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: 155087 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp917710jaa; Wed, 9 Jan 2019 08:51:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN5XgifACf8ujx96p+PV1TQmmJ9Gtk4hS+tvKMUcFPC7Tt9fyLYUA/OUKdhaw25M8I9Ha+G2 X-Received: by 2002:a17:906:7751:: with SMTP id o17-v6mr6035955ejn.15.1547052685072; Wed, 09 Jan 2019 08:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547052685; cv=none; d=google.com; s=arc-20160816; b=f7M+H6c5BMA6w87PcDPmvQ5HdN0O3y+knZ/h7QxlSCTGnQ/W+Jy220UR4/UyDoStok mJjTnz3Xkvv+C+WFYPq7Z+DtpinQo+LkJhBYdOUEg2++Zqbs8dt+UGi/ZlUDKbECytGF BiIWVZzZhSGewuqQSPqdbUkgXduUUFvGQtYCrO9G6HFcoTpW3fDzU4GF1EWPJyAS5vxT s++TE58DE05hqXCQ+Yj2T3wt7vHI26aTl89DNDS+436nZhohNrI0DVBf845DVgwi73r3 KL7kKyhT6by03yE8IdOicEeu3q0KbPjZ+YaS5Gmnf/ExQkf7YdJirvo5TJWCQK1t+VBF fkUQ== 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=0CBlteB6NKldQw6YYehOWPW/HT1+BEDOzr7DGTzp/PiEdcF9uMXVXQQ/jqgDsDindi ztP8w3ZApppuiSvCuppwxQGPdOPHIawsz75zzCM6i8qsrmadS+m6OwVc1FMDCioG3W8s 15ISsG0IOkmk2GF8RZnS/Gn53D+dHYvRAsMGLTSGWkuS/6xxEGi45NiSKMc3HcQi7KNg p463ShObbmyqHp2gdSc6IaH9dA2IkJXynRVGe3BWJpApKYlgsT3IvXyy20U5A6U/tz6r OeW0M+G7PyHYvHmLROZo4u/PrJYwV9YlYAn5tLlZU4RR0gy/9khJW8xRj/F2Jk+3il9f 0aBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ws2z+TuA; 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 r53si230352eda.218.2019.01.09.08.51.24; Wed, 09 Jan 2019 08:51:25 -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=Ws2z+TuA; 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 8F0EAC22000; Wed, 9 Jan 2019 16:49:35 +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 EA22EC22018; Wed, 9 Jan 2019 16:48:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D1F0EC21FF1; Wed, 9 Jan 2019 16:47:51 +0000 (UTC) Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by lists.denx.de (Postfix) with ESMTPS id 6339CC22018 for ; Wed, 9 Jan 2019 16:47:47 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id h50so7860178ede.5 for ; Wed, 09 Jan 2019 08:47:47 -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=Ws2z+TuAQoyG417sGl1kF6aSdhYRKhdo1a43H9Xsrrw9uAd+dWVkmkYOD01aIOGi03 aO3YyuBNsOH4bZYSIQG8kGrfTJwF6bRRhrLukBD5d/VWhtUW6VHCariS8Icw3Yxz0lfm STUU+ppHi/W5esdhAxkbdFSXyOVI4E6rmi7DQ= 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=mi+dYrWUH41yFH3QrNz91nDhmTIBGmjvoz8DzQAIQRZb2SMUHJ2/HdyaUbPXhVygOb Zw2nK84ppQFl8zMgk/5ommpF3mDi4Kr2vZFJlZntBXlwUsG8qPgT5e7o2V8y4Db2PRBx mvfgI6aIiTqwpg4bJdDTZHgIe0a9zIDoJW41TTi7r5PXWCmXHwujdUM3vz/N6cMhfnL2 JOwlT3J6IJrSHgBqmpP7S0a6001o0jmQ4iIrifjCJvP8Mxs00rR722yNg9gKkTvJMB3c 0yXs/MTpphYFTVmLcNHEGVNv8aEGwTee7yNANvUenY4HEsI8zntv5R8LNAjJKwoT/FXP jevg== X-Gm-Message-State: AJcUukeE5Rl2JmJiJ+KYGLq9Fqic0nXWnT4DUBpCpwulQTWk26u9PBX1 N55lOhH2fHGdg0DA3QJLW7EDcWSA/98= X-Received: by 2002:a17:906:49c2:: with SMTP id w2-v6mr5914271ejv.117.1547052466657; Wed, 09 Jan 2019 08:47:46 -0800 (PST) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id b14sm1081499edt.6.2019.01.09.08.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 08:47:45 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Wed, 9 Jan 2019 16:47:30 +0000 Message-Id: <20190109164734.22598-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190109164734.22598-1-bryan.odonoghue@linaro.org> References: <20190109164734.22598-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Cc: fabio.estevam@nxp.com Subject: [U-Boot] [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