module.c revision 275763
1275221Sbapt/*-
2275221Sbapt * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3275221Sbapt * All rights reserved.
4275221Sbapt *
5275221Sbapt * Redistribution and use in source and binary forms, with or without
6275221Sbapt * modification, are permitted provided that the following conditions
7275221Sbapt * are met:
8275221Sbapt * 1. Redistributions of source code must retain the above copyright
9275221Sbapt *    notice, this list of conditions and the following disclaimer.
10275221Sbapt * 2. Redistributions in binary form must reproduce the above copyright
11275221Sbapt *    notice, this list of conditions and the following disclaimer in the
12275221Sbapt *    documentation and/or other materials provided with the distribution.
13275221Sbapt *
14275221Sbapt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15275221Sbapt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16275221Sbapt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17275221Sbapt * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18275221Sbapt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19290071Sbapt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20275221Sbapt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21275221Sbapt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22275221Sbapt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23275221Sbapt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24275221Sbapt * SUCH DAMAGE.
25275221Sbapt */
26275221Sbapt
27275221Sbapt#include <sys/cdefs.h>
28290071Sbapt__FBSDID("$FreeBSD: stable/10/sys/boot/uboot/lib/module.c 275763 2014-12-14 15:33:45Z andrew $");
29275221Sbapt
30275221Sbapt/*
31275221Sbapt * U-Boot-specific module functionality.
32275221Sbapt */
33275221Sbapt
34275221Sbapt#include <stand.h>
35275221Sbapt#include <string.h>
36275221Sbapt
37275221Sbapt#if defined(LOADER_FDT_SUPPORT)
38275221Sbapt#include <fdt_platform.h>
39275221Sbapt#endif
40275221Sbapt
41275221Sbapt#include "bootstrap.h"
42275221Sbapt#include "libuboot.h"
43275221Sbapt
44275221Sbaptint
45275221Sbaptuboot_autoload(void)
46275221Sbapt{
47275221Sbapt#if defined(LOADER_FDT_SUPPORT)
48275221Sbapt	int err;
49275221Sbapt
50275221Sbapt	if ((err = fdt_setup_fdtp()) != 0)
51275221Sbapt		return (err);
52275221Sbapt#endif
53275221Sbapt
54275221Sbapt	return(0);
55275221Sbapt}
56275221Sbapt