diff options
author | Minghuan Lian <Minghuan.Lian@freescale.com> | 2013-10-17 07:15:17 (GMT) |
---|---|---|
committer | Jose Rivera <German.Rivera@freescale.com> | 2014-03-17 19:37:23 (GMT) |
commit | 28dc7598ca17f87ade7cb525be245153284af66d (patch) | |
tree | 2e9a27ff1f8a0cf332089f3a60cd6e338b96ec58 /arch | |
parent | be8ff354c6bad34c73512ed9f60fea6529b848d7 (diff) | |
download | linux-fsl-qoriq-28dc7598ca17f87ade7cb525be245153284af66d.tar.xz |
fsl_pci_ep: add VF ATMU access support
All VFs of a PF share the common inbound/outbound windows
except translation registers of outbound windows. A VF can
only change translation registers of outbound windows. A PF
can change all ATMU of VF.
The patch provides VF ATMU register definition and provides
interfaces to access inbound/outbound windows. It also adds
PCI_EP_REGION_MEM type to return PF's memory resource. The
application can get and reassign the memory resource to VF.
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Change-Id: Iec877a8054ac47b64d9d94abb9bc32dc0450211e
Reviewed-on: http://git.am.freescale.net:8181/9604
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tiefei Zang <tie-fei.zang@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h index 2707da9..878fb29 100644 --- a/arch/powerpc/sysdev/fsl_pci.h +++ b/arch/powerpc/sysdev/fsl_pci.h @@ -144,6 +144,24 @@ struct ccsr_pci { }; +#define VF_ATMU_OFFSET 0x1000 +#define VF_OW_NUM 4 +#define VF_IW_NUM 4 + +/* PCIE VF outbound window translation address regs */ +struct vf_owta_regs { + __be32 tar; + __be32 tear; +}; + +/* PCIE VF ATMU regs */ +struct vf_atmu_regs { + struct pci_outbound_window_regs vfow[VF_OW_NUM];/* 0x1000 - 0x107c */ + struct pci_inbound_window_regs vfiw[VF_IW_NUM]; /* 0x1080 - 0x10fc */ + u8 res_1100[1792]; /* 0x1100 - 0x17fc */ + struct vf_owta_regs vfowta[VF_OW_NUM][64]; /* 0x1800 - 0x1ffc */ +}; + extern int fsl_add_bridge(struct platform_device *pdev, int is_primary); extern void fsl_pcibios_fixup_bus(struct pci_bus *bus); extern int mpc83xx_add_bridge(struct device_node *dev); |