From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Wed, 26 May 2010 14:34:20 -0500 Subject: [U-Boot] [PATCH] powerpc: add support for the Freescale P1022DS reference board In-Reply-To: <4BFD70DA.9040908@freescale.com> References: <1274392909-16422-1-git-send-email-timur@freescale.com> <20100520223324.50594CCF026@gemini.denx.de> <20100521070719.5B27BCCF026@gemini.denx.de> <4BFD6479.9040408@freescale.com> <4BFD65C0.7020106@freescale.com> <4BFD662C.9020503@freescale.com> <4BFD70DA.9040908@freescale.com> Message-ID: <4BFD77BC.4060207@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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