From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 13 Jul 2008 19:20:12 +0200 Subject: [U-Boot-Users] [PATCH] PPC: Some PCI generalization in the global_data structure. In-Reply-To: Your message of "Sun, 13 Jul 2008 16:06:44 +0400." <8496f91a0807130506q329cc35h7934d756fee6b027@mail.gmail.com> Message-ID: <20080713172012.74F45240EE@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 In message <8496f91a0807130506q329cc35h7934d756fee6b027@mail.gmail.com> you wrote: > The global_data structure has no well defined method of the PCI clocks > and other PCI related variables declaration. This patch adds initial > support for the generalized method based on CONFIG_PCI usage. At present > it only affects when CONFIG_MPC8272 or CONFIG_MPC8272_FAMILY defined. Hm... I should have checked the code first before replying. So we already have this in the current code. What a crap. Kim, Grant, John, can you please try and prepare patches (for the next release, then) to get rid of PCI related information from gd_t ? Hm... looking closer there is a lot of other stuff there which most probably does not belong there either: TSEC Clocks? PCIe Clocks? board_type? Please check and comment... > Signed-off-by: Matvejchikov Ilya > --- > include/asm-ppc/global_data.h | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h > index c5ac658..ac3e719 100644 > --- a/include/asm-ppc/global_data.h > +++ b/include/asm-ppc/global_data.h > @@ -42,6 +42,11 @@ typedef struct global_data { > unsigned long baudrate; > unsigned long cpu_clk; /* CPU clock in Hz! */ > unsigned long bus_clk; > +#ifdef CONFIG_PCI > +#if defined(CONFIG_MPC8272) || defined(CONFIG_MPC8272_FAMILY) > + u32 pci_clk; This looks kind of broken to me. I think you should add this in the "if defined(CONFIG_CPM2)" branch and just make it depend on "ifdef CONFIG_PCI". 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 Use C++ to confuse your enemies; use C to produce stable code.