From owner-svn-src-head@FreeBSD.ORG Sat Nov 1 10:50:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA586C6A; Sat, 1 Nov 2014 10:50:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B6AE7DD; Sat, 1 Nov 2014 10:50:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA1AoKDe051777; Sat, 1 Nov 2014 10:50:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA1AoJji051771; Sat, 1 Nov 2014 10:50:19 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201411011050.sA1AoJji051771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 1 Nov 2014 10:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273927 - in head/sys/boot: fdt uboot/common uboot/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2014 10:50:20 -0000 Author: andrew Date: Sat Nov 1 10:50:18 2014 New Revision: 273927 URL: https://svnweb.freebsd.org/changeset/base/273927 Log: 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 Added: head/sys/boot/fdt/fdt_platform.h (contents, props changed) Modified: head/sys/boot/fdt/fdt_loader_cmd.c head/sys/boot/uboot/common/metadata.c head/sys/boot/uboot/lib/Makefile head/sys/boot/uboot/lib/libuboot.h head/sys/boot/uboot/lib/module.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Sat Nov 1 10:40:29 2014 (r273926) +++ head/sys/boot/fdt/fdt_loader_cmd.c Sat Nov 1 10:50:18 2014 (r273927) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" +#include "fdt_platform.h" #include "glue.h" #ifdef DEBUG Added: head/sys/boot/fdt/fdt_platform.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/fdt_platform.h Sat Nov 1 10:50:18 2014 (r273927) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * 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 */ Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Sat Nov 1 10:40:29 2014 (r273926) +++ head/sys/boot/uboot/common/metadata.c Sat Nov 1 10:50:18 2014 (r273927) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include "glue.h" #if defined(LOADER_FDT_SUPPORT) -#include "libuboot.h" +#include #endif static int Modified: head/sys/boot/uboot/lib/Makefile ============================================================================== --- head/sys/boot/uboot/lib/Makefile Sat Nov 1 10:40:29 2014 (r273926) +++ head/sys/boot/uboot/lib/Makefile Sat Nov 1 10:50:18 2014 (r273927) @@ -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 Modified: head/sys/boot/uboot/lib/libuboot.h ============================================================================== --- head/sys/boot/uboot/lib/libuboot.h Sat Nov 1 10:40:29 2014 (r273926) +++ head/sys/boot/uboot/lib/libuboot.h Sat Nov 1 10:50:18 2014 (r273927) @@ -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 - Modified: head/sys/boot/uboot/lib/module.c ============================================================================== --- head/sys/boot/uboot/lib/module.c Sat Nov 1 10:40:29 2014 (r273926) +++ head/sys/boot/uboot/lib/module.c Sat Nov 1 10:50:18 2014 (r273927) @@ -34,6 +34,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(LOADER_FDT_SUPPORT) +#include +#endif + #include "bootstrap.h" #include "libuboot.h"