Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3852255rdb; Thu, 14 Sep 2023 04:59:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+l+/fe639N8fgoQH0od7XAZVN46sNozOObxcsTPryxg5I+ff9GEwgANjK1cHVaVCQ0Ldn X-Received: by 2002:a05:6808:210e:b0:3a7:b0de:902b with SMTP id r14-20020a056808210e00b003a7b0de902bmr7060309oiw.38.1694692749530; Thu, 14 Sep 2023 04:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694692749; cv=none; d=google.com; s=arc-20160816; b=o5Afq5KLs+Pgy8ac6joDVTUTwtk2MDp20FsfooxP/0C7FCOq45rBzjKQ1sjQICWTYM ps9/SUq5uFekYSGBT2A7XeoyKBPEKQdyUQWwRJpYxGAj88DQ9OlpsWV0iG39Z7sgDiaJ b7zpPdR5VgKkafifNpOwfmGdOW/GwoeFJbZ0V4E6n64AJ09QcNMY1wdoSi0mb3xItp3o rtyrUwJi/FVwlXFGXgEZ0fVd7lGvdGaDg2I8G6R0FWF0xIHELk9wMbfxLtTvrvkgHOP5 Y4EBhxERni7UITyVVKxBEBjI6na4y9ssr1+CegSuun8YijDK/nufoyvxWRQE+A79gd3T sEqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XOUEoWCoocBtSGgV6FK5TFmlWuuWLandTZ80F2DQ2rk=; fh=k5Z8G6Yc1EjXvgqL/quzot4hdDJFbQY7UQS+i8+v1Sg=; b=kGaADs3euzXXZuUKPIDnZ1SxKoO64k9QHKwQb6jkB+mzwMuSgRS7Ts4OqUS3t2wg5J jn9z3lgLXOLI8d4DWqmWA/gW+T0zgZVUiX7QrSXXqVv7uTwRRAiAyrjlTxf5GYIHvSrI ZivpDuLZjy9ucT536Tv0rg/iaWAZhRfpxhqWfrQvkhvM1WcosH8zdrdnt2kqVMDbCvN7 26R5dXwL/AjNb9uoeAwg2eSNQ6Tc/h5YXShlaryuz/OhgsrDGX4vTLZKXTyeiEWq2BwM CT+noGnzFWvxapfRG4HxA4KwJqRGNaYw3TNuzVj2G//ihEQkEjK0Pat+CuTP0Lhjz/zo 40Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q++ZGo1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u39-20020a056a0009a700b0068e2f6feab4si1533252pfg.374.2023.09.14.04.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:59:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q++ZGo1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4EBA7819D1DB; Thu, 14 Sep 2023 04:52:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237253AbjINLwJ (ORCPT + 99 others); Thu, 14 Sep 2023 07:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237307AbjINLwH (ORCPT ); Thu, 14 Sep 2023 07:52:07 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A34171BE8 for ; Thu, 14 Sep 2023 04:52:03 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-d7f0048b042so877670276.2 for ; Thu, 14 Sep 2023 04:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694692323; x=1695297123; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XOUEoWCoocBtSGgV6FK5TFmlWuuWLandTZ80F2DQ2rk=; b=q++ZGo1B47W/LTNaEjZTX2l+ByO3OEB8Nbz+LgAh9yVwtMVRj4g1cnVKa5yLj4O4WK 2AIBpQxT1g88bfEAYY/WdBSl88K6uTd7RCFfa99vtllffVXyNCE3SMOAcczkMkPeZADT uIcSGwINQJOHsAWiLva3bDo/R5i6X1eNnlDG4B8d3ak73p/INWpKOTMBJ9qg9O+TCTel 1npKkSgFABY5+3B1frpuEMqxfv6wKU0nTggcZMtq4Y/3JTNUET9+cZ5dFWllQlDQjbUR mkD5VyOEDawj7HzcY8ZWpXFnfsRi3JcmLRBjUyKid4f1FCLT4NXUwlARATaFN6LeE2N7 3CrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694692323; x=1695297123; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XOUEoWCoocBtSGgV6FK5TFmlWuuWLandTZ80F2DQ2rk=; b=W1WvBmXcej+VtMv8fKiVibeSZbafkBTskFdC6MAh9OfJ9lsTEs90h2KQA+RQpYrnNk uv1iO2e1H31IlctO3iLTU/abcUB4z2dwvhJ7RHavFyuGahRmpUBf5Qn1xdWjPqV3rqUH ZlFs3QNTX7/opB2eKdePpKSblChyT3lOATrOxP7Z060ZH+naHBph1++Hq0XyStZSOPlq 2vFaNJUXkLsNJcHh3BI/m8qPf0bXGvk0Ct1oz1p6n1uH4sUwwBoHdr7TBtEQeJfyDU5o RKI2c1RQjLwR3l8AqOKyvLue0dc6SyKIxnupBhmaeXrObCFgP5T7zcFX6r8Cw7NupjRy ZBLA== X-Gm-Message-State: AOJu0YxNuuP3Mx3oyTskGEoIOFIMKEUbERQ2/gYc/hyrH7ANlFCM/Kgv iZYkYGPmnrDoIA4oAMwEd43GOpKHIVcLe9m3zLdLaA== X-Received: by 2002:a25:109:0:b0:d00:cc5b:8a9f with SMTP id 9-20020a250109000000b00d00cc5b8a9fmr4681660ybb.16.1694692322860; Thu, 14 Sep 2023 04:52:02 -0700 (PDT) MIME-Version: 1.0 References: <20230901120836.1057900-1-yann.gautier@foss.st.com> In-Reply-To: From: Linus Walleij Date: Thu, 14 Sep 2023 13:51:51 +0200 Message-ID: Subject: Re: [PATCH] mmc: mmci: stm32: add SDIO in-band interrupt mode To: Yann Gautier Cc: Ulf Hansson , Russell King , Maxime Coquelin , Alexandre Torgue , Christophe Kerello , Yang Yingliang , Rob Herring , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 14 Sep 2023 04:52:13 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Thu, Sep 14, 2023 at 11:08=E2=80=AFAM Yann Gautier wrote: > On 9/4/23 14:21, Ulf Hansson wrote: > > On Fri, 1 Sept 2023 at 16:10, Linus Walleij = wrote: > >> > >> Hi Yann/Christophe, > >> > >> thanks for your patch! > >> > >> On Fri, Sep 1, 2023 at 2:08=E2=80=AFPM Yann Gautier wrote: > >> > >>> From: Christophe Kerello > >>> > >>> Add the support of SDIO in-band interrupt mode for STM32 variant. > >>> It allows the SD I/O card to interrupt the host on SDMMC_D1 data line= . > >>> > >>> Signed-off-by: Christophe Kerello > >>> Signed-off-by: Yann Gautier > >> (...) > >>> +++ b/drivers/mmc/host/mmci.h > >>> @@ -332,6 +332,7 @@ enum mmci_busy_state { > >>> * @opendrain: bitmask identifying the OPENDRAIN bit inside MMCIPOW= ER register > >>> * @dma_lli: true if variant has dma link list feature. > >>> * @stm32_idmabsize_mask: stm32 sdmmc idma buffer size. > >>> + * @use_sdio_irq: allow SD I/O card to interrupt the host > >> > >> The documentation tag should be one line up (compare to the members...= ) > >> > >>> @@ -376,6 +377,7 @@ struct variant_data { > >>> u32 start_err; > >>> u32 opendrain; > >>> u8 dma_lli:1; > >>> + u8 use_sdio_irq:1; > >> > >> 1. bool use_sdio_irq; > >> > Hi, > > Should it really be changed to a bool? > Other boolean likes in the structure are u8:1. Yes, two wrongs does not make one right. Using u8:1 is a way of trying to outsmart the compiler which is generally a bad idea. > > That said, the out-of-band IRQs is what works best for the ux500 varian= ts. > > What I understand here is that in-band interrupts are not properly > working on ux500, and then the feature shouldn't be enabled for this > platform. > Am I correct? I think we can flag the feature as available and implement the handling but add a comment that this is unstable and that Ux500 users should prefer to use out-of-band IRQs. Yours, Linus Walleij