From patchwork Thu Nov 22 22:53:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 1792601 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0AD943FC64 for ; Thu, 22 Nov 2012 22:55:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753990Ab2KVWyX (ORCPT ); Thu, 22 Nov 2012 17:54:23 -0500 Received: from mail-vc0-f202.google.com ([209.85.220.202]:56089 "EHLO mail-vc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753769Ab2KVWyT (ORCPT ); Thu, 22 Nov 2012 17:54:19 -0500 Received: by mail-vc0-f202.google.com with SMTP id m8so458319vcd.1 for ; Thu, 22 Nov 2012 14:54:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=rGx46qkmERGcyN9rIuEdsk+4wOo3BWbwodWGwA7IXJA=; b=HjQ31zbi3pTRb7LQW73CBGcDelFb/FbAeJBGekggVSslPyuIFMI2oEtHpN+oEbDDuB yAPU5pL0r178llwc+XNBn9oWyfeEI9+xhIuWUbo8iYkPiHlhREmFkjifgCfkLoAo1fzX eGLU7pD8PH9JAx4K8rqHK3C3Ddw84AirxuISZPeAfMQ2KsDgoLP2cKpAwjAr4MwUL3Jw iUu9KJ9eCsg2oN0o8QbBgXfgDa72Gsj/sTeSKO5Ozgb3VmSDdG/lM7o5sQWVH03RBpTq ddqQVYOQD4I5xp6RxehM7YUHndz1lwjY4Snw4IHmRLTIb672SXp/VJTMIp+Oszb0B2Ax aR7g== Received: by 10.236.44.168 with SMTP id n28mr1198803yhb.21.1353624858135; Thu, 22 Nov 2012 14:54:18 -0800 (PST) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id h50si311900yhi.3.2012.11.22.14.54.18 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 22 Nov 2012 14:54:18 -0800 (PST) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.73.80]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 09541820050; Thu, 22 Nov 2012 14:54:18 -0800 (PST) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id A92D180496; Thu, 22 Nov 2012 14:54:17 -0800 (PST) From: Doug Anderson To: linux-samsung-soc@vger.kernel.org, Thomas Abraham , Kukjin Kim Cc: Olof Johansson , Arnd Bergmann , Will Newton , Chris Ball , Jaehoon Chung , Seungwon Jeon , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson Subject: [PATCH v2 1/2] mmc: dw_mmc: exynos: Stop claiming wp-gpio Date: Thu, 22 Nov 2012 14:53:49 -0800 Message-Id: <1353624835-19137-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1353535387-32106-1-git-send-email-dianders@chromium.org> References: <1353535387-32106-1-git-send-email-dianders@chromium.org> X-Gm-Message-State: ALoCoQmJg5QOzPGPcflIf/xFXT2eFU3G2+5zZPgi8WB0W6XZ7+yFYprWF8PjujbowgmBIeGFGbJfRsCOnnQugS/k0HCCCxAjIjFTFzkONNDZatUEqLor0062KBJX2KpTUhQam9ioMjZTmlkdXRGLRDzdS7TkSnyKKcODxBQ9tUQ5D2N7H3a0nGX+KygRW10XKsqHtFu8H9Gut9sWPzBqZlX3G43LoLj9Hg== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The exynos code claimed wp-gpio with devm_gpio_request() but never did anything with it. That meant that anyone using a write protect GPIO would effectively be write protected all the time. A future change will move the wp-gpio support to the core dw_mmc.c file. Now the exynos-specific code won't claim the GPIO but will just set the DW_MCI_QUIRK_NO_WRITE_PROTECT quirk if write protect won't be used. Signed-off-by: Doug Anderson --- Changes in v2: - Nothing new in this patch drivers/mmc/host/dw_mmc-exynos.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 4d50da6..58cc03e 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -175,12 +175,12 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host, } } - gpio = of_get_named_gpio(slot_np, "wp-gpios", 0); - if (gpio_is_valid(gpio)) { - if (devm_gpio_request(host->dev, gpio, "dw-mci-wp")) - dev_info(host->dev, "gpio [%d] request failed\n", - gpio); - } else { + /* + * If there are no write-protect GPIOs present then we assume no write + * protect. The mci_readl() in dw_mmc.c won't work since it's not + * hooked up on exynos. + */ + if (!of_find_property(slot_np, "wp-gpios", NULL)) { dev_info(host->dev, "wp gpio not available"); host->pdata->quirks |= DW_MCI_QUIRK_NO_WRITE_PROTECT; }