From: Wolfgang Denk Date: Mon, 09 Sep 2013 07:55:03 +0200 Subject: [U-Boot] [PATCH] PCIe:Add a function to get the address of requested capability structure. In-Reply-To: <1378689694-26708-1-git-send-email-B45475@freescale.com> References: <1378689694-26708-1-git-send-email-B45475@freescale.com> Message-ID: <20130909055503.79AFF3804B0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Zhao Qiang, In message <1378689694-26708-1-git-send-email-B45475@freescale.com> you wrote: > Add a function to get the address of requested capability structure in PCIe > configuration space by capability ID. > The step of this function: > 1. Read Status register in PCIe configuration space to confirm that > Capabilities List is valid. > 2. Find the address of Capabilities Pointer Register. > 3. Find the address of requested capability from the first capability. Why would such an extension be needed? As is, you are just adding dead code. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I haven't lost my mind - it's backed up on tape somewhere."