Received: by 10.192.165.156 with SMTP id m28csp1761133imm; Tue, 17 Apr 2018 05:13:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49nyUCWDUGKPQSZI/875S/7OXxgzEjkh6X7Mfwgl4N8vyxLpaD2Bo3Q71fxcRL/eiGOcxXA X-Received: by 10.99.188.9 with SMTP id q9mr1556150pge.381.1523967201465; Tue, 17 Apr 2018 05:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523967201; cv=none; d=google.com; s=arc-20160816; b=T/+RD79VspRqX/RUONACWwBYjVzZqM6HujFuPpIps3wHId1ID1/I4aJi2QMAH8CFGl hngHwvmC0JX74utEICYdi9vD0qrluLClFy9PYrC4B999Z5LeEzNHKKp8KRODwJMme8T0 CUbyOdJBOIfkviLqIb7+BMKXdLg+/4W7dgeu84ZXaiNmW+iyZEQWgHlnPcjl7gHus5iL M+iEGUZMflcjabBhT+N8yfbuoRIVqnyr1DUhY9zuHa/pIpLJXm5DYZ+cezgeaYHbXAhZ 9oCKItdApn4uY+VOm0k9PKBScWAxgVfFKA0wXOUYbYK5f5HE0kPLd473wok511XDxRAf pM0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wDcapK1rR3SYn0vFIKXdh/r77YCsKYabYB4waklPbwE=; b=Q+Ri0BZaVhNhsAAErGRro010t6FkOJNP3NKk9kGL/jnMEYo48h7x5Qk6DFr9tUXMby Ngd+zI8pbn4NezV+d+SDjW1cACTZOXtKwfnpVnamCbZQ+YyP8B51RI5B2rHGc9GZkur4 BZjuh5fFoS8De1UOGmfdY786ywyQVDQb8r4brasaTGWhbc/Rl+yIzcoHSpVbvKH3JygQ fX/s35V0xxM5OQBpx/gTKaFGk5o5r69QaOeEmeTZSaFh+etgwJKndd9WgWltKkJ/5+Ch 7AVvBuDT5E81mRFI7RGUHR34sl1DcmQkFZJSeEA+kEHsO6vJWaKKDc/kIDbVoq7A/CDv KfIA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3-v6si14249612plf.446.2018.04.17.05.13.07; Tue, 17 Apr 2018 05:13:21 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbeDQMLj (ORCPT + 99 others); Tue, 17 Apr 2018 08:11:39 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:33007 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021AbeDQMLi (ORCPT ); Tue, 17 Apr 2018 08:11:38 -0400 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 61D9924E1358; Tue, 17 Apr 2018 05:11:37 -0700 (PDT) Received: from paltsev-e7480.internal.synopsys.com (paltsev-e7480.internal.synopsys.com [10.121.3.53]) by mailhost.synopsys.com (Postfix) with ESMTP id 21FD33DEB; Tue, 17 Apr 2018 05:11:33 -0700 (PDT) From: Eugeniy Paltsev To: linux-mmc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jaehoon Chung , Ulf Hansson , shawn.lin@rock-chips.com, Kukjin Kim , Krzysztof Kozlowski , Alexey Brodkin , Eugeniy Paltsev , Eugeniy Paltsev Subject: [RFC 0/2] dw_mmc: add multislot support Date: Tue, 17 Apr 2018 15:11:28 +0300 Message-Id: <20180417121130.25281-1-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series consists of two patches: 1. revert removal of previously existed "pseudo-multislot" support. * Revert "mmc: dw_mmc: remove the deprecated "num-slots"" * Revert "mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT" * Revert "mmc: dw_mmc: remove the unnecessary slot variable" * Revert "mmc: dw_mmc: update kernel-doc comments for dw_mci" * Revert "mmc: dw_mmc: use the 'slot' instead of 'cur_slot'" * Revert "mmc: dw_mmc: remove the 'id' arguments about functions relevant to slot" * Revert "mmc: dw_mmc: change the array of slots" * Revert "mmc: dw_mmc: remove the loop about finding slots" * Revert "mmc: dw_mmc: deprecated the "num-slots" property" 2. Add missing stuff to support multislot mode in DesignWare MMC driver. * Add missing slot switch to __dw_mci_start_request() function. * Refactor set_ios function: a) Calculate common clock which is suitable for all slots instead of directly use clock value provided by mmc core. We calculate common clock as the minimum among each used slot clocks. This clock is calculated in dw_mci_calc_common_clock() function which is called from set_ios() b) Disable clock only if no other slots are ON. c) Setup clock directly in set_ios() only if no other slots are ON. Otherwise adjust clock in __dw_mci_start_request() function before slot switch. d) Move timings and bus_width setup to separate funcions. * Use timing field in each slot structure instead of common field in host structure. * Add locks to serialize access to registers. NOTE: this patch is based off of v4.17-rc1 NOTE: as of today I tested this changes (in singleslot and multislot modes) only on Synopsys HSDK board. But I will get ODROID-XU4 board (with Exynos5422 which has DW MMC controller) the next week so I will test it on this board too to catch any regressions. Eugeniy Paltsev (2): dw_mmc: revert removal multislot support dw_mmc: add multislot support .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 5 + drivers/mmc/host/dw_mmc-exynos.c | 4 +- drivers/mmc/host/dw_mmc-pci.c | 1 + drivers/mmc/host/dw_mmc.c | 486 +++++++++++++++------ drivers/mmc/host/dw_mmc.h | 35 +- 5 files changed, 387 insertions(+), 144 deletions(-) -- 2.14.3