mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-01-10 20:28:59 +00:00
fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
Recycle the recently added PCI-e wrapper used to reduce board duplication of code by creating a similar version for plain PCI. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
02af821c11
commit
3d97b5e78f
1 changed files with 12 additions and 0 deletions
|
@ -173,6 +173,18 @@ struct fsl_pci_info {
|
||||||
int fsl_pci_init_port(struct fsl_pci_info *pci_info,
|
int fsl_pci_init_port(struct fsl_pci_info *pci_info,
|
||||||
struct pci_controller *hose, int busno);
|
struct pci_controller *hose, int busno);
|
||||||
|
|
||||||
|
#define SET_STD_PCI_INFO(x, num) \
|
||||||
|
{ \
|
||||||
|
x.regs = CONFIG_SYS_PCI##num##_ADDR; \
|
||||||
|
x.mem_bus = CONFIG_SYS_PCI##num##_MEM_BUS; \
|
||||||
|
x.mem_phys = CONFIG_SYS_PCI##num##_MEM_PHYS; \
|
||||||
|
x.mem_size = CONFIG_SYS_PCI##num##_MEM_SIZE; \
|
||||||
|
x.io_bus = CONFIG_SYS_PCI##num##_IO_BUS; \
|
||||||
|
x.io_phys = CONFIG_SYS_PCI##num##_IO_PHYS; \
|
||||||
|
x.io_size = CONFIG_SYS_PCI##num##_IO_SIZE; \
|
||||||
|
x.pci_num = num; \
|
||||||
|
}
|
||||||
|
|
||||||
#define SET_STD_PCIE_INFO(x, num) \
|
#define SET_STD_PCIE_INFO(x, num) \
|
||||||
{ \
|
{ \
|
||||||
x.regs = CONFIG_SYS_PCIE##num##_ADDR; \
|
x.regs = CONFIG_SYS_PCIE##num##_ADDR; \
|
||||||
|
|
Loading…
Reference in a new issue