Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2011, Missing Link Electronics |
| 3 | * Joachim Foerster <joachim@missinglinkelectronics.com> |
| 4 | * |
| 5 | * Taken from arch/powerpc/cpu/ppc4xx/fdt.c: |
| 6 | * |
| 7 | * (C) Copyright 2007-2008 |
| 8 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
| 9 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 10 | * SPDX-License-Identifier: GPL-2.0+ |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <common.h> |
| 14 | |
Robert P. J. Day | 3c75700 | 2016-05-19 15:23:12 -0400 | [diff] [blame] | 15 | #ifdef CONFIG_OF_BOARD_SETUP |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 16 | #include <libfdt.h> |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 17 | #include <fdt_support.h> |
| 18 | |
| 19 | DECLARE_GLOBAL_DATA_PTR; |
| 20 | |
Simon Glass | 2aec3cc | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 21 | int __ft_board_setup(void *blob, bd_t *bd) |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 22 | { |
| 23 | ft_cpu_setup(blob, bd); |
Simon Glass | 2aec3cc | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 24 | |
| 25 | return 0; |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 26 | } |
Simon Glass | 2aec3cc | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 27 | int ft_board_setup(void *blob, bd_t *bd) |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 28 | __attribute__((weak, alias("__ft_board_setup"))); |
| 29 | |
| 30 | void ft_cpu_setup(void *blob, bd_t *bd) |
| 31 | { |
| 32 | /* |
| 33 | * Fixup all ethernet nodes |
| 34 | * Note: aliases in the dts are required for this |
| 35 | */ |
| 36 | fdt_fixup_ethernet(blob); |
Joachim Foerster | 089ba38 | 2011-10-26 14:25:00 +0200 | [diff] [blame] | 37 | } |
Robert P. J. Day | 3c75700 | 2016-05-19 15:23:12 -0400 | [diff] [blame] | 38 | #endif /* CONFIG_OF_BOARD_SETUP */ |