blob: 4d88f169df7c12c797c4e39b40ac769d0b56e0eb [file] [log] [blame]
Joachim Foerster089ba382011-10-26 14:25:00 +02001/*
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 Denkd79de1d2013-07-08 09:37:19 +020010 * SPDX-License-Identifier: GPL-2.0+
Joachim Foerster089ba382011-10-26 14:25:00 +020011 */
12
13#include <common.h>
14
15#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
16#include <libfdt.h>
Joachim Foerster089ba382011-10-26 14:25:00 +020017#include <fdt_support.h>
18
19DECLARE_GLOBAL_DATA_PTR;
20
21void __ft_board_setup(void *blob, bd_t *bd)
22{
23 ft_cpu_setup(blob, bd);
24}
25void ft_board_setup(void *blob, bd_t *bd) \
26 __attribute__((weak, alias("__ft_board_setup")));
27
28void ft_cpu_setup(void *blob, bd_t *bd)
29{
30 /*
31 * Fixup all ethernet nodes
32 * Note: aliases in the dts are required for this
33 */
34 fdt_fixup_ethernet(blob);
35}
36#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */