summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mvebu/serdes
diff options
context:
space:
mode:
authorMario Six <mario.six@gdsys.cc>2017-01-11 16:00:47 +0100
committerStefan Roese <sr@denx.de>2017-02-01 09:02:14 +0100
commit2ad43094417097744e8c7817b2d0bc878d7eb08e (patch)
tree1b8039b092abe0fdf81e3be306a7eac9079b6235 /arch/arm/mach-mvebu/serdes
parentc52d428dccbd793e991ce0bcc45c6ca8d33aabf7 (diff)
mvebu: Add board_pex_config()
Allow boards to do some initialization when PCIe comes up. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm/mach-mvebu/serdes')
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c8
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index 98c447ce94..9e5b647e25 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -13,6 +13,11 @@
#include "ctrl_pex.h"
#include "sys_env_lib.h"
+__weak void board_pex_config(void)
+{
+ /* nothing in this weak default implementation */
+}
+
int hws_pex_config(const struct serdes_map *serdes_map, u8 count)
{
u32 pex_idx, tmp, next_busno, first_busno, temp_pex_reg,
@@ -77,6 +82,9 @@ int hws_pex_config(const struct serdes_map *serdes_map, u8 count)
/* Support gen1/gen2 */
DEBUG_INIT_FULL_S("Support gen1/gen2\n");
+
+ board_pex_config();
+
next_busno = 0;
mdelay(150);
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
index 5f7e2c7aa2..ca8a4d206a 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
@@ -83,4 +83,6 @@ int pex_local_bus_num_set(u32 pex_if, u32 bus_num);
int pex_local_dev_num_set(u32 pex_if, u32 dev_num);
u32 pex_config_read(u32 pex_if, u32 bus, u32 dev, u32 func, u32 reg_off);
+void board_pex_config(void);
+
#endif