mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
fsl_pci: Add support for FSL PCIe controllers v2.x
FSL PCIe controller v2.1: - New MSI inbound window - Same Inbound windows address as PCIe controller v1.x Added new pit_t member(pmit) to struct ccsr_pci for MSI inbound window FSL PCIe controller v2.2 and v2.3: - Different addresses for PCIe inbound window 3,2,1 - Exposed PCIe inbound window 0 - New PCIe interrupt status register Added new Interrupt Status register to struct ccsr_pci & updated pit_t array size to reflect the 4 inbound windows. To maintain backward compatiblilty, on V2.2 or greater controllers we start with inbound window 1 and leave inbound 0 with its default value (which maps to CCSRBAR). Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:

committed by
Kumar Gala

parent
24995d829a
commit
b6ccd2c9de
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007-2010 Freescale Semiconductor, Inc.
|
||||
* Copyright 2007-2011 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
@ -223,6 +223,7 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
|
||||
u32 cfg_data = (u32)&((ccsr_fsl_pci_t *)pci_info->regs)->cfg_data;
|
||||
u16 temp16;
|
||||
u32 temp32;
|
||||
u32 block_rev;
|
||||
int enabled, r, inbound = 0;
|
||||
u16 ltssm;
|
||||
u8 temp8, pcie_cap;
|
||||
@ -232,13 +233,20 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
|
||||
|
||||
/* Initialize ATMU registers based on hose regions and flags */
|
||||
volatile pot_t *po = &pci->pot[1]; /* skip 0 */
|
||||
volatile pit_t *pi = &pci->pit[2]; /* ranges from: 3 to 1 */
|
||||
volatile pit_t *pi;
|
||||
|
||||
u64 out_hi = 0, out_lo = -1ULL;
|
||||
u32 pcicsrbar, pcicsrbar_sz;
|
||||
|
||||
pci_setup_indirect(hose, cfg_addr, cfg_data);
|
||||
|
||||
block_rev = in_be32(&pci->block_rev1);
|
||||
if (PEX_IP_BLK_REV_2_2 <= block_rev) {
|
||||
pi = &pci->pit[2]; /* 0xDC0 */
|
||||
} else {
|
||||
pi = &pci->pit[3]; /* 0xDE0 */
|
||||
}
|
||||
|
||||
/* Handle setup of outbound windows first */
|
||||
for (r = 0; r < hose->region_count; r++) {
|
||||
unsigned long flags = hose->regions[r].flags;
|
||||
|
Reference in New Issue
Block a user