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: 125267 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp631343ljf; Sun, 21 Jan 2018 02:20:02 -0800 (PST) X-Google-Smtp-Source: AH8x2274V9rwwxhRGmmqfZaDoK/AIgiAkEq2a6sOo+/5Q6oMCe/0xJTJALnnpPFMXutWkp8Q7+ZQ X-Received: by 10.80.206.88 with SMTP id k24mr8031311edj.153.1516530001913; Sun, 21 Jan 2018 02:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516530001; cv=none; d=google.com; s=arc-20160816; b=TPzJehJ0AqV7z+Yux4Q0yODWSZPKZDuGCpQlKcuUU0a2UhRKIlcUBLkdhqxs6Wm0f2 SP5rgiCfDr5DWFJmiIrYPlGwJ2AncbpxxdYCiXqBV6p1P599WPOqvOu58mEdwfAx7MPU R/pVD3J41QgYR0GMsmg4jUV2zH5WVIQB7SdXcJvZ3ua2Ad5GU5kydCcSMdbhkJ9C+lpb uWugkIyiYPSX3eBP1X11D/rRSU411GEU+4VvOSXEvAnvjua7bA7elT50YqQ5Sge+/99Q NbFNRHPtcYUgNmHw60eyjUGirqvs4xmHXq88k1o2vgk9n0bUH/WtGDU1yMeBucwTOICg O5MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=IQo/3hqEkJTs/JG3wMAlJnorwhyqKOx+VtsnT94CcOc=; b=JfYzwxd+OKIxTCZL9D704PLXROlkHF+O/dsYvcl53QrIF61eZMy6N5rZ0vx7o+W6xo j1F9MCaggT6CqlFmchuM23Jrf+hyiGTZxQ4HUIIhUd5MNtvNoSHrmHdp93rhxzFX9qUi tiAK2lSzCwGYHeJ8t1YFvvoiIizYMQA9QVIFGBXcgzDvQhEsw/CgpCCgs5KC5xCt9sJD bXzVYYwL31r2mGq1ysKojBM/N5lWJS6pYorCtgSFjMWkhP0PdArcVLyXuLELMZQUF2kU nCYuuC/E76nMOrSz6N+Xkj5yAwJTSk736NwvBSWSuKDOSCqYpTk2vWgQp0RlBgmAm+E+ 5pow== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=lldbA699; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id w15si938241edj.94.2018.01.21.02.20.01; Sun, 21 Jan 2018 02:20:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=lldbA699; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 374E9C2202D; 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 */