From patchwork Sun Jan 21 10:19:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 864022 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="lldbA699"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zPVtb6ZTmz9t3h for ; Sun, 21 Jan 2018 21:20:06 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5193BC21DA1; Sun, 21 Jan 2018 10:20:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id F011AC21DA1; Sun, 21 Jan 2018 10:19:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BDF18C21E2F; Sun, 21 Jan 2018 10:19:56 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id D41C4C21DA1 for ; Sun, 21 Jan 2018 10:19:55 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-08.nifty.com with ESMTP id w0LAJUZh005764; Sun, 21 Jan 2018 19:19:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0LAJUZh005764 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516529973; bh=Ahsj6RkjHEg1Bh80RUXe5EMpOOks8tY5fIzq18AHMp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lldbA699Sej1NNFU1vOx048FJg2Y/6thdSo6ItV9u4cHF4xj5vJVBPbYGzAWTrwSA 2HlZsUbEmgEJNsF/jmDi60iCzAWsuei4mhTZoBZ7OVsUk/5WrSr4VQZKjiMXJMZsWA Ek/vG9q+IqLBULC167xX6nSG82faRcTOTEa3D9p9UZ45quKK4QqHwZSMnZ/G7KIXbn TMPU6Rwvz2G4QWGfmdy0dFDPEcRvo1yXUJcFnEpM9UhC/0KP46u5GsBkiekXN3jNDL A9czRbR7d4GqBY6mmC5V/85Gdhf4A2mR+8OxQPzNZBWHF245D/ldDQs7Gfk3jqVfTv 4Vw+hZbUMR9PQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sun, 21 Jan 2018 19:19:16 +0900 Message-Id: <1516529958-16441-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516529958-16441-1-git-send-email-yamada.masahiro@socionext.com> References: <1516529958-16441-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH v3 4/6] libfdt: move working_fdt and FDT_RAMDISK_OVERHEAD to include/libfdt.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" libfdt_env.h exists to contain system-dependent defines: - typedef of fdt*_t - fdt*_to_cpu(), cpu_to_fdt* working_fdt and FDT_RAMDISK_OVERHEAD are unrelated to the environment, so they must get out of this header. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass --- Changes in v3: None include/libfdt.h | 13 +++++++++++++ include/libfdt_env.h | 5 ----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/libfdt.h b/include/libfdt.h index 7ba13e6..dbc56ec 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -1 +1,14 @@ +#ifndef UBOOT_LIBFDT_H +#define UBOOT_LIBFDT_H +/* + * SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause + */ + #include "../lib/libfdt/libfdt.h" + +extern struct fdt_header *working_fdt; /* Pointer to the working fdt */ + +/* adding a ramdisk needs 0x44 bytes in version 2008.10 */ +#define FDT_RAMDISK_OVERHEAD 0x80 + +#endif /* UBOOT_LIBFDT_H */ diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 273b5d3..ea26979 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -12,8 +12,6 @@ #include "compiler.h" #include "linux/types.h" -extern struct fdt_header *working_fdt; /* Pointer to the working fdt */ - typedef __be16 fdt16_t; typedef __be32 fdt32_t; typedef __be64 fdt64_t; @@ -23,7 +21,4 @@ typedef __be64 fdt64_t; #define fdt64_to_cpu(x) be64_to_cpu(x) #define cpu_to_fdt64(x) cpu_to_be64(x) -/* adding a ramdisk needs 0x44 bytes in version 2008.10 */ -#define FDT_RAMDISK_OVERHEAD 0x80 - #endif /* _LIBFDT_ENV_H */