Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp662824rdb; Mon, 29 Jan 2024 14:16:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTj8fN4sJ8DZEPca+qev9vyZZRSUmF4wwmxT/zs/ZwoahHU+8HBBcD1YiMvTpE5RyR+uk9 X-Received: by 2002:ac8:7fcd:0:b0:42a:b347:be79 with SMTP id b13-20020ac87fcd000000b0042ab347be79mr621886qtk.9.1706566617773; Mon, 29 Jan 2024 14:16:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706566617; cv=pass; d=google.com; s=arc-20160816; b=YlKEbi+loWp4p13PEEyD73JnN4pN6EJJUatx7oZHzXeP9Rx6ndKUrimkC/lQPIjtLf 8oGXQ0G5oZRbpKF96/B8XzDSTzRPyjpG0+a5nuJLxV2MFTHcfB/PxPbdUDDfHXRDZRYW 4oD4p9qQ7WHAvIcjKWuW6yRiNY5wS+Bb1xsQ9+buBkgrCwCnzd9UwBT3xM4kSXuxuW6U VJGbgQPACjOToXpBGZGJcpbdq7J2BJSsFx8bK4LPgCURs/h2VpebDC9Vm+VVAcCDVnX3 QkCNbKr80AWpeFekI6OWkDFLSg+nfMqPKPY6NZ4UeJ0XB4M38F66MzDw/9z3IuQz4uSH sDoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=JvkOCG2UnLIDOLUImh/in5gzrMfHY4FXL81bxYZxJu0=; fh=yitKyQkVbb3/Q2UBVh9TzgETEinm4DaTRKDNXnhgric=; b=Qpy+H7nz1okfOeaET2bMZaCqvSrddKht0fWp2kGRTHxrPSQm6dy3d7PTt+q7DjyDYl DXL54BedQk/STkee+tp438PIrJ1z8BRBrCZYE0TySj15bRSZotjUUv2Dcoo/dod2Y1EA KezWzJMnlB30ct7R9oGth43i3HJOX/wCO213JFaQVCiR++Ik9zE+IBwYywpYR4vVc61L vIimkO2df99o5VH6l4Wo6i74GOuvU5qOf6IAW4wbmCLQDsIfm5jgGXYKHM3uOk0i2kjb 3WtttDgmdgU1/rEWn2mfV2quTNKoozWco/1x1mGLvEtx4kHtqDzMK8htUlZwW6dNe20L UBGg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MQZAohOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o6-20020ac85a46000000b0042a3d046c39si8784900qta.61.2024.01.29.14.16.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 14:16:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MQZAohOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43557-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43557-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 875121C245D1 for ; Mon, 29 Jan 2024 22:16:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F5C4159594; Mon, 29 Jan 2024 22:16:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MQZAohOc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BCEC15956E; Mon, 29 Jan 2024 22:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706566609; cv=none; b=Dp/o3WP4xVKLrVHQPyl1Q7xdnmfp7B3898QDaJ0Aaikb5mKHHi7MAWQ7VsnGLlZHIeA1TUlhLkhvQtYcBtKb/SFm/G3v10XsN/uMVoTMMGzRFuUTC4+IcE7MpZ0l1SIN7i/5Pg2BH5jwpiA8oKb5RZjT8vK87vrS6Ahs88AZrW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706566609; c=relaxed/simple; bh=fWlUMRgvqVY95h4dXufWc8ddniO0qcwX7UwmN7CzrKY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=qTrGaDsxABPRYBO77pCXAtCPHM9LiRnp8/RMBRZjGQcXkjyK0I6K6+gMyBPHyb3A/BKmpH7C4iNrIkZ6XTwIuU7LKmJrmkRs2brY+mU+RK8XerSUYzNfGDXdikbWlUNC0tEFUwDm/9VG6vfMgg0Bs5lTBJpLu6M1MAnThlOBjgs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MQZAohOc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A644C433F1; Mon, 29 Jan 2024 22:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706566608; bh=fWlUMRgvqVY95h4dXufWc8ddniO0qcwX7UwmN7CzrKY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=MQZAohOc8Dgk2cjX6jvaB2a8InqsFsEgUpwwpZU2S7fbZRA0vBXW6WQSwHknPL5pw Db8Yfblz+iPuvPB/SJoPzIfMgTJVjPMp80BU6HK9ZWiykjcov7UibFqd9OAb/hbzTo 02w2rI+/oZM/9FvV4tFg8DgNOGIo438LRESCHy+xdUfXgegDc4FK6gwqbOM1S1KUfk 93rCTIQMZz7MV4r01diHmg33R/SlkevQOAMb86W1RWwkaeO63dCQN5tCYK1C+q17z/ GuvYkKdEKIKG/PsskcufS7cJyHu5gt6cbRS3bxgctjjxpKbilNfvy8YnhfdMXizSJf Dz3Pdr5WXM7sA== Date: Mon, 29 Jan 2024 16:16:47 -0600 From: Bjorn Helgaas To: Thomas Richard Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , Tom Joseph , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com Subject: Re: [PATCH v2 13/15] PCI: cadence: add resume support to cdns_pcie_host_setup() Message-ID: <20240129221647.GA477676@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240126214336.GA453589@bhelgaas> On Fri, Jan 26, 2024 at 03:43:39PM -0600, Bjorn Helgaas wrote: > In subject, capitalize "Add ..." to follow historical convention. > Also the other driver/pci/ patches. > > On Fri, Jan 26, 2024 at 03:36:55PM +0100, Thomas Richard wrote: > > From: Théo Lebrun > > > > That function mixes probe structure init and hardware config. > > The whole hardware config part must be done at resume after a suspend to > > ram. > > We therefore pass it a boolean flag determining if we are at probe or at > > resume. > ... > This is pretty similar but slightly different from the DWC pattern: > > imx6_pcie_probe > ... do structure init ... > if (RC) > dw_pcie_host_init > pp->ops->init > imx6_pcie_host_init > > imx6_pcie_resume_noirq > imx6_pcie_host_init > > j721e_pcie_probe > j721e_pcie_ctrl_init > if (RC) > cdns_pcie_host_setup(true) > > j721e_pcie_resume_noirq > j721e_pcie_ctrl_init > if (RC) > cdns_pcie_host_setup(false) > > It'd be super nice to have them the same. Passing in a "probe" flag > works but seems a little harder to read in cdns_pcie_host_setup() and > you have to keep track of what it means in the callers. Maybe a better way to say this is that this patch uses the "probe" flag to select the behavior of cdns_pcie_host_setup(), and I think it would be nicer to split those two behaviors into separate functions. Bjorn