summaryrefslogtreecommitdiff
path: root/drivers/pci/fsl_pci_init.c
diff options
context:
space:
mode:
authorMichael Brandt <Michael.Brandt@stericsson.com>2009-11-09 11:28:12 +0100
committerMichael Brandt <Michael.Brandt@stericsson.com>2009-11-09 11:28:12 +0100
commitc5fd9311b6c59a5fb4c6e7188c8bef96e3e2d86d (patch)
tree9a088934787ff75338f1e400587f7aa63d8edf66 /drivers/pci/fsl_pci_init.c
parentebabdb43046d5ac115b6b53c8e606e3035c32371 (diff)
parentb91b8f74fe9ded18344c3d03080a4abc07254502 (diff)
Merge branch 'master' of http://git.denx.de/u-boot
Diffstat (limited to 'drivers/pci/fsl_pci_init.c')
-rw-r--r--drivers/pci/fsl_pci_init.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 87944bfad..8fbab68a2 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007 Freescale Semiconductor, Inc.
+ * Copyright 2007-2009 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
@@ -413,13 +413,27 @@ void fsl_pci_init(struct pci_controller *hose, u32 cfg_addr, u32 cfg_data)
}
int fsl_pci_init_port(struct fsl_pci_info *pci_info,
- struct pci_controller *hose, int busno)
+ struct pci_controller *hose, int busno, int pcie_ep)
{
volatile ccsr_fsl_pci_t *pci;
struct pci_region *r;
pci = (ccsr_fsl_pci_t *) pci_info->regs;
+ if (pcie_ep) {
+ volatile pit_t *pi = &pci->pit[2];
+
+ pci_setup_indirect(hose, (u32)&pci->cfg_addr,
+ (u32)&pci->cfg_data);
+ out_be32(&pi->pitar, 0);
+ out_be32(&pi->piwbar, 0);
+ out_be32(&pi->piwar, PIWAR_EN | PIWAR_LOCAL |
+ PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP | PIWAR_IWS_4K);
+
+ fsl_pci_config_unlock(hose);
+ return 0;
+ }
+
/* on non-PCIe controllers we don't have pme_msg_det so this code
* should do nothing since the read will return 0
*/