From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 8214BC4332F for ; Wed, 22 Sep 2021 21:08:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DF9E6112F for ; Wed, 22 Sep 2021 21:08:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237764AbhIVVK1 (ORCPT ); Wed, 22 Sep 2021 17:10:27 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:43399 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237759AbhIVVK0 (ORCPT ); Wed, 22 Sep 2021 17:10:26 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 603C0580595; Wed, 22 Sep 2021 17:08:55 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Wed, 22 Sep 2021 17:08:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm2; bh=mtdkC9smfEGkMzwp5suu4GvLvKNj WQU2LGQHltLYlT4=; b=S1hEFyFv9XbXLQhnLt70N1EPGX/H3bqcz7U/MTIXWzkw wjFnltIWbkCxSWXhkZ09pkN9PBdvJcXgXaaZDg43vKzH86JWQAFF0P16qRNxDusR DSOVexTv9E329Q/vNDDRarloQdeRlcCsgCvxbDGoHLAmzIAo6589gJodPaXg3cqL wSMdKh6hh65xGeeceNltm/HQZD/grayJnUa5Xn5ZEkFy2PDyG1+JWR/Rd1pQdkXa CDJI2hQvclzQdDj6qpE8xKRKDNH6/uiVm415vxyBkTGX3BpepJMpnbsYdsi0jH5h /gMQuiINTLrDZLwjGMHlSP1QAcsMFSlhqBGEE5X2qQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=mtdkC9 smfEGkMzwp5suu4GvLvKNjWQU2LGQHltLYlT4=; b=dO0DKpYX8ksx/l1tM1e/3h 4PgDCXCTAx5CzpddSXz5rI6mss6MPKKpXPi+sO2vsKrEnAs2xOBhQNwT7iruX1Uk dBdHR87saCwTCBcBatfzVdNgri9VUL5I1lciIMr5Uh+ORBhf7Zp//GDFT8IIjSib f6AYJlTh3uONfUcAZqiGM27PGdIcHSvnWUjHG5p2dBT2GoePAQbmC+bji4hNov9a PpQeHJ8a2cBKg1shDxYtQtgQkuYr7c32DSjKdAiW6dytBHaCsT6HmW8lW1m4Hpcl wuJacvTn/fKTt+NyCiilH0n22pH37glqtJMhYCPSLm0YMr9ItK5sYF6lgN7OM/+g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgudehjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfufhv vghnucfrvghtvghrfdcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrf grthhtvghrnhepgfeigeeiffeuhfettdejgfetjeetfeelfefgfefgvddvtdfghfffudeh vdefkeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0652651C0060; Wed, 22 Sep 2021 17:08:53 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1302-gc62ab821ef-fm-20210921.001-gc62ab821 Mime-Version: 1.0 Message-Id: <86507f22-d824-4f7c-ba94-d3105c5206c2@www.fastmail.com> In-Reply-To: <20210922205458.358517-5-maz@kernel.org> References: <20210922205458.358517-1-maz@kernel.org> <20210922205458.358517-5-maz@kernel.org> Date: Wed, 22 Sep 2021 23:08:33 +0200 From: "Sven Peter" To: "Marc Zyngier" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: "Bjorn Helgaas" , "Rob Herring" , "Lorenzo Pieralisi" , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , "Alyssa Rosenzweig" , "Stan Skowronek" , "Mark Kettenis" , "Hector Martin" , "Robin Murphy" , kernel-team@android.com Subject: Re: [PATCH v4 04/10] PCI: apple: Add initial hardware bring-up Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Sep 22, 2021, at 22:54, Marc Zyngier wrote: > From: Alyssa Rosenzweig > [...] > + > + /* Use the first reg entry to work out the port index */ > + port->idx = idx >> 11; > + port->pcie = pcie; > + port->np = np; > + > + port->base = devm_platform_ioremap_resource(platform, port->idx + 2); > + if (IS_ERR(port->base)) > + return -ENODEV; > + > + rmw_set(PORT_APPCLK_EN, port + PORT_APPCLK); I think this should be rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK); > + > + rmw_set(PORT_PERST_OFF, port->base + PORT_PERST); > + gpiod_set_value(reset, 1); > + > + ret = readl_relaxed_poll_timeout(port->base + PORT_STATUS, stat, > + stat & PORT_STATUS_READY, 100, 250000); > + if (ret < 0) { > + dev_err(pcie->dev, "port %pOF ready wait timeout\n", np); > + return ret; > + } > + > + /* Flush writes and enable the link */ > + dma_wmb(); I don't think this barrier is required. > + > + writel_relaxed(PORT_LTSSMCTL_START, port->base + PORT_LTSSMCTL); > + > + return 0; > +} > + [...] Looks good to me otherwise, Reviewed-by: Sven Peter Thanks, Sven