From patchwork Fri Jan 12 12:15:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice CHOTARD X-Patchwork-Id: 10160641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51E6660327 for ; Fri, 12 Jan 2018 12:25:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37CE027968 for ; Fri, 12 Jan 2018 12:25:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BEF3289CC; Fri, 12 Jan 2018 12:25:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8F92289D6 for ; Fri, 12 Jan 2018 12:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o+wShkBN8j3//dwUo7jpXxAvb9kWRbQid96cWokNQmM=; b=ae0cWgU3/sT897 dsLh7sD+752VesADOtSFlxaRBrNFKyBBUaL6PQ3VASbpw5ZjokbRM4jArvcAnXNfqYAj3sz/FY4u3 gOmRgw581+G4yC9NsIXRGXs9FCu8PRcSPPmwGLbxr0mqxv25rTTVlJjbkmn9LaMQxaVU3yJLrycmE 34U2WNcRO8vMnp+qaYbJjmn1VlZoNosiUbU5R1U4GMk96cOmabnJkidK4zxk1H+QwDv1eMqsxs4b9 FTUx4qBx8ZJbTX0JzWyUxBDhMI1P0LTLkOpldeFsCokJjAO5ir5pNyWBLhfganaUpbAUMn8O1P4TN VhB481MyE7P+CbZa5OQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZyOf-0001FU-ID; Fri, 12 Jan 2018 12:25:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZyNa-0007CK-GT for linux-arm-kernel@bombadil.infradead.org; Fri, 12 Jan 2018 12:24:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p5abNgWMdee66xMJ91rAWKZZepHE8EByJ7BikCpCiC0=; b=gjdZ8H5fkTPkwEKf23S49irBg alCLRzDNvuTP74wBOKKb3/FGjgsWift8AOuC00iQAVKM0n7XzDbIiTSnGykLCgvloLBAbRjkYlIRI XzwZ1INnUjkjMITkXt5tfYJIitiAY0hOHGJr+CTmTx0CYmuGZ50Of/KcYa2I2Rf+5JxudgEcyf8qB KSowXg73ZT6AuCDR7LaxJxsy3qoK633GO7oIu03N+3EPWPhIyVOXz/qft6dD7wTWoefDbSJ0ED6Ul I9zX5wkwVtNO406TIat31WnI9ZkmXZkFj/fKTFDOEfE+9BwOtFS7eB6hGTxhKkHXNSeD2ECdt+BIH RcSMHs2Qg==; Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZyGl-0003gm-HB for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 12:17:17 +0000 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0CCEHFW011416; Fri, 12 Jan 2018 13:16:21 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2febc4vy2c-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Jan 2018 13:16:21 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9CC7434; Fri, 12 Jan 2018 12:16:20 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6FADF24C1; Fri, 12 Jan 2018 12:16:20 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 12 Jan 2018 13:16:20 +0100 From: To: Russell King , Ulf Hansson , Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Mark Rutland , Alexandre Torgue Subject: [PATCH 04/14] mmc: mmci: Add STM32 variant Date: Fri, 12 Jan 2018 13:15:58 +0100 Message-ID: <1515759368-16946-5-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515759368-16946-1-git-send-email-patrice.chotard@st.com> References: <1515759368-16946-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-12_06:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180112_121711_815195_85A0214C X-CRM114-Status: GOOD ( 15.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Andrea Merello , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Patrice Chotard , linux-gpio@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Patrice Chotard STM32F4 and STM32F7 MCUs has a SDIO controller that looks like an ARM pl810. This patch adds the STM32 variant so that mmci driver supports it. Signed-off-by: Andrea Merello Signed-off-by: Patrice Chotard Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 38e8c20..9fb5035 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -245,6 +245,23 @@ struct variant_data { .opendrain = true, }; +static struct variant_data variant_stm32 = { + .fifosize = 32 * 4, + .fifohalfsize = 8 * 4, + .clkreg = MCI_CLK_ENABLE, + .clkreg_enable = MCI_ST_UX500_HWFCEN, + .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS, + .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE, + .datalength_bits = 24, + .datactrl_mask_sdio = MCI_DPSM_ST_SDIOEN, + .st_sdio = true, + .st_clkdiv = true, + .pwrreg_powerup = MCI_PWR_ON, + .f_max = 48000000, + .pwrreg_clkgate = true, + .pwrreg_nopower = true, +}; + static struct variant_data variant_qcom = { .fifosize = 16 * 4, .fifohalfsize = 8 * 4, @@ -2019,6 +2036,11 @@ static int mmci_runtime_resume(struct device *dev) .mask = 0xf0ffffff, .data = &variant_ux500v2, }, + { + .id = 0x00880180, + .mask = 0x00ffffff, + .data = &variant_stm32, + }, /* Qualcomm variants */ { .id = 0x00051180,