From patchwork Mon Mar 11 09:31:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 10847231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B08211390 for ; Mon, 11 Mar 2019 10:31:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96E6C28F70 for ; Mon, 11 Mar 2019 10:31:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ADF228F69; Mon, 11 Mar 2019 10:31:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36C1A28F45 for ; Mon, 11 Mar 2019 10:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=woNw11O4avJpUCcn2Q8H5UZTPnZw8ZzaYXHIcwtn8Vg=; b=hIzNVmQwTAEjDA VxhSXBmHP2jbTsr6duMtgkwgvnLHdK11ReBr2O55T1mIJIlBgjSH7ZwE2O3A3nPl407GqyVax3f/w CGUFiBCIDNi/s739+9hlCOMjn6k1an+Pi0QVwXPKBTVX42aBv7c7py4pKjCiQgGRcdn9nuwNl/Da4 I2RbyFWvkYJBCYk9wh3qS51Ka4zDAV1XPcr/AoTxAg4vwdjPfXy7n2+75frwrq1RsKyAlOrjXmwow DTwifvuwvpPm3tCLPQiaVl1oN9gR4prOwJANz8qF6e2IvBZCnmtLGYOy9FvEK8oe36XN6wzFy5rTy inWLKzXFAkfYpReDnxxQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3IDH-0007qQ-CA; Mon, 11 Mar 2019 10:31:19 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3ICy-0007Mk-L9 for linux-arm-kernel@bombadil.infradead.org; Mon, 11 Mar 2019 10:31:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4BMcqpDgTrc8M2YPv+PL29hYMDyvskZ4hrkMnMjLAqE=; b=K6hHYn6bzfEwZn5hXFNZWGWZvR cUKdfvRbtIhjAgEZgkuwncZQ2gE17R10lu7u2dIRr9RL1WurDVlosRDFrD3PH9Hh5/I693AMULUtd cddRs94NmQopBLYjSmSctIwAxd1y+63k0L+ykJ6K3RtLUYvPFjjK56qOPVlqzdG9ukMxo4L5EdV86 +Sze5r/OSGB5BNc09X5tTRi4rv2NHi91SmLHGsrHEpLPXmPY+H9epIAwl4InROZp0CcgFla+Tbhdd fkRBRqb3yG1h7FFibopEgEOpCVHt7f+w5SnRNNWDWSUTCug2WqQzFMfpALMGWBd56tGVEQ9OAcDX8 z+IyzRkw==; Received: from mail-eopbgr70054.outbound.protection.outlook.com ([40.107.7.54] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HI1-0008Hu-JO for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 09:32:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4BMcqpDgTrc8M2YPv+PL29hYMDyvskZ4hrkMnMjLAqE=; b=YMsp2PGjsP1kO+lD7OpZcsjeBpGkLywXpme/k9S75A5KbaujfNNWynXdFI3g9yGkBEbQ4w3pY23FuU1Osi5L5J7sjSk8BVYv9VwC5X2X5c+KtQ3ktjlaJ02CU5UR6ObT7XV+UG4bZVrBIB9M7RAh1CHf+fJoPBHYK+AxJozwJuI= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6566.eurprd04.prod.outlook.com (20.179.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Mon, 11 Mar 2019 09:31:48 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:31:48 +0000 From: "Z.q. Hou" To: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" Subject: [PATCHv4 14/28] PCI: mobiveil: initialize Primary/Secondary/Subordinate bus number Thread-Topic: [PATCHv4 14/28] PCI: mobiveil: initialize Primary/Secondary/Subordinate bus number Thread-Index: AQHU1+1AtGOoAU+YtEiiEyC+O3ktCA== Date: Mon, 11 Mar 2019 09:31:48 +0000 Message-ID: <20190311093130.7209-15-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6414e1d7-6e2f-4080-8d60-08d6a6046260 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB6566; x-ms-traffictypediagnostic: AM6PR04MB6566: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; AM6PR04MB6566; 23:2nyWhzU/u3C9d3uUunmmxohN6ssX76Bta/GZzl4?= =?iso-8859-1?q?2LdEThMKC44fQ82?= =?iso-8859-1?q?xbBPEPM8wwaI/y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pJznV2D1Nv+W?= =?iso-8859-1?q?jF1YbjM635V4uPYIsn8RycyA89UCW2HY3KDu6E2WrmpU7dXUDeu80ZVOa5mK?= =?iso-8859-1?q?1+IR5QMLqVjMehed152zWVmbfOqiB2+PTFr/5lefWZIv4ZpK1DFftHexpOzm?= =?iso-8859-1?q?ye51BIHadrU2QytymtlB6hMVefAkvgVx5tCynP1IeRqz4PUaLCrPIuojoLZK?= =?iso-8859-1?q?LVgPnxpyiYJXk+DpOqScmf7XjdWQ+OvjWNNjW6oRpNWoKH2uTAnxogkt9cYu?= =?iso-8859-1?q?KUBPzjI/ld6vIEYk9J/Y9wz0H4uAJubOeWKnkil04Yh6PtFr8H/3VRB7dG5t?= =?iso-8859-1?q?v/5oCy1o6TYovYh95r6rY8WV0NIyioejH+Vbc7eT1h82XtwE24fAtQSUhPi4?= =?iso-8859-1?q?U2RXP3u+I=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(136003)(199004)(189003)(6436002)(478600001)(25786009)(99286004)(11346002)(2616005)(476003)(76176011)(3846002)(6116002)(81166006)(81156014)(486006)(71190400001)(71200400001)(2906002)(8676002)(2201001)(5660300002)(97736004)(6486002)(446003)(7416002)(4744005)(2501003)(86362001)(256004)(14454004)(316002)(68736007)(26005)(8936002)(6512007)(53936002)(1076003)(66066001)(386003)(54906003)(50226002)(110136005)(102836004)(6506007)(36756003)(105586002)(4326008)(106356001)(186003)(305945005)(52116002)(7736002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB6566; H:AM6PR04MB5781.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ZOG5AiK+viOkVXE2H2LgmFb1AB3q/Hdn5Y8vJL2fFc7O+UqiFJbUnxvqxdsx4+uE0FBK25pRnq2LmoNi0RoNpHnXScbwLP9DbdCDYuTnPcC40Z9wBdRK6TblG5nz9IXPSBX8dcsLMbkhzv9RkDeXyozcd2E0TLl68g+2jmyDbaB6PT7mkiomBE+rNEck7yl9/LhkGZ+NqRg9DPkXL8tQbKi8IgQBtIkY0xWWA8onvDW1MuTkiPzubu9h5j00ZWJHcUbD5bdfB3SQbM/tgH0IykjjNgxnkD37sUDiVNp19EpMg1u7qwuOU3YnUAKYt1XNo/GsFzy4LCAi0Q9GLOG7Tph55W2p4R4yxxel+E7e3632eeYeio3t/AciG9OfGHjkVPQSdM3u/VXK1X1trk3sqIyDoxW4qLmBDvKoXpBsfDg= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6414e1d7-6e2f-4080-8d60-08d6a6046260 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:31:48.4531 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6566 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_053209_672609_6B3AD91B X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "M.h. Lian" , "Z.q. Hou" , Xiaowei Bao , Mingkai Hu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hou Zhiqiang The reset value is all zero, so set a workable value for Primary, Secondary and Subordinate bus numbers. Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V4: - no change drivers/pci/controller/pcie-mobiveil.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index db7ecb021c63..9210165fe8c0 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -582,6 +582,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) u32 value, pab_ctrl, type; struct resource_entry *win; + /* setup bus numbers */ + value = csr_readl(pcie, PCI_PRIMARY_BUS); + value &= 0xff000000; + value |= 0x00ff0100; + csr_writel(pcie, value, PCI_PRIMARY_BUS); + /* * program Bus Master Enable Bit in Command Register in PAB Config * Space