aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pcie_fsl.h
diff options
context:
space:
mode:
authorHou Zhiqiang2019-08-27 10:13:54 +0000
committerPrabhakar Kushwaha2019-08-28 13:47:44 +0530
commitfbcb2ff5c6477c7d2ddc9f54967a5cfc21aefbed (patch)
tree00054438aaf0d4a32e0a59c3758b6df67266b27b /drivers/pci/pcie_fsl.h
parentd18d06ac35229345a0af80977a408cfbe1d1015b (diff)
dm: pcie_fsl: Fix the calculation of controller index
The PCIe controller register address in CCSR is different on various platforms, the current code erroneously use the hardcoded address (0xffe240000) and stride (0x10000) to calculate the controller's index. Fix it by adding the related info to the driver data structure. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Diffstat (limited to 'drivers/pci/pcie_fsl.h')
-rw-r--r--drivers/pci/pcie_fsl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/pcie_fsl.h b/drivers/pci/pcie_fsl.h
index 032775ca05d..dc8368d5592 100644
--- a/drivers/pci/pcie_fsl.h
+++ b/drivers/pci/pcie_fsl.h
@@ -43,6 +43,12 @@
#define LTSSM_L0_REV3 0x11
#define LTSSM_L0 0x16
+struct fsl_pcie_data {
+ u32 block_offset; /* Offset from CCSR of 1st controller */
+ u32 block_offset_mask; /* Mask out the CCSR base */
+ u32 stride; /* Offset stride between controllers */
+};
+
struct fsl_pcie {
int idx;
struct udevice *bus;
@@ -52,6 +58,7 @@ struct fsl_pcie {
bool mode; /* RC&EP mode flag */
bool enabled; /* Enable status */
struct list_head list;
+ struct fsl_pcie_data *info;
};
extern struct list_head fsl_pcie_list;