Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp58945pxb; Mon, 8 Nov 2021 09:42:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLDgxUkHJVnHGCpP4FuN6vOu8xph9o1eQ29PYj9y0WOWBY8azjsmH9SCy+o50e+t+znDER X-Received: by 2002:a05:6e02:1aaf:: with SMTP id l15mr585100ilv.318.1636393349094; Mon, 08 Nov 2021 09:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636393349; cv=none; d=google.com; s=arc-20160816; b=bE65wnuCD6Cv6UqlZ+qAVUj4aAHBRu5k841Z5PTlq341o1uwIY9jSfvF+VXCWjadil SLSK/VW05F5Lvp4ObfvXczDKYLcDdTWxOhuDS8yUArzh0ZX6FP6QPpliLswCXFmuDUVh glTRQKKUTJg9SrD3/N1LnBdYeCJSJItBE5aB3HjDq3k0K9MrGQDaSqUTIE55EgeNVIX4 9Vqh7x9TsjvWOIq51aZIicDF0R8g9Fl1txihqnOclMlT+1LvUqT4PHtnkrsznFm3X+rQ EqjlHxhDhF7ZLlD6+KBqNQZjkvXoJ+xBD+Y+8mlbjC9tEfhaI6KPUzNXb1nlRYsYgBaC N61A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h52OyuezneY+HfFCDz2455oumulI2OIMcxced9CiUKI=; b=DTjdPBsiX2iLpLtfYAFpR80pa+cbIigrSh5Y+PVaAfXSKNfg8dbgSqnRQTu1r5ptrV 6oZmjiL+8PbDHatIczM+RKATRQkJV8HGA+wSsZMpCWwX7W3Skfzwl5HoxEVOTbpzQ1JG twg6SRcXYxecjDS23KdYybRU8kwI/4zFBqkk9CqNnqrr1vxiWhGGH639DfULc5K2bxiN b2zrZ39GOKpCsV2bGvRcPMXpuSRmAF+ngMuj/+OLHX+z81evpA4anFXqUMsWnArUMjj/ zRJLJV09g8oAkLZ1XVve+J2q79WS/PezLImbPK7dccxwzxhdXbQrpY2vJHD6MwcrJPel iAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sbXMXPE1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si39249881ila.39.2021.11.08.09.42.05; Mon, 08 Nov 2021 09:42:29 -0800 (PST) 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=@linaro.org header.s=google header.b=sbXMXPE1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232449AbhKHPO5 (ORCPT + 99 others); Mon, 8 Nov 2021 10:14:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240991AbhKHPNs (ORCPT ); Mon, 8 Nov 2021 10:13:48 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58F5BC0432E3 for ; Mon, 8 Nov 2021 07:09:25 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id z19so13952818lfd.8 for ; Mon, 08 Nov 2021 07:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h52OyuezneY+HfFCDz2455oumulI2OIMcxced9CiUKI=; b=sbXMXPE1fe3Rl8GIZha8hEcDly/0oYq8PgDTmFs0eqJy4Pa3TOAgxCFsBPe4PJEuHb w/F+Vj4yNe4h7FaDCQgUQmLIXX/P4c4BbXiSxC0ufNDrNUjBVxVB3ej+RnQNIzwE2lKl shPecTdYaRk69ZOI7aL4lEHHFgpMABT5xr+VG6PTqUZ3J8UChte/0nCO0EZFzsW+J1Rk mWTH1b9Q7LYN1rYV43cUXr5gfCcH18FhcenYmrdoEMXIMn8FsMTd1/n6fvWOqc++tP8l iTGgLOOffoBpVTL1BEQ3zr+YDRgD7KT9aBhEQreOkxPo63LpJUP7IdeHhOUMhuHxT8uF PZKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h52OyuezneY+HfFCDz2455oumulI2OIMcxced9CiUKI=; b=tZyIRL+fv616mwFhYtNTS/OMGafZOSeNmYFMQuBDiMbVX5VlwirYPP+NYa5Bn7Uu5r EcrSJ3/SZgXuQWMPEQEYuWbHjog0hsVB3wc0bqsOpiCG/+Gtae6AD5rRXBtIJokniVDK g4Vtmmzh6kgw+rcLkwI+fJRPoAVcS1BtpP8edxji4pMX9osx5pxPUTq68UrecUKnj539 WnlKyof+NAgLhYTwOLua38UVcRiwu6Zzqw5vcbvq9S+sdH/XIShjbEMJg/MLgJmvmSxN aHrXamKoQWv+ubFQDECrlHnR8i8FX+H+9wG3RIV83aZktVl7KxYV0hdNVQj8ozPi3RRo wAAA== X-Gm-Message-State: AOAM533hxjCK5If4et44sSN4AB3qnXSOKRr9QB9t5gmZuNGgA4Xddt4F OLz/7fD8IZ1iTUrjYavqY6nvCx/8Y0VFT50OH8gRgQ== X-Received: by 2002:a05:6512:3d15:: with SMTP id d21mr139607lfv.233.1636384163698; Mon, 08 Nov 2021 07:09:23 -0800 (PST) MIME-Version: 1.0 References: <73440c0f227778e57167dd9fedd350637a1d737a.1636103151.git.hns@goldelico.com> In-Reply-To: <73440c0f227778e57167dd9fedd350637a1d737a.1636103151.git.hns@goldelico.com> From: Ulf Hansson Date: Mon, 8 Nov 2021 16:08:47 +0100 Message-ID: Subject: Re: [RFC v4 4/6] mmc: core: add new calls to mmc_fixup_device(sdio_card_init_methods) To: "H. Nikolaus Schaller" Cc: =?UTF-8?B?SsOpcsO0bWUgUG91aWxsZXI=?= , Avri Altman , Shawn Lin , Linus Walleij , Tony Lindgren , Bean Huo , notasas@gmail.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Nov 2021 at 10:06, H. Nikolaus Schaller wrote: > > 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 > As the quirk is for SDIO cards, we don't need to call mmc_fixup_device(card, sdio_card_init_methods) - other than from mmc_sdio_init_card(). Additionally, for sd/mmc we should not be using 'sdio_card_init_methods'. That said, it looks also reasonable to me, to squash $subject patch with patch3. Kind regards Uffe