mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
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>
This commit is contained in:
parent
c52d428dcc
commit
2ad4309441
2 changed files with 10 additions and 0 deletions
|
@ -13,6 +13,11 @@
|
||||||
#include "ctrl_pex.h"
|
#include "ctrl_pex.h"
|
||||||
#include "sys_env_lib.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)
|
int hws_pex_config(const struct serdes_map *serdes_map, u8 count)
|
||||||
{
|
{
|
||||||
u32 pex_idx, tmp, next_busno, first_busno, temp_pex_reg,
|
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 */
|
/* Support gen1/gen2 */
|
||||||
DEBUG_INIT_FULL_S("Support gen1/gen2\n");
|
DEBUG_INIT_FULL_S("Support gen1/gen2\n");
|
||||||
|
|
||||||
|
board_pex_config();
|
||||||
|
|
||||||
next_busno = 0;
|
next_busno = 0;
|
||||||
mdelay(150);
|
mdelay(150);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
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);
|
u32 pex_config_read(u32 pex_if, u32 bus, u32 dev, u32 func, u32 reg_off);
|
||||||
|
|
||||||
|
void board_pex_config(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue