Scott Wood wrote:

> Which is relevant, given that you're whipping out a big scary-looking 
> prototype as a reason to avoid refactoring. :-)

So instead of this:

configure_pci(PCIE1, "PCIE1", "Slot 1", pcie_ep, num, LAW_TRGT_IF_PCIE_1,
CONFIG_SYS_PCIE1_MEM_PHYS, LAW_SIZE_512M, CONFIG_SYS_PCIE1_IO_PHYS,
LAW_SIZE_64K, &pci_info[num], &pcie1_hose);

You want this instead:

struct {
        enum srds_prtcl pci;
        const char *name;
        const char *target;
        int endpoint;
        int first_free_busno;
        enum law_trgt_if law;
        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;
} x;

x.pci = PCIE1;
x.name = "PCIE1";
x.target = "Slot 1";
x.endpoint =- pcie_ep;
x.first_free_busno = num;
x.law = LAW_TRGT_IF_PCIE_1;
x.mem_addr = CONFIG_SYS_PCIE1_MEM_PHYS;
x.mem_size = LAW_SIZE_512M;
x.io_addr = CONFIG_SYS_PCIE1_IO_PHYS;
x.io_size = LAW_SIZE_64K;
x.pci_info = &pci_info[num];
x.hose = &pcie1_hose;

configure_pci(&x);

I don't see how this is an improvement.

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to