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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA0F8C433F5 for ; Mon, 8 Nov 2021 23:04:40 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D74D8619BB for ; Mon, 8 Nov 2021 23:04:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D74D8619BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15CA78386E; Tue, 9 Nov 2021 00:04:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="DuOPsw9A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4F919838B0; Tue, 9 Nov 2021 00:04:34 +0100 (CET) Received: from mail.nic.cz (lists.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9FA238386E for ; Tue, 9 Nov 2021 00:04:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id 12AE71405FD; Tue, 9 Nov 2021 00:04:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1636412670; bh=7p3QA6sDXV/UQRGK7AShnIb1qpzV6zKmT0KJ6b7zYkc=; h=Date:From:To; b=DuOPsw9A3Q0NkeV2kAxfSbCm6ETweoP1NTBbre2lzOSrePHEhntZVGY0d3FIV47bB 9JWjGN3ojOeSwKVmghByHfaAfV56pDT89D/Ce/BhMZRq6Sj0z/7+UDFw91GEVCKha1 sGp9mGwWmlqdFg/STTcibZWAnmnY/2YQLmDcf4+w= Date: Tue, 9 Nov 2021 00:04:29 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Tony Dinh Cc: Pali =?UTF-8?B?Um9ow6Fy?= , Stefan Roese , Tom Rini , U-Boot Mailing List Subject: Re: Testing pci_mvebu.c with Kirkwood SoCs Message-ID: <20211109000429.56a87ff6@thinkpad> In-Reply-To: References: <20211106000957.mua2giqjqheq2aiy@pali> <20211106105701.ar45c6tcwqqc4krv@pali> <20211107234553.nuvwjugc5t3t6nzy@pali> <20211108111114.kaikizqe3twvcpve@pali> <20211108220243.ad4yauzzb3vhhofy@pali> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Mon, 8 Nov 2021 14:48:03 -0800 Tony Dinh wrote: > > So to avoid calling 'pci enum' manually, you need to put pci_init(); > > function call into your board board_early_init_r() function. > > Thanks! will do that. Don't do that. Instead enable CONFIG_PCI_INIT_R and CONFIG_SYS_EARLY_PCI_INIT, and the code in common/board_r.c will do it itself. Look at: https://source.denx.de/u-boot/u-boot/-/blob/f8ed9059001d803b0eae4b49178789aa0e29edec/common/board_r.c#L675 Marek