On 23.11.2016 16:12, Mario Six wrote:
Allow boards to do some initialization when PCIe comes up.


What is it that your boards needs to do when PCIe comes up? Could
you please give me an example here?

Signed-off-by: Dirk Eibach <dirk.eib...@gdsys.cc>
---
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c | 10 ++++++++++
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c 
b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index 98c447c..2b85e6e 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -13,6 +13,13 @@
 #include "ctrl_pex.h"
 #include "sys_env_lib.h"

+void __board_pex_config(void)
+{
+       /* nothing in this weak default implementation */
+}
+void board_pex_config(void)
+       __attribute__((weak, alias("__board_pex_config")));
+

Its easier to use this syntax instead:

__weak board_pex_config(void)
...

You don't need to add the __attribute this way.

Thanks,
Stefan
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to