mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot. While here sort and fix the signature of fdt_setup_fdtp. MFC after: 1 week
This commit is contained in:
parent
409c183904
commit
47264cb680
6 changed files with 42 additions and 7 deletions
|
|
@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <machine/elf.h>
|
||||
|
||||
#include "bootstrap.h"
|
||||
#include "fdt_platform.h"
|
||||
#include "glue.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
|||
35
sys/boot/fdt/fdt_platform.h
Normal file
35
sys/boot/fdt/fdt_platform.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*-
|
||||
* Copyright (c) 2014 Andrew Turner <andrew@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef FDT_PLATFORM_H
|
||||
#define FDT_PLATFORM_H
|
||||
|
||||
extern int fdt_copy(vm_offset_t);
|
||||
extern int fdt_setup_fdtp(void);
|
||||
|
||||
#endif /* FDT_PLATFORM_H */
|
||||
|
|
@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include "glue.h"
|
||||
|
||||
#if defined(LOADER_FDT_SUPPORT)
|
||||
#include "libuboot.h"
|
||||
#include <fdt_platform.h>
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ LOADER_FDT_SUPPORT= no
|
|||
.endif
|
||||
|
||||
.if ${LOADER_FDT_SUPPORT} == "yes"
|
||||
CFLAGS+= -DLOADER_FDT_SUPPORT
|
||||
CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt
|
||||
.endif
|
||||
|
||||
# Pick up FDT includes
|
||||
|
|
|
|||
|
|
@ -72,8 +72,3 @@ void reboot(void);
|
|||
|
||||
int uboot_diskgetunit(int type, int type_unit);
|
||||
|
||||
#if defined(LOADER_FDT_SUPPORT)
|
||||
extern int fdt_setup_fdtp();
|
||||
extern int fdt_copy(vm_offset_t);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ __FBSDID("$FreeBSD$");
|
|||
#include <stand.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(LOADER_FDT_SUPPORT)
|
||||
#include <fdt_platform.h>
|
||||
#endif
|
||||
|
||||
#include "bootstrap.h"
|
||||
#include "libuboot.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue