From patchwork Wed Apr 15 16:03:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 201979 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.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 A650DC2BB55 for ; Wed, 15 Apr 2020 16:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 850D421734 for ; Wed, 15 Apr 2020 16:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586966654; bh=p7e0pThC4DsKXXmaYA9VV5ZorubQAuCZ2UJ40gakewI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=yH1p07OQ+J1BH3VJN+QGV335YowTeKjPQI/noHVhHoqfUMY8cTAixCwZnf/+SGJTB ggtpkVmo5Loe3tLCWUl3f4LDQDlDUrL9x8xuKONHP0cJ9ENK7E7h5+C/S/FVNkmayp bkhSOBzsje8cCrW4gCeL3LeiEhY4G5BH4rIa8pno= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410168AbgDOQEI (ORCPT ); Wed, 15 Apr 2020 12:04:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:56888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410164AbgDOQEG (ORCPT ); Wed, 15 Apr 2020 12:04:06 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C27002173E; Wed, 15 Apr 2020 16:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586966645; bh=p7e0pThC4DsKXXmaYA9VV5ZorubQAuCZ2UJ40gakewI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N1KgN+4EjmVKgix5IBD5HuBai7EefSQYT5d8GTAOzdnnzEyvj/BCHZTzxDSTv9kme sDEmgZ2Arfex/TcUdHtGyOlrXYZNwvznynmNc75d4SfyIa99ZJDJbAxPZkwjN6vnvs amxhEUpAsg+jW83CGCh9vFZvREjPgTGyd7mnlK/U= Received: by pali.im (Postfix) id EA64758E; Wed, 15 Apr 2020 18:04:03 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Remi Pommarel , =?utf-8?q?Marek_Beh=C3=BAn?= , Tomasz Maciej Nowak , Xogium Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 8/8] PCI: aardvark: Add FIXME for code which access PCIE_CORE_CMD_STATUS_REG Date: Wed, 15 Apr 2020 18:03:48 +0200 Message-Id: <20200415160348.1146-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200415160054.951-1-pali@kernel.org> References: <20200415160054.951-1-pali@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Register PCIE_CORE_CMD_STATUS_REG is applicable only when aardvark controller is configured for Endpoint mode. Which is not the case of current kernel driver. Signed-off-by: Pali Rohár --- drivers/pci/controller/pci-aardvark.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 6a97a3838098..a1cebc734f2d 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -423,6 +423,12 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie) advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG); } while (1); + /* + * FIXME: Following code which access PCIE_CORE_CMD_STATUS_REG register + * is suspicious. This register is applicable only when the PCI + * controller is configured for Endpoint mode. And not when it + * is configured for Root Complex. + */ reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG); reg |= PCIE_CORE_CMD_MEM_ACCESS_EN | PCIE_CORE_CMD_IO_ACCESS_EN |