Received: by 10.223.148.5 with SMTP id 5csp7541550wrq; Thu, 18 Jan 2018 06:42:31 -0800 (PST) X-Google-Smtp-Source: ACJfBovecSgzyX+kHw1exFLmsAQ6K8s7GGxZu1e8rS/+F6X1b9+2tHRmbOdoT97s5NZ6oFASdSpR X-Received: by 10.99.172.86 with SMTP id z22mr29419401pgn.227.1516286551319; Thu, 18 Jan 2018 06:42:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516286551; cv=none; d=google.com; s=arc-20160816; b=BIFgimPO2/N68GwOTN52jnaUZm5fJeS1Iz8v8/R+ac0nBSaCCDu6GqyiiFlJjz15Hi 7qH3XWdYUvYqQHK1Ncg/Z9DQ4gHZpobohvsxzuP/YF4pN0kRIntO5Jc17oJGAjWVPi9K 5JfAXsnQIuiddCAwynysnmNEqZGpEECEgUj6SUoiWrP7bvX0vHY0chBDQ3EnZtFmVDMl njRmLuXoLJrzM0L6UPya9+1RSuh9SKZNcYhQo4WfnzrrMqnRKHWq/DtlZdJNZ98W0wMR ZfRyqSkkzeo3lbarlKPVgBe8Sbm+7R/7eTAPsqmqwvFkN5snWNK45VGZ8dVASGUkSw2v Kd1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=rm8rtIp05MUABQOhib24xJO0TbF82ilw9DUNVXXhY8g=; b=leqIXFUQty0HX3ixS+/ysVTisPsegBVJG5sv8uo3yn0Yh4+Pji0IF4h4KD7R81EhqQ TGO96jrGTAKdxlSSclEc5fENoqiI2dmTAOoF7rISwbsuimZHqV8ATGfFvBORY7L2DaBM RcsqlLxKIKXwtjC97K9l2fg2Q0TeWJpd1GiSGJ2g4+wk4nnE87XxUMykuUAfdcRjiIEA Tc6aVsga8BFpjo5UnNnClbNrfYnymk+F83IaIDjPVn86bdI7KZ1aAWkH6feKWJkCfblr 2fFCEqCMphoY72XLhTq8O1eQOog6/OyPBi47R/4r3VBgq9E3FkoJWkidguGYp6yusnZd cRCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si6226448pgc.816.2018.01.18.06.42.17; Thu, 18 Jan 2018 06:42:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756553AbeAROf6 (ORCPT + 99 others); Thu, 18 Jan 2018 09:35:58 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:24998 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756455AbeAROfy (ORCPT ); Thu, 18 Jan 2018 09:35:54 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w0IEYUrE028883; Thu, 18 Jan 2018 15:34:55 +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 2fgyacvxs2-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 Jan 2018 15:34:55 +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 AEE3231; Thu, 18 Jan 2018 14:34:54 +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 8BF4E2646; Thu, 18 Jan 2018 14:34:54 +0000 (GMT) Received: from localhost (10.75.127.44) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 18 Jan 2018 15:34:54 +0100 From: To: Russell King , Ulf Hansson , Michael Turquette , Stephen Boyd , Linus Walleij , Rob Herring , Mark Rutland , Alexandre Torgue CC: , , , , , , Patrice Chotard , Andrea Merello Subject: [PATCH v3 05/14] mmc: mmci: Add STM32 variant Date: Thu, 18 Jan 2018 15:34:21 +0100 Message-ID: <1516286070-24927-6-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516286070-24927-1-git-send-email-patrice.chotard@st.com> References: <1516286070-24927-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-18_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v3: _ none v2: _ Replace "pl180" by "PL180" in commit message 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 9918a5f..30c93c9 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -244,6 +244,23 @@ struct variant_data { .opendrain = MCI_OD, }; +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, @@ -2021,6 +2038,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, -- 1.9.1