[U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board

Scott Wood
2010-05-26T18:17:36Z

On 05/26/2010 01:12 PM, Timur Tabi wrote:
> Wolfgang Denk wrote:
>>>>>> Hm... looks as if you were repeating the same code 3 times. Please make
>>>>>> this a function.
>>>>
>>>> The code isn't really the same. I would need to pass a lot of
>>>> parameters to this function: the hose, the devdisr mask, the slot
>>>> name, the slot number, the bus number, and so on.
>
>> Actually it is not that many arguments.
>
> It is. Here's the prototype I came up with;
>
> static int configure_pci(enum srds_prtcl pci,
> const char *name,
> const char *target,
> int endpoint,
> int first_free_busno,
> phys_addr_t mem_addr,
> enum law_size mem_size,
> phys_addr_t io_addr,
> enum law_size io_size,
> struct fsl_pci_info *pci_info,
> struct pci_controller *hose);
>
>
> Are you sure you would really rather see this as its own function?
>

Perhaps (most of) this information could be put in a data structure to
which you point?

-Scott