From patchwork Thu Nov 13 18:50:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bresticker X-Patchwork-Id: 5299961 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 400099F2F1 for ; Thu, 13 Nov 2014 18:50:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CE0F201FA for ; Thu, 13 Nov 2014 18:50:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7E7120212 for ; Thu, 13 Nov 2014 18:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754068AbaKMSuZ (ORCPT ); Thu, 13 Nov 2014 13:50:25 -0500 Received: from mail-ie0-f201.google.com ([209.85.223.201]:41126 "EHLO mail-ie0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753906AbaKMSuZ (ORCPT ); Thu, 13 Nov 2014 13:50:25 -0500 Received: by mail-ie0-f201.google.com with SMTP id rd18so2385983iec.4 for ; Thu, 13 Nov 2014 10:50:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=G1ZWRwr/xpz17n0Awf9tcc8FwsGG7fB+PQ4uuU5iCzc=; b=CZxanz8Q5CmeMqoQDNIvObjjS0eUQueHfoihp2LPgGTYwhSJcEkas8bwIB0j397caz I+bv0vkzxQVn6HfM6IwFnp9DNMMau2aC6aQGZjk8dLj5wJ0CjuWbRYNRnRJpo761TFAy MgIcSAokuw/kj2HijTHnNfFGMQXGYV3dVyua5WhlebR+lhZWE56+ooGS4TnOcIAQBRNo DH7gDwWKBpmVRuX3k8LhmMcj/XIL/OzWPaSgPaUde9XK0qrQSiI63S6T5YSXkfVGbdx2 LWVKGQNVX7MJZgHSvouFS+dV6eNPf8JOgE7cZeYO3KPfLHcEdZBWKSnWWA3bTvLXA6n9 rytQ== X-Gm-Message-State: ALoCoQnG0efcBVlDynIN1z15MfjDicuhzQhfRXQURYCVlSRip4pPLG5qe2Z1ZILTdX6chgNf3bQ1 X-Received: by 10.43.73.6 with SMTP id yq6mr48362747icb.14.1415904624321; Thu, 13 Nov 2014 10:50:24 -0800 (PST) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id 5si1096547yhd.6.2014.11.13.10.50.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 10:50:24 -0800 (PST) Received: from abrestic.mtv.corp.google.com ([172.22.65.70]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id ghqMefcI.1; Thu, 13 Nov 2014 10:50:24 -0800 Received: by abrestic.mtv.corp.google.com (Postfix, from userid 137652) id 00F792204E2; Thu, 13 Nov 2014 10:50:22 -0800 (PST) From: Andrew Bresticker To: Seungwon Jeon , Jaehoon Chung , Chris Ball , Ulf Hansson Cc: Andrew Bresticker , James Hartley , Ezequiel Garcia , Doug Anderson , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH] mmc: dw_mmc: Add support for IMG Pistachio Date: Thu, 13 Nov 2014 10:50:21 -0800 Message-Id: <1415904621-26800-1-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the DW MMC host found on the Imagination Pistachio SoC. Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG. Signed-off-by: Andrew Bresticker Reviewed-by: Doug Anderson Acked-by: Jaehoon Chung --- .../devicetree/bindings/mmc/img-dw-mshc.txt | 29 ++++++++++++++++++++++ drivers/mmc/host/dw_mmc-pltfm.c | 6 +++++ 2 files changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/img-dw-mshc.txt diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt new file mode 100644 index 0000000..85de99f --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt @@ -0,0 +1,29 @@ +* Imagination specific extensions to the Synopsys Designware Mobile Storage + Host Controller + +The Synopsys designware mobile storage host controller is used to interface +a SoC with storage medium such as eMMC or SD/MMC cards. This file documents +differences between the core Synopsys dw mshc controller properties described +by synopsys-dw-mshc.txt and the properties used by the Imagination specific +extensions to the Synopsys Designware Mobile Storage Host Controller. + +Required Properties: + +* compatible: should be + - "img,pistachio-dw-mshc": for Pistachio SoCs + +Example: + + mmc@18142000 { + compatible = "img,pistachio-dw-mshc"; + reg = <0x18142000 0x400>; + interrupts = ; + + clocks = <&system_clk>, <&sdhost_clk>; + clock-names = "biu", "ciu"; + + fifo-depth = <0x20>; + bus-width = <4>; + num-slots = <1>; + disable-wp; + }; diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 8b65721..ec6dbcd 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -35,6 +35,10 @@ static const struct dw_mci_drv_data socfpga_drv_data = { .prepare_command = dw_mci_pltfm_prepare_command, }; +static const struct dw_mci_drv_data pistachio_drv_data = { + .prepare_command = dw_mci_pltfm_prepare_command, +}; + int dw_mci_pltfm_register(struct platform_device *pdev, const struct dw_mci_drv_data *drv_data) { @@ -90,6 +94,8 @@ static const struct of_device_id dw_mci_pltfm_match[] = { { .compatible = "snps,dw-mshc", }, { .compatible = "altr,socfpga-dw-mshc", .data = &socfpga_drv_data }, + { .compatible = "img,pistachio-dw-mshc", + .data = &pistachio_drv_data }, {}, }; MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);