From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Schubert Date: Wed, 18 Nov 2015 14:23:09 +0100 Subject: [U-Boot] [PATCH v0 1/5] pci: mvebu: Fix Armada 38x support In-Reply-To: References: <1446047056-16801-1-git-send-email-dirk.eibach@gdsys.cc> <1446047056-16801-2-git-send-email-dirk.eibach@gdsys.cc> Message-ID: <564C7BBD.7020308@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 18.11.2015 um 13:48 schrieb Dirk Eibach: > I assume the idea is to go to the next port if the current port is > disabled. But adding 3 to the index does not seem to be the right > thing to do, since Armada XP has ports with 4 lanes, but also with > ports with one lane. > I assume that iterating over all lanes would not be a problem, but by > mistake the pcie->lane == 0 was left in the condition. Yeah you are right. The additional condition was superfluous in the original version. > So this should perform better: > > /* Don't read at all from pci registers if port power is down */ > if (SELECT(soc_ctrl, pcie->port) == 0) { > if (pcie->lane == 0) > debug("%s: skipping port %d\n", __func__, pcie->port); > continue; > } I agree. Regards, Anton