Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2766665pxb; Fri, 5 Nov 2021 04:28:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdNs2LMejyWgiNM1NrYd4655Vdh2FfBaWBjhcNdpw6CXlh7Ru/TnTfXpMVwh4OUYKXPxPT X-Received: by 2002:a92:a304:: with SMTP id a4mr38870236ili.78.1636111705790; Fri, 05 Nov 2021 04:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636111705; cv=none; d=google.com; s=arc-20160816; b=aF7LOSEpbd+j3uRylRE62jp8MQUESoV+Qt85ToqLWrqrb19qnZQ7XKgn0D2oVJVUAn fEbK4NhZh9PVgX29O4U959tk0izNWMq1HvQYNy08U3WaqAa7NRufzzWrd1HJ/cbjoZnE hQQ9VIqHB1r6AmichzTmxn/ziOzfRV1qqrf7rqfXzRbEMxTprQ9E2Ct4db4z82GCcu53 auvvToOwivGm1GSkqpvnnGyXJ5oFqSrSr0d8ySA/ZZMl6IKE365y2VVJXEW81sZQZsKf dxop6Ce92bfNcydTSOqJlyrQNc5zBqa2LeKWc+WhbeiGn9tOZCCd7tM1ZPcwMQ5oSZkU mnJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NYA7HPQZf9DyTm9alYGShSLnmUJbxej82/KRXkB2LHk=; b=hbL4gh2VRMc9K90LJkcngrDxPyauefAW0ArwBeC9IoBnr+QVrjP49mEaUU4wkMJqDm irgx/OhpSa+JW8gvU6rR1dFeiPSC+km+HIKo4KBnjyiVBbP6aQQOoRT5R6rxosCo3It1 gv3eU56j9/3IZ2W1rXSFPtKQv2eehoATgmSDSphJEq+D2e5IslnzSjsjv9N4rAB2r48r 9N/XEov4Zb8dAcdrix9curhXS/v9uKLCgWRzPYVLEzVWW8w/PQAE3OGZ9Uwi4PwXNbhi 2q3Oig7pqN/KYK7RF/ksFUylniuOFHkI0ys+psB4mSQHc9ZYKdgIw2sw/DwLXwgYMAeJ XMKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b="Fg/y5Ie4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si16409448ilu.60.2021.11.05.04.27.46; Fri, 05 Nov 2021 04:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b="Fg/y5Ie4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232884AbhKEJJB (ORCPT + 99 others); Fri, 5 Nov 2021 05:09:01 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.168]:25467 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbhKEJIy (ORCPT ); Fri, 5 Nov 2021 05:08:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1636103154; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=NYA7HPQZf9DyTm9alYGShSLnmUJbxej82/KRXkB2LHk=; b=Fg/y5Ie4QKvkhRX+w27ADkMH4URh98QZbSiUwOZCJIO+ylU0KLk+Wp00q3jMgyo29/ nRt3ds1bHppBbIrx4pdwJqEF++98ph+2TWAYqDwZd29aFFNB4Dl232jKkJc/EOumtzg9 Ut6Rj9Ba7u2UnHrm5vIVMBLop8diDD/iswndU67ZFg9RDYpwGZHv4Ml7liC6V21oSlcv 7XogTl1uKeoQcIkudcGn4Uoleq7EqeKjzAVx9WtHkiRePVssLf5TcqJYw1CyIgvPBhw0 tixtL5kmRbybjCcZDH+27VXQIvpY65C2V3Hjzoz9NVydFLw6Y4LcHfce5TvrDem1l1+8 Lrag== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o12DNOsPj0lByOdfL1X0" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.34.1 DYNA|AUTH) with ESMTPSA id 902c63xA595s8uN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 5 Nov 2021 10:05:54 +0100 (CET) From: "H. Nikolaus Schaller" To: Ulf Hansson , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= , Avri Altman , Shawn Lin , Linus Walleij , Tony Lindgren , Bean Huo Cc: notasas@gmail.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, "H. Nikolaus Schaller" Subject: [RFC v4 4/6] mmc: core: add new calls to mmc_fixup_device(sdio_card_init_methods) Date: Fri, 5 Nov 2021 10:05:49 +0100 Message-Id: <73440c0f227778e57167dd9fedd350637a1d737a.1636103151.git.hns@goldelico.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows to add quirks based on device tree instead of having card specific code in the host ops. We call it just after where host->ops->init_card() can be optionally called. Signed-off-by: H. Nikolaus Schaller --- drivers/mmc/core/mmc.c | 1 + drivers/mmc/core/sd.c | 2 ++ drivers/mmc/core/sdio.c | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 29e58ffae3797..19cd138acaec9 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1634,6 +1634,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, */ if (host->ops->init_card) host->ops->init_card(host, card); + mmc_fixup_device(card, sdio_card_init_methods); /* * For native busses: set card RCA and quit open drain mode. diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 4646b7a03db6b..0d174fdf47164 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -23,6 +23,7 @@ #include "host.h" #include "bus.h" #include "mmc_ops.h" +#include "quirks.h" #include "sd.h" #include "sd_ops.h" @@ -1427,6 +1428,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, */ if (host->ops->init_card) host->ops->init_card(host, card); + mmc_fixup_device(card, sdio_card_init_methods); /* * For native busses: get card RCA and quit open drain mode. diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 68edf7a615be5..cf8ee66990508 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -707,6 +707,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, */ if (host->ops->init_card) host->ops->init_card(host, card); + mmc_fixup_device(card, sdio_card_init_methods); /* * If the host and card support UHS-I mode request the card -- 2.33.0