[U-Boot-Users] [PATCH] PPC: Some PCI generalization in the global_data structure.

Matvejchikov Ilya matvejchikov at gmail.com
Sun Jul 13 18:26:18 CEST 2008


> This makes no sense to me.
>
> Please keep in mind that the global_data stuff is intended for, and
> only for, holding global information while we are still running from
> flash (i. e. before relocation) so that we have neiter a writabel data
> segment nor a valid bss segment.
>
> PCI initialization always happens *after* relocation to RAM, therefore
> no PCI related variables are ever needed in the global_data structure.
>

Yes, I know it. But I only meant pci_clk for some cpus and other PCI
related things (pciexp1_clk, pciexp2_clk for MPC837x etc)...
At this moment we have in the global_data such things as:

struct global_data {
...
#ifdef some_cpu1
u32 pci_clk;
...
#enif
...
#ifdef some_cpu2
unsigned long pci_clk;
...
#endif

#ifdef some_cpu3
u32 pci_clk;
...
#endif
}

Does it is right approach? What do I do to use pci_clk for the mpc8272?
May be it is more correctly to use the next form of declaration:

struct global_data {
#ifdef CONFIG_PCI
u32 pci_clk;
#ifdef some_cpu1
/* cpu1 specific pci variables */
#endif
#endif

Thanks.




More information about the U-Boot mailing list