From patchwork Mon Aug 17 15:12:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 266449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FBB9C433E1 for ; Mon, 17 Aug 2020 15:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0033B2067C for ; Mon, 17 Aug 2020 15:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679150; bh=K1hirN2sBpFZcADEX5DOg98QwrA5CvrnN4JSkIwDI64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RyDLUQRb3IgeLTFCYyj71XgTjf+qfgDQIzjV4bbOK3DFqEOWdxtV6hLI3/UgLtZy4 CLbyka+vizBJknIXnLhjwAKi2i3vAu7I+8gYChCZqrmjTqbZHeLJ+nr+PlYIgtFUsb D1qyk7O6dsIgqbMLcCLhAAYPKoX3o5cnviRV692g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387725AbgHQPpq (ORCPT ); Mon, 17 Aug 2020 11:45:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:57066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730663AbgHQPpk (ORCPT ); Mon, 17 Aug 2020 11:45:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C80D20789; Mon, 17 Aug 2020 15:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679139; bh=K1hirN2sBpFZcADEX5DOg98QwrA5CvrnN4JSkIwDI64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jK15g4OAuh/Wp8WQ6ZK8HbnTKbo5vmlSZG8QMyaOATpNReoO49+9iVpARUBzbV0Hf gGxWLA2MNQbgh8e4RqqM3w4RS62DkQGD8xSa/1obZAeoeEiEY5naK4VFh3eqBWzcTD o/NxUIjI7LSA1EIYe8zCDdqPaM0vzF1zRoiwozLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shirley Her , Ulf Hansson , Sasha Levin Subject: [PATCH 5.7 109/393] mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1 Date: Mon, 17 Aug 2020 17:12:39 +0200 Message-Id: <20200817143824.902740973@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: shirley her [ Upstream commit cdd2b769789ae1a030e1a26f6c37c5833cabcb34 ] To fix support for the O2 host controller Seabird1, set the quirk SDHCI_QUIRK2_PRESET_VALUE_BROKEN and the capability bit MMC_CAP2_NO_SDIO. Moreover, assign the ->get_cd() callback. Signed-off-by: Shirley Her Link: https://lore.kernel.org/r/20200721011733.8416-1-shirley.her@bayhubtech.com [Ulf: Updated the commit message] Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-pci-o2micro.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c index fa8105087d684..41a2394313dd0 100644 --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c @@ -561,6 +561,12 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot) slot->host->mmc_host_ops.get_cd = sdhci_o2_get_cd; } + if (chip->pdev->device == PCI_DEVICE_ID_O2_SEABIRD1) { + slot->host->mmc_host_ops.get_cd = sdhci_o2_get_cd; + host->mmc->caps2 |= MMC_CAP2_NO_SDIO; + host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; + } + host->mmc_host_ops.execute_tuning = sdhci_o2_execute_tuning; if (chip->pdev->device != PCI_DEVICE_ID_O2_FUJIN2)