From patchwork Sun Jul 28 14:03:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137980 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dah7Su68"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPk35XNfz9s8m for ; Mon, 29 Jul 2019 00:06:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 175B4C21DF8; Sun, 28 Jul 2019 14:06: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=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 AF5FAC21D4A; Sun, 28 Jul 2019 14:05:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DA60FC21C2C; Sun, 28 Jul 2019 14:05:54 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 13A12C21C2F for ; Sun, 28 Jul 2019 14:05:54 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id j5so110361141ioj.8 for ; Sun, 28 Jul 2019 07:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RwPWFN2DnJY0/Hoidz9q92LoE/iW4pX/f+xagaTxf7M=; b=dah7Su68DgKQKDfDaE8LZ2MssXZf1YpPtLvfpTUd+iYzfjHbhhzV98JFxHQuE1qqc5 t0KzdtdtGk+V4yiDcC59Y7t33nxBZqxa5KIR3OKnTrCVKVeHm9S/Y/dNWzGo+BpQTqY6 zBiiO6qwOysupRNGQqz4Mdk32uV/UMagp43AE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RwPWFN2DnJY0/Hoidz9q92LoE/iW4pX/f+xagaTxf7M=; b=KWycyAVtBNQuHn/DVY5T4RhZ8KenA7NJvcfUmmyoDM1gEzfpmoiaqmALKNasqwKtGJ 9fWGDxfkxnK8XYojAq/bGVWfL5pts+C6p6K5XFfUmbjaf1KMzm30TVU3+BlQfdT2Aj2t SedBujwrp7gOuIg8D3N8fDFHEzmfCczf7j9CwP16ogUtVlaHxu9HWuDYZbIvtCIFTQkI 1f+7f2hWOdOrzlvVUBQ4j6r2mwIiTdf3fDdmvSoKwlkNDrEcBwBWywSkB5cujW3gAaSD pOLurHRoWzyl2zsU2SFmEd7hbGRMhSPSBksquBZS+eAaURFWWoohnbyal2QUPJrKvMeL 9P8Q== X-Gm-Message-State: APjAAAWQUIJaZlO2ov90tW/rc+YmALeyz0pHZJ6XbPG1d5OI2r0dBeCu yDHCSCvi+zzhen8gRGV9KY4S7Xf7X3g= X-Google-Smtp-Source: APXvYqw1WcEDzzsq0X+zna216oI6jDBGb/0vRcFLikHXYYxhei/h8T1JHxvfL5v0/+ICNak0hKjX/A== X-Received: by 2002:a5e:d817:: with SMTP id l23mr26546765iok.282.1564322752778; Sun, 28 Jul 2019 07:05:52 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.05.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:05:52 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:18 -0600 Message-Id: <20190728140357.137295-2-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 01/39] common: Move gzip functions into a new gzip header 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" As part of the effort to remove things from common.h, create a new header for the gzip functions. Move the function declarations to it and add missing documentation. Signed-off-by: Simon Glass --- board/menlo/m53menlo/m53menlo.c | 1 + cmd/bmp.c | 8 +-- cmd/config.c | 1 + cmd/fpga.c | 1 + cmd/license.c | 1 + cmd/unzip.c | 1 + cmd/ximg.c | 1 + common/bootm.c | 1 + common/spl/spl_fit.c | 1 + common/spl/spl_ymodem.c | 1 + drivers/video/cfb_console.c | 1 + fs/ubifs/ubifs.c | 1 + include/common.h | 52 ---------------- include/gzip.h | 103 ++++++++++++++++++++++++++++++++ lib/fdtdec.c | 1 + lib/gunzip.c | 5 +- lib/gzip.c | 1 + test/compression.c | 1 + 18 files changed, 124 insertions(+), 58 deletions(-) create mode 100644 include/gzip.h diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index f2227f6992..a63af5fae0 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bmp.c b/cmd/bmp.c index 00f0256a30..d2a39f677f 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -9,16 +9,16 @@ */ #include -#include -#include -#include #include #include -#include +#include +#include +#include #include #include #include #include +#include static int bmp_info (ulong addr); diff --git a/cmd/config.c b/cmd/config.c index fcc9116a49..d2810d573b 100644 --- a/cmd/config.c +++ b/cmd/config.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "config_data_gz.h" diff --git a/cmd/fpga.c b/cmd/fpga.c index bc48abdd6d..aacf09f002 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -11,6 +11,7 @@ #include #include #include +#include #include static long do_fpga_get_device(char *arg) diff --git a/cmd/license.c b/cmd/license.c index 1c0794f095..c5b04c331b 100644 --- a/cmd/license.c +++ b/cmd/license.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "license_data_gz.h" diff --git a/cmd/unzip.c b/cmd/unzip.c index 6c0f97cb4b..8474d9becf 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -6,6 +6,7 @@ #include #include +#include static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/cmd/ximg.c b/cmd/ximg.c index 9e53cc4557..920a80edc8 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -13,6 +13,7 @@ */ #include #include +#include #include #include #include diff --git a/common/bootm.c b/common/bootm.c index bea516025f..2cd47f96c8 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 969f7775c1..2e2e09eafb 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c index fa539ecd7a..20f4260062 100644 --- a/common/spl/spl_ymodem.c +++ b/common/spl/spl_ymodem.c @@ -9,6 +9,7 @@ * Matt Porter */ #include +#include #include #include #include diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 636c3e8c18..ac02921d46 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -66,6 +66,7 @@ #include #include +#include #include #include #include diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index d5101d3c45..72e8a24d3b 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -12,6 +12,7 @@ */ #include +#include #include #include "ubifs.h" #include diff --git a/include/common.h b/include/common.h index 2c21dee850..d337f68bc4 100644 --- a/include/common.h +++ b/include/common.h @@ -428,51 +428,6 @@ void wait_ticks (unsigned long); ulong usec2ticks (unsigned long usec); ulong ticks2usec (unsigned long ticks); -/* lib/gunzip.c */ -int gzip_parse_header(const unsigned char *src, unsigned long len); -int gunzip(void *, int, unsigned char *, unsigned long *); -int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, - int stoponerr, int offset); - -/** - * gzwrite progress indicators: defined weak to allow board-specific - * overrides: - * - * gzwrite_progress_init called on startup - * gzwrite_progress called during decompress/write loop - * gzwrite_progress_finish called at end of loop to - * indicate success (retcode=0) or failure - */ -void gzwrite_progress_init(u64 expected_size); - -void gzwrite_progress(int iteration, - u64 bytes_written, - u64 total_bytes); - -void gzwrite_progress_finish(int retcode, - u64 totalwritten, - u64 totalsize, - u32 expected_crc, - u32 calculated_crc); - -/** - * decompress and write gzipped image from memory to block device - * - * @param src compressed image address - * @param len compressed image length in bytes - * @param dev block device descriptor - * @param szwritebuf bytes per write (pad to erase size) - * @param startoffs offset in bytes of first write - * @param szexpected expected uncompressed length - * may be zero to use gzip trailer - * for files under 4GiB - */ -int gzwrite(unsigned char *src, int len, - struct blk_desc *dev, - unsigned long szwritebuf, - u64 startoffs, - u64 szexpected); - /* lib/lz4_wrapper.c */ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); @@ -506,13 +461,6 @@ unsigned int rand_r(unsigned int *seedp); int serial_printf (const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); -/* lib/gzip.c */ -int gzip(void *dst, unsigned long *lenp, - unsigned char *src, unsigned long srclen); -int zzip(void *dst, unsigned long *lenp, unsigned char *src, - unsigned long srclen, int stoponerr, - int (*func)(unsigned long, unsigned long)); - /* lib/net_utils.c */ #include static inline struct in_addr env_get_ip(char *var) diff --git a/include/gzip.h b/include/gzip.h new file mode 100644 index 0000000000..2e340673c3 --- /dev/null +++ b/include/gzip.h @@ -0,0 +1,103 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __GZIP_H +#define __GZIP_H + +/** + * gzip_parse_header() - Parse a header from a gzip file + * + * This returns the length of the header. + * + * @src: Pointer to gzip file + * @len: Length of data + * @return length of header in bytes, or -1 if not enough data + */ +int gzip_parse_header(const unsigned char *src, unsigned long len); + +/** + * gunzip() - Decompress gzipped data + * + * @dst: Destination for uncompressed data + * @dstlen: Size of destination buffer + * @src: Source data to decompress + * @lenp: Returns length of uncompressed data + * @return 0 if OK, -1 on error + */ +int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp); + +/** + * zunzip() - Uncompress blocks compressed with zlib without headers + * + * @dst: Destination for uncompressed data + * @dstlen: Size of destination buffer + * @src: Source data to decompress + * @lenp: On entry, length data at @src. On exit, number of bytes used from @src + * @stoponerr: 0 to continue when a decode error is found, 1 to stop + * @offset: start offset within the src buffer + * @return 0 if OK, -1 on error + */ +int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, + int stoponerr, int offset); + +/** + * gzwrite progress indicators: defined weak to allow board-specific + * overrides: + * + * gzwrite_progress_init called on startup + * gzwrite_progress called during decompress/write loop + * gzwrite_progress_finish called at end of loop to + * indicate success (retcode=0) or failure + */ +void gzwrite_progress_init(u64 expected_size); + +void gzwrite_progress(int iteration, u64 bytes_written, u64 total_bytes); + +void gzwrite_progress_finish(int retcode, u64 totalwritten, u64 totalsize, + u32 expected_crc, u32 calculated_crc); + +/** + * gzwrite() - decompress and write gzipped image from memory to block device + * + * @src: compressed image address + * @len: compressed image length in bytes + * @dev: block device descriptor + * @szwritebuf: bytes per write (pad to erase size) + * @startoffs: offset in bytes of first write + * @szexpected: expected uncompressed length, may be zero to use gzip trailer + * for files under 4GiB + * @return 0 if OK, -1 on error + */ +int gzwrite(unsigned char *src, int len, struct blk_desc *dev, ulong szwritebuf, + u64 startoffs, u64 szexpected); + +/** + * gzip()- Compress data into a buffer using the gzip algorithm + * + * @dst: Destination buffer for compressed data + * @lenp: On entry, space available in destination buffer (in bytes). On exit, + * number of bytes used in the buffer + * @src: Source data to compress + * @srclen: Size of source data + * @return 0 if OK, -1 on error + */ +int gzip(void *dst, unsigned long *lenp, unsigned char *src, ulong srclen); + +/** + * zzip() - Compress blocks with zlib + * + * @dst: Destination for compressed data + * @lenp: On entry, length data at @dst. On exit, number of bytes written to + * @dst + * @src: Source data to compress + * @srclen: Size of source data + * @stoponerr: 0 to continue when a decode error is found, 1 to stop + * @func: Some sort of function that is called to do something. !ADD DOCS HERE! + */ +int zzip(void *dst, ulong *lenp, unsigned char *src, ulong srclen, + int stoponerr, int (*func)(ulong, ulong)); + +#endif diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 3ee786b579..464de5b3b5 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/gunzip.c b/lib/gunzip.c index 15c7b2c932..1d65616c13 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -5,14 +5,15 @@ */ #include -#include #include #include +#include +#include #include #include #include +#include #include -#include #define HEADER0 '\x1f' #define HEADER1 '\x8b' diff --git a/lib/gzip.c b/lib/gzip.c index 674d732fe6..c6c0ec880c 100644 --- a/lib/gzip.c +++ b/lib/gzip.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/test/compression.c b/test/compression.c index 7bc0f73e09..8d69ead5fa 100644 --- a/test/compression.c +++ b/test/compression.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include From patchwork Sun Jul 28 14:03:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137981 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PTO/qZET"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPkc5hlgz9s8m for ; Mon, 29 Jul 2019 00:06:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3D9F7C21DFD; Sun, 28 Jul 2019 14:06:24 +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_MSPIKE_H2, 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 4DCF5C21DB5; Sun, 28 Jul 2019 14:05:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A5FF3C21C2C; Sun, 28 Jul 2019 14:05:56 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 19C01C21C2C for ; Sun, 28 Jul 2019 14:05:56 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id h6so27946719iom.7 for ; Sun, 28 Jul 2019 07:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SDXTyrJJgRlla7lP1Nn61ReBhDPXprP5D2Km9nhjq8E=; b=PTO/qZETZUzo/pHFEtODc7xCUhWyOO86yqFIILNgZNVG15iiQFu5/8waUHbzs9qsAH vUTIgb1oqlZxZYRuS9oYRiE/yltqr+j3bzZU337TsdIV6ssPTHkYdSDDdf/tHWtN/g/D A0LR5MN/F6pr1mz8qYgxtZqTyXkbX2/H1ALC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SDXTyrJJgRlla7lP1Nn61ReBhDPXprP5D2Km9nhjq8E=; b=l8TtZGnghxyzwaANUuZ38aHgpp0Lp+BSdia2I5mLsab9wftJu/m988yweUYyNixhHV 2f4jc/CiGh1EABD/fPH13CDipvocGoEfiq7FH6fYowCg4aAZnplWc4yQy8yK74n6RseI xbZWHM9yf4Ui6o9ygSH7z6BRqqp/oih2zw6jW1xX9BPR1Oks0LOIrvKX9VN1alkyHCMj U6G9uyKjBwVHzsp5tJEZ+79MdIHbmaS2xA/ssrS1gIWh2UXUmfKY5NIeOKbwSLOt+t+B +Fe2l15dhAOZK5tF5o8rxxgFEqPU2dEH961bChGZo5VvMWElY7mVChIBXUnVI2pjejjB 85ng== X-Gm-Message-State: APjAAAWvpK9wk2CPLZYQPQazG+3CV19ImhsG1JceL796NUu6SXJvAgPN 9q3SqBh+DQ5DadLGYT4jeG0xGBPCT94= X-Google-Smtp-Source: APXvYqw/GYYV1uHs1eM2LJTCYMdTmreRqqkBGZRCH9+WsdcsdEqrqBrtN1ezKctMZG5Km7O3GbkSuQ== X-Received: by 2002:a02:c550:: with SMTP id g16mr106195196jaj.49.1564322754935; Sun, 28 Jul 2019 07:05:54 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.05.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:05:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:19 -0600 Message-Id: <20190728140357.137295-3-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 02/39] common: Drop the dpram_... functions 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" These declarations are not used anymore, so drop them. Signed-off-by: Simon Glass --- include/common.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/common.h b/include/common.h index d337f68bc4..df589163e5 100644 --- a/include/common.h +++ b/include/common.h @@ -379,11 +379,6 @@ void enable_interrupts (void); int disable_interrupts (void); /* $(CPU)/.../commproc.c */ -int dpram_init (void); -uint dpram_base(void); -uint dpram_base_align(uint align); -uint dpram_alloc(uint size); -uint dpram_alloc_align(uint size,uint align); void bootcount_store (ulong); ulong bootcount_load (void); From patchwork Sun Jul 28 14:03:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137984 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DmXDqB8m"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPn46Vh6z9s8m for ; Mon, 29 Jul 2019 00:08:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A2E4FC21D83; Sun, 28 Jul 2019 14:06:35 +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_MSPIKE_H2, 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 C4EE7C21DED; Sun, 28 Jul 2019 14:06:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45F76C21DAF; Sun, 28 Jul 2019 14:06:04 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id DDE88C21D9A for ; Sun, 28 Jul 2019 14:05:57 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id o9so10892182iom.3 for ; Sun, 28 Jul 2019 07:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tUiaemlYg3Wqh9yvvQgtKOkHtIQkHkWv6K58xt94ItE=; b=DmXDqB8mXf80kIq95BVX1Tamn3sAwKLAgsIZJrYmjRYRACTIySuMlTZwESk5676M2S QtdK8zoJX16TcwJUAgHV2JIUygdV8CnAFTP42+G74/Mkpy7G8QDqFPdbDUVFe5DlBg0K vrZfXQZ+1GBRVII81KMsF20hGOUWqLB8s5wHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tUiaemlYg3Wqh9yvvQgtKOkHtIQkHkWv6K58xt94ItE=; b=kFsx5Bgn+v4g2AXJ2JPGAuuGJqkTtkG831bmuzyHeBdJBeOgZ5W21BkfH7u7IjGuSz 39hYk4IY5w1Y/NllgI97C0Prp77mgae3WxWKj/LP4WQs5z0E/EPvKfv4lzIYHoedcv3x TT62q24N/fTHBg3apvbjQPysMrBKIakn/5xTvUzRbLeMmPKf4TPwh4M0cmjyMbH63qcY tt3QjcFtjPgZAD0DYNAhlKK9NvuBdXT+FbOhCaUqZgj5vixBLaQgorpZ7Vu9WvHMXzJJ 5hoEVS7oDQHiUQwNANF/DtD/ilffwt6n4QEeibapH723PbM2/xD6Ds2qz6n6Wnw4wvcK Z31w== X-Gm-Message-State: APjAAAXecQDHIPmLGF/5l6fn8OtSy6X73Tas7JTdE7KOxTV9X/74cYMQ dpUNDePQW5JoIaaJUkkVtZWVa56w/u8= X-Google-Smtp-Source: APXvYqzE7HUP/ahZVlTF7yNFjulT5bYtPtkS0DgIkTmcB4BGIHiUd3i5BRbJWd+OiC3PwfH1UxCFHw== X-Received: by 2002:a6b:621a:: with SMTP id f26mr87428390iog.127.1564322756798; Sun, 28 Jul 2019 07:05:56 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.05.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:05:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:20 -0600 Message-Id: <20190728140357.137295-4-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 03/39] common: Move lcd_setmem() to lcd.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function relates to lcd.h and is about to become obsolete with the driver-model conversion. Move it out of common.h Signed-off-by: Simon Glass --- common/board_f.c | 1 + include/common.h | 3 --- include/lcd.h | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 4760d728f3..ed3cf6afbe 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index df589163e5..e96dc7ebc6 100644 --- a/include/common.h +++ b/include/common.h @@ -385,9 +385,6 @@ ulong bootcount_load (void); /* $(CPU)/.../ */ void mii_init (void); -/* $(CPU)/.../lcd.c */ -ulong lcd_setmem (ulong); - /* $(CPU)/.../video.c */ ulong video_setmem (ulong); diff --git a/include/lcd.h b/include/lcd.h index cb6b6a4d12..9a4c0da5ba 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -30,6 +30,7 @@ extern struct vidinfo panel_info; void lcd_ctrl_init(void *lcdbase); void lcd_enable(void); void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue); +ulong lcd_setmem(ulong addr); /** * Set whether we need to flush the dcache when changing the LCD image. This From patchwork Sun Jul 28 14:03:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137996 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="CrpVbStD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPxt6Bw4z9s4Y for ; Mon, 29 Jul 2019 00:16:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8043EC21E0D; Sun, 28 Jul 2019 14:06:58 +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=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 BC3F4C21DF3; Sun, 28 Jul 2019 14:06:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 79118C21E08; Sun, 28 Jul 2019 14:06:05 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 8620AC21DC1 for ; Sun, 28 Jul 2019 14:05:59 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id h6so27946913iom.7 for ; Sun, 28 Jul 2019 07:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qqz2ElAR0eq7DSTiqBt+R4zxsJW4vdqd4jRgoP7hLjc=; b=CrpVbStDHpZnBhxZnR5O3VOb0IVQ/CXYeDRqDi3zv6LIg7ThHGNPfn61Mv2mxMSWxv 3L7LlVmhx88FtPLIg8Ppo2o0G9YjYCwIjLhyHG3C+EKiNng4zPy2CxUSeJAfCBeQYD21 K11x38SKafcIBTinpKfvGpY1/6rsfudDhyzts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qqz2ElAR0eq7DSTiqBt+R4zxsJW4vdqd4jRgoP7hLjc=; b=Hv514tyvrG4qBG3bm5KcKP78qoC/FWO1e+idd+bvE+5lJ73eY1kouXqTGTqH+O8eiM PWrTDXsDVYuP8R9YfiD3kEPFYBX6PlpBXrAcXTS49harz/e4j5pET30ERc42pG6rwhaI kXRNNh4CQ2bbFAgoGkxhR+MzjpkfVd9GzpkRpGyrw+8M3+SriZLco6w7u/UUekBaNPjC otU9gy/RRu6I3DXge7HFxgRKCvjeg2xvuJYe4R63ETLgMQ3GnPZaiq6w3rdprqrApaR8 b+HG+BaXLa6fGX40bmEa2fm8f2nvlPBkKjDEGNcc7pG6drS3fEcI5y0uOeCVqNEqVk4m Z1iA== X-Gm-Message-State: APjAAAWRx1EsJB4mokQww/gVBnrojWyi0O1B5Na8AH0GM6Y2pxHecHjy +ROSLJC1FYBbAXxWc7WSQXw0qm25woY= X-Google-Smtp-Source: APXvYqw47u/wvMcDhok16ycZQWlgKlh0z/1FoQNrXcsfRX7dlYIalSyqw9g1Ke1y/SgDKA140APzxA== X-Received: by 2002:a02:ab83:: with SMTP id t3mr107345179jan.133.1564322758431; Sun, 28 Jul 2019 07:05:58 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.05.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:05:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:21 -0600 Message-Id: <20190728140357.137295-5-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 04/39] common: Remove video_setmem() 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function is no-longer defined in U-Boot. Drop the declaration from common.h Signed-off-by: Simon Glass --- common/board_f.c | 7 ------- include/common.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index ed3cf6afbe..7d656fae6a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -426,13 +426,6 @@ static int reserve_video(void) gd->relocaddr = lcd_setmem(gd->relocaddr); gd->fb_base = gd->relocaddr; # endif /* CONFIG_FB_ADDR */ -#elif defined(CONFIG_VIDEO) && \ - (!defined(CONFIG_PPC)) && \ - !defined(CONFIG_ARM) && !defined(CONFIG_X86) && \ - !defined(CONFIG_M68K) - /* reserve memory for video display (always full pages) */ - gd->relocaddr = video_setmem(gd->relocaddr); - gd->fb_base = gd->relocaddr; #endif return 0; diff --git a/include/common.h b/include/common.h index e96dc7ebc6..4d0dd3f1b7 100644 --- a/include/common.h +++ b/include/common.h @@ -385,9 +385,6 @@ ulong bootcount_load (void); /* $(CPU)/.../ */ void mii_init (void); -/* $(CPU)/.../video.c */ -ulong video_setmem (ulong); - /* arch/$(ARCH)/lib/cache.c */ void enable_caches(void); void flush_cache (unsigned long, unsigned long); From patchwork Sun Jul 28 14:03:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137983 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="nhO4quxO"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPmj51z4z9s8m for ; Mon, 29 Jul 2019 00:08:21 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 408DAC21DD9; Sun, 28 Jul 2019 14:06:46 +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_MSPIKE_H2, 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 48574C21D4A; Sun, 28 Jul 2019 14:06:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8C043C21D9A; Sun, 28 Jul 2019 14:06:06 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 63BFCC21DA6 for ; Sun, 28 Jul 2019 14:06:01 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id f4so114532289ioh.6 for ; Sun, 28 Jul 2019 07:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qJ//xF34V69bTIJm/oDUh1PATh0yIguR3o0N2BiH+vI=; b=nhO4quxO2bxvleHc4hQ3iOUUoqGE+vhLIyyY62BH6OwDGdY5GwjIXxLgG9KlvexvGD IbvhTizHSzeKLJuGbTw457hnNK5VXJEkkc7e4zDAxhcR/4mRLClY5CnJ98nPpe015ZSG uaWh8RrURUvh/1qWki8TzCrsCEvcyzi+9SB50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qJ//xF34V69bTIJm/oDUh1PATh0yIguR3o0N2BiH+vI=; b=O2NVklrQ+gKnnRaplDFCOXvcRoFVNrO+Rahy2ULqBGtkuwkXelzypaCEAOUK8/ZXfO +g47Df5lXrA6sx4P7wvx9u0awVYOcHx7PLGarM8cIlEJe9OHIj8+Ue9a9QeT8v8+LSip pXzErNEH9pGeqIx3BsyquFbY4D/OoQGEI7iDnGFYQVW+7m84Q36QPj3w4hZCGnfmG0Sm 2EWVseuxnAxprh+Jy5sRgO20ZoQsLkNad22LBYTlE7ypuz5yZRCGIhNWw9DIysMpPVRR Wm4/15yv5CK2H2y68j1UsjuxRpLF+sk9AafbGT/z9bYJA29/c0Yybd0eZGjg450TddMx NDyw== X-Gm-Message-State: APjAAAV4DKVdvuOD9qtsGSLxHXcH8/qFfAAHc3aSx83Sbxc7K/2SfIRM NEdp7Awe6cSz6cvVWGdFbkBISgV+2qI= X-Google-Smtp-Source: APXvYqxq1oaf4yMXCsnZboh3aOPS+orC1Ww+N/8OA3PERgThB9IcPIjANqSjVywFjgwbt7PFobyGnA== X-Received: by 2002:a05:6638:81:: with SMTP id v1mr57274125jao.72.1564322760297; Sun, 28 Jul 2019 07:06:00 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.05.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:05:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:22 -0600 Message-Id: <20190728140357.137295-6-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 05/39] env: Create a new file for environment functions 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" At present we have environment.h but this file includes all the environment-related header files as well as internals such as default_environment. It seems desirable to have a new header to hold the commonly used environment functions, so that most files can avoid including all of this unnecessary stuff. Create a new env.h header and move one function over to it. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- common/command.c | 1 + include/common.h | 4 ---- include/env.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 include/env.h diff --git a/common/command.c b/common/command.c index db25bf54e0..4b887a267f 100644 --- a/common/command.c +++ b/common/command.c @@ -11,6 +11,7 @@ #include #include #include +#include #include /* diff --git a/include/common.h b/include/common.h index 4d0dd3f1b7..6b890470c1 100644 --- a/include/common.h +++ b/include/common.h @@ -247,10 +247,6 @@ static inline int env_set_addr(const char *varname, const void *addr) return env_set_hex(varname, (ulong)addr); } -#ifdef CONFIG_AUTO_COMPLETE -int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, - bool dollar_comp); -#endif int get_env_id (void); void pci_init_board(void); diff --git a/include/env.h b/include/env.h new file mode 100644 index 0000000000..157ee9b724 --- /dev/null +++ b/include/env.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Common environment functions + * + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __ENV_H +#define __ENV_H + +#include + +/** + * env_complete() - return an auto-complete for environment variables + * + * @var: partial name to auto-complete + * @maxv: Maximum number of matches to return + * @cmdv: Returns a list of possible matches + * @maxsz: Size of buffer to use for matches + * @buf: Buffer to use for matches + * @dollar_comp: non-zero to wrap each match in ${...} + * @return number of matches found (in @cmdv) + */ +int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, + bool dollar_comp); + +#endif From patchwork Sun Jul 28 14:03:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137993 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BRwjNs+u"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPtM1JZpz9s4Y for ; Mon, 29 Jul 2019 00:13:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D471AC21E36; Sun, 28 Jul 2019 14:07:08 +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=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 8C9BDC21DFB; Sun, 28 Jul 2019 14:06:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5D448C21E12; Sun, 28 Jul 2019 14:06:08 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id F378AC21E07 for ; Sun, 28 Jul 2019 14:06:02 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id k8so114552964iot.1 for ; Sun, 28 Jul 2019 07:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kSpIGYvOebyLRrQie3/WI5pa74t64JguHRv5PIn4tBI=; b=BRwjNs+uzdXdcr4Cap1+4DxDG7mEoZ3czoG4uF1UpQ0n2nBGw1V9uTN6k+gc3LaxCV 19o9nQ/JpuHm5hR/fS7YlUN3SZ/9DjabUG2ijaWmT7oXYzlzlkcU70FeRm5+m32l5tzN 9ZRcqEdwfNFfwIAqIINK3bNccfOLuONWayHs0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kSpIGYvOebyLRrQie3/WI5pa74t64JguHRv5PIn4tBI=; b=tXHA66vHfAt/67FT/gF3tk70TaH5DK7W08gs/VRruJiWCucryUeBeOMXlLMxGHfufZ OT3SoPFdqbQUd3eRKm4U82mQIsxumhEhq1facZk2UCd8sMG0eRYuG377rfsRpLMA59Tc 0eU2bX30WahmfCoKHZuW76I1g+WtDq6MawbqFNk2av/zDAlOLkvBC5hIcYe/Z5lUMjQD 7atsagueUpz5D9FK28kyNesM4ie7dZEsUcVhrInHPrrGnCC1/voHscZqDva6gfXGOEK1 OLYD5VXou2qTHZwAf2Ja8qacct7ykrqUgFOfjcX9bvTxuxZ6SH9ITo65FWoarnhREMTJ LDHA== X-Gm-Message-State: APjAAAU7YhCNWdTC2HJRw6Ne3lGmUa4F/eGcjMjmZ30njBj5JuaTw5iO RWb/yPaJfoqSv5LhAfX5grLL7j6tbgE= X-Google-Smtp-Source: APXvYqxxRqCi22SH9btws2Ptn9b1OI+T6jj+F9NudfmbCSOr4WhuIuKP1Z/xL1mmZa1ugLkQnS16aw== X-Received: by 2002:a02:b90e:: with SMTP id v14mr69967345jan.122.1564322761831; Sun, 28 Jul 2019 07:06:01 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:01 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:23 -0600 Message-Id: <20190728140357.137295-7-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 06/39] env: Move get_env_id() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move this function over to the new header file. Also rename it to have an env_ prefix like the other functions. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- cmd/nvedit.c | 5 +++-- drivers/net/netconsole.c | 5 +++-- include/common.h | 2 -- include/env.h | 10 ++++++++++ net/eth_common.c | 3 ++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 46b1e60f0a..4f3edab8b9 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -69,14 +70,14 @@ NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE /* * This variable is incremented on each do_env_set(), so it can - * be used via get_env_id() as an indication, if the environment + * be used via env_get_id() as an indication, if the environment * has changed or not. So it is possible to reread an environment * variable only if the environment was changed ... done so for * example in NetInitLoop() */ static int env_id = 1; -int get_env_id(void) +int env_get_id(void) { return env_id; } diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index ce5a15ef57..73005ff94d 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -55,7 +56,7 @@ static int is_broadcast(struct in_addr ip) static struct in_addr netmask; static struct in_addr our_ip; static int env_changed_id; - int env_id = get_env_id(); + int env_id = env_get_id(); /* update only when the environment has changed */ if (env_changed_id != env_id) { @@ -75,7 +76,7 @@ static int refresh_settings_from_env(void) { const char *p; static int env_changed_id; - int env_id = get_env_id(); + int env_id = env_get_id(); /* update only when the environment has changed */ if (env_changed_id != env_id) { diff --git a/include/common.h b/include/common.h index 6b890470c1..997da857b2 100644 --- a/include/common.h +++ b/include/common.h @@ -247,8 +247,6 @@ static inline int env_set_addr(const char *varname, const void *addr) return env_set_hex(varname, (ulong)addr); } -int get_env_id (void); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index 157ee9b724..b82d80de17 100644 --- a/include/env.h +++ b/include/env.h @@ -11,6 +11,16 @@ #include +/** + * env_get_id() - Gets a sequence number for the environment + * + * This value increments every time the environment changes, so can be used an + * an indication of this + * + * @return environment ID + */ +int env_get_id(void); + /** * env_complete() - return an auto-complete for environment variables * diff --git a/net/eth_common.c b/net/eth_common.c index 63f9379eec..dcc59186d8 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -110,7 +111,7 @@ void eth_set_current(void) static int env_changed_id; int env_id; - env_id = get_env_id(); + env_id = env_get_id(); if ((act == NULL) || (env_changed_id != env_id)) { act = env_get("ethact"); env_changed_id = env_id; From patchwork Sun Jul 28 14:03:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137989 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mq8gOjFW"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPql3QRRz9s4Y for ; Mon, 29 Jul 2019 00:10:59 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 077E6C21D83; Sun, 28 Jul 2019 14:07:31 +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=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 A228CC21C2C; Sun, 28 Jul 2019 14:06:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9684EC21DA6; Sun, 28 Jul 2019 14:06:11 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id DC8F3C21DD4 for ; Sun, 28 Jul 2019 14:06:04 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id j6so39323898ioa.5 for ; Sun, 28 Jul 2019 07:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AhX4nuFhKC3jruQhWwGCFAX4pBQdiDkWlaiVlngc5hw=; b=mq8gOjFWyClGsS62RJjIinVV4AWBvDXPEmNSogQXvwLE+eN7EBBTk5ocMf5luyGlhv 41xWr6qBtT6o0DM/V0aUyQCwtzhu4mrPYMdvmc9RWiYIc95k8Cmf4w8BYT9y6PRvnxJT KVttGRdUpMaqYNtFRFZmOa7p3QYn32XlG7GK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AhX4nuFhKC3jruQhWwGCFAX4pBQdiDkWlaiVlngc5hw=; b=P8SdXDOb/XQKqkv9/XKrFt/bLjiuM7/pwjeAqnI8nXOM463dQwG3B1jt/m/jZOO8Ws ASYIVRc3FO1QEs7gQ7FBBv3OJNe568qxsWGZh9BsrkwYqZvl3cd5JMi0Zlv03YYl3qpC 7vllcjlCySWy/DNBv9XWw7eniOf+54sDt66jSJveUoflAFiAQo2Bw5Q1I+wWZMqpi9/l ZIXXVbDMrryehdjEJAncBmWZDkLjpOX2YCFrS0KqraV7xOaqwg1Pue8EiddGARbOgzw4 RWO4sq2+mxYngJljqH8wLoZVl/6gCUm+B8GEXfPdimzdUKlTJw/4FYTIiVuLZiH+aoLX bpjg== X-Gm-Message-State: APjAAAXWx/52VEzvBQcjc9W5ykJt/youetEYQRRhLZXQiJByqA8EHXsk M2O46l9TB/2eKLR3tbsdW7UuBn10Kio= X-Google-Smtp-Source: APXvYqy9L7mN95t93ChrenPai86g3joA+VIS4yOPKV0OGG5Mh+6zfCJi+Ivy5VwFp18vUbNHc43gdg== X-Received: by 2002:a02:a703:: with SMTP id k3mr39437196jam.12.1564322763601; Sun, 28 Jul 2019 07:06:03 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:24 -0600 Message-Id: <20190728140357.137295-8-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 07/39] env: Move env_get_f() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move this function over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/cpu_init.c | 1 + arch/powerpc/cpu/mpc85xx/fdt.c | 1 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 1 + board/esd/meesc/meesc.c | 1 + board/freescale/b4860qds/b4860qds.c | 1 + board/freescale/mpc837xerdb/mpc837xerdb.c | 1 + board/liebherr/mccmon6/mccmon6.c | 1 + board/micronas/vct/vct.c | 1 + board/socrates/socrates.c | 1 + board/st/stm32mp1/stm32mp1.c | 1 + board/xes/common/board.c | 1 + cmd/mtdparts.c | 1 + drivers/ddr/fsl/fsl_ddr_gen4.c | 1 + drivers/ddr/fsl/interactive.c | 1 + drivers/ddr/fsl/options.c | 1 + drivers/mtd/cfi_flash.c | 1 + drivers/mtd/mtd_uboot.c | 1 + drivers/net/fm/b4860.c | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ post/post.c | 1 + 22 files changed, 32 insertions(+), 12 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index edb9c96658..9577ada113 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index cbcd62e19a..cac9280790 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 20ecca605f..d17c382cc9 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index 2fab9aaff4..fcfa730233 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -4,6 +4,7 @@ */ #include +#include #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 #include #endif diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index 29b6341132..b0d2f7b6f8 100644 --- a/board/esd/meesc/meesc.c +++ b/board/esd/meesc/meesc.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 9eed95b656..33cd4b4964 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 18f396aac8..4ad62bcf1d 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c index 0e069a7755..7d2751ab03 100644 --- a/board/liebherr/mccmon6/mccmon6.c +++ b/board/liebherr/mccmon6/mccmon6.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/micronas/vct/vct.c b/board/micronas/vct/vct.c index af3f11e8ac..e73d16db3e 100644 --- a/board/micronas/vct/vct.c +++ b/board/micronas/vct/vct.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include "vct.h" diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index ff465a8ef2..da9ae5bebb 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index b99c6c08a3..1f9251d7a0 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/xes/common/board.c b/board/xes/common/board.c index 66467c6485..43575bc302 100644 --- a/board/xes/common/board.c +++ b/board/xes/common/board.c @@ -4,6 +4,7 @@ */ #include +#include #include "fsl_8xxx_misc.h" int checkboard(void) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index f7ed1a0779..46155cabf6 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -72,6 +72,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c index 30f7863b39..17a4a8282b 100644 --- a/drivers/ddr/fsl/fsl_ddr_gen4.c +++ b/drivers/ddr/fsl/fsl_ddr_gen4.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c index 4de0eae5f2..8e171e67fe 100644 --- a/drivers/ddr/fsl/interactive.c +++ b/drivers/ddr/fsl/interactive.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c index 4573ffa115..b9179315f2 100644 --- a/drivers/ddr/fsl/options.c +++ b/drivers/ddr/fsl/options.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 6b97e145e9..6c22f074b0 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c index 0a41ed477c..5574227598 100644 --- a/drivers/mtd/mtd_uboot.c +++ b/drivers/mtd/mtd_uboot.c @@ -4,6 +4,7 @@ * Heiko Schocher, DENX Software Engineering, hs@denx.de. */ #include +#include #include #include #include /* LEGACY */ diff --git a/drivers/net/fm/b4860.c b/drivers/net/fm/b4860.c index 1e20685803..5be0ad2ab3 100644 --- a/drivers/net/fm/b4860.c +++ b/drivers/net/fm/b4860.c @@ -4,6 +4,7 @@ * Roy Zang */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 997da857b2..2aabd267b9 100644 --- a/include/common.h +++ b/include/common.h @@ -162,18 +162,6 @@ int envmatch (uchar *, int); */ char *env_get(const char *varname); -/** - * env_get_f() - Look up the value of an environment variable (early) - * - * This function is called from env_get() if the environment has not been - * loaded yet (GD_FLG_ENV_READY flag is 0). Some environment locations will - * support reading the value (slowly) and some will not. - * - * @varname: Variable to look up - * @return value of variable, or NULL if not found - */ -int env_get_f(const char *name, char *buf, unsigned len); - /** * env_get_ulong() - Return an environment variable as an integer value * diff --git a/include/env.h b/include/env.h index b82d80de17..19b559abf1 100644 --- a/include/env.h +++ b/include/env.h @@ -21,6 +21,18 @@ */ int env_get_id(void); +/** + * env_get_f() - Look up the value of an environment variable (early) + * + * This function is called from env_get() if the environment has not been + * loaded yet (GD_FLG_ENV_READY flag is 0). Some environment locations will + * support reading the value (slowly) and some will not. + * + * @varname: Variable to look up + * @return value of variable, or NULL if not found + */ +int env_get_f(const char *name, char *buf, unsigned int len); + /** * env_complete() - return an auto-complete for environment variables * diff --git a/post/post.c b/post/post.c index ebb620590e..fb751d9a83 100644 --- a/post/post.c +++ b/post/post.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include From patchwork Sun Jul 28 14:03:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137994 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eniADdwS"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPvB3GRnz9s4Y for ; Mon, 29 Jul 2019 00:13:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0E0F7C21D74; Sun, 28 Jul 2019 14:07:50 +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=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 50E85C21E0B; Sun, 28 Jul 2019 14:06:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5BC5FC21D56; Sun, 28 Jul 2019 14:06:13 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 11666C21DA6 for ; Sun, 28 Jul 2019 14:06:07 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id k20so114453741ios.10 for ; Sun, 28 Jul 2019 07:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Sc50HVegqb7Rn5Q7nAeibmq8G27+kLkUVKMQhOyzsU=; b=eniADdwS2wQpuQ33cKJf3gCJYPWvEb1zC8iNGRRVl740FEvVvAfLl+WP5x4qcnCx3B yDWrwzzWXl3RUJmtNcyvbzgh5vq6lhAsyG9vUekyZgAzmugHj2MiHbTtE8tuQu2UBI4z FOayGGnR+rrCslZXnhpEuoSVT5X7aqVlvEzaQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6Sc50HVegqb7Rn5Q7nAeibmq8G27+kLkUVKMQhOyzsU=; b=nH3gVqOqtkqxHS65ZUM95NxNhoJZiJ+PQTR3d8H0uNDsLmNDKqRwImksyZSwF2BUUo 7oq8BSfEdugjgxDEGcyuKYwNj69QnHCLeU1isWOfpoWgu7YapUgeX7YSNrOm1rR0Zg6a hixXbsSMfc8jPVRjTsqQExU+56yxTU+g5GeNEp4VDv6dOxAA9ZCwjZZ6DAOHr8SWePDg UOAs777kOXLuLDJ9fRS0yboMPBJzU9Zmm4SehsW+mTok67wFthH7f5u2/ftCfydythGP z2I3MxY060qrhMHZEgIlpOFNlqWEDuEzxv3kTBa6ICfr/nLYQqLBIgwdx/knSVqPefaF 9rWQ== X-Gm-Message-State: APjAAAWslrTYn9ye2bdNUW9zrl3m4vOSg42KuZ8lvRx4uzO4gS5glTPv 2ddNn2lDJAkIpf9C8u6O7mGZKHFBIEk= X-Google-Smtp-Source: APXvYqyNrtOkcmdevBRd5aMrO0idybRD/lQ/53igFoJOKvp1/7H63TqKjp7LvmG+B9YMAvSZBcuYSg== X-Received: by 2002:a02:3f0a:: with SMTP id d10mr33893270jaa.23.1564322765426; Sun, 28 Jul 2019 07:06:05 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:25 -0600 Message-Id: <20190728140357.137295-9-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 08/39] env: Move env_init() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_init() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/cpu/armv8/fsl-layerscape/spl.c | 1 + arch/mips/lib/bootm.c | 1 + board/Arcturus/ucp1020/spl.c | 1 + board/birdland/bav335x/board.c | 1 + board/freescale/b4860qds/spl.c | 1 + board/freescale/p1010rdb/spl.c | 1 + board/freescale/p1022ds/spl.c | 1 + board/freescale/p1_p2_rdb_pc/spl.c | 1 + board/gateworks/gw_ventana/gw_ventana_spl.c | 1 + board/liebherr/display5/spl.c | 1 + board/tcl/sl50/board.c | 1 + board/ti/am335x/board.c | 1 + board/ti/am57xx/board.c | 1 + board/ti/dra7xx/evm.c | 1 + common/board_f.c | 1 + common/spl/spl_net.c | 1 + env/env.c | 1 + include/common.h | 1 - include/env.h | 10 ++++++++++ 19 files changed, 27 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 3e53084b21..8eeeef199b 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 6a462f3e5a..8c0d7672f2 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 451a9d78bb..f3b7d99878 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index b95186026f..b0339ad8f0 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c index 887fa04627..d9aa57f41c 100644 --- a/board/freescale/b4860qds/spl.c +++ b/board/freescale/b4860qds/spl.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index e07640a0ed..95f8b5837d 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index cfdd9fc9c9..92fd199876 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 48ab271fb2..9d7b5eff6f 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index eaf7aa9eca..740fc57b91 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 27f843ec45..d92760b487 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index 6bb6482dd0..8ddbee5436 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 2c32b92d94..58d09f7c20 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 1a903f13a6..0dacfd4327 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 179adc2fff..97eef65d51 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -10,6 +10,7 @@ * Steve Sakoman */ #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 7d656fae6a..18937bf6f5 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index c91ad2b6dd..803303249c 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -7,6 +7,7 @@ * Ilya Yanok */ #include +#include #include #include #include diff --git a/env/env.c b/env/env.c index d3cbe2f915..9d421e8125 100644 --- a/env/env.c +++ b/env/env.c @@ -5,6 +5,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/include/common.h b/include/common.h index 2aabd267b9..55cbe1f97d 100644 --- a/include/common.h +++ b/include/common.h @@ -146,7 +146,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); int do_ext2load(cmd_tbl_t *, int, int, char * const []); /* common/cmd_nvedit.c */ -int env_init (void); void env_relocate (void); int envmatch (uchar *, int); diff --git a/include/env.h b/include/env.h index 19b559abf1..5d205ef02d 100644 --- a/include/env.h +++ b/include/env.h @@ -21,6 +21,16 @@ */ int env_get_id(void); +/** + * env_init() - Set up the pre-relocation environment + * + * This locates the environment or uses the default if nothing is available. + * This must be called before env_get() will work. + * + * @return 0 if OK, -ENODEV if no environment drivers are enabled + */ +int env_init(void); + /** * env_get_f() - Look up the value of an environment variable (early) * From patchwork Sun Jul 28 14:03:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137997 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ab3PvwJt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPy93YQgz9s4Y for ; Mon, 29 Jul 2019 00:16:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2EAB6C21DAF; Sun, 28 Jul 2019 14:07:19 +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=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 2A423C21E0F; Sun, 28 Jul 2019 14:06:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7B278C21E0B; Sun, 28 Jul 2019 14:06:15 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 65697C21DFB for ; Sun, 28 Jul 2019 14:06:08 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id j5so110361864ioj.8 for ; Sun, 28 Jul 2019 07:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u8YMIsCMgxA5pS9rchh8mlBcfLIy87AKvbs89jbj+k4=; b=ab3PvwJttyLEZMTJZPFgIeciEHdVUaYov4Mk07rlxP4mUEaA4CrSHJzsEEkmlGlejT V8mBPu2G6aLJmCuti5NPk1SqHnJtZR1seZ0ex7Q5MP8Oz7DcmeVj4f/3n6hKjsCDajgU 1RlFwAsl5PF80TWlhsg9jhO0tuDske94eU02s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u8YMIsCMgxA5pS9rchh8mlBcfLIy87AKvbs89jbj+k4=; b=TV5Cq7F9ilcFgbAgeubWzJElyRhtBCoGmsJoZ4t/TJKJMCJ7D1kex5v3EX+buohmBY 5FenC7XohPPvET6HhAkZo/Axaaz/dfF1eP5d9eacl2PqwNyKnuhUaZrve4edadLOTrcO UCnt3BXVDlZxzz62MFVfcsdEbpchhzHDeO/7PbttuxGITZBHvzTWNta90+0Yb9+zAFrD YQ8rBt8pzZVTXB0NF6JvuUcKQQBfdeeCNR154Iwdw5IKCNoV2pX4eXLaGNBlkl8dnAQ/ 8GtsK8V1whiXU72m269CJhkXqsFeustblhgK8bgW/lADKiVql70jQnLcAgOwANM8AAYs e1yw== X-Gm-Message-State: APjAAAXtXxTBRCqnb9PMYXJcgDEURBltXjAJUEZUDZXI2piosAdmkdK4 FeNYk0KIkbi4dFhECWHMZHCOH/5nsKs= X-Google-Smtp-Source: APXvYqz+mLAK24gmSh/GHTjvuk0WtccSOHHgDYNujFDk8d6lXfXiIicp6ir0Ezvgel92zGIsftdIdQ== X-Received: by 2002:a5d:9bc6:: with SMTP id d6mr25559722ion.160.1564322767293; Sun, 28 Jul 2019 07:06:07 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:07 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:26 -0600 Message-Id: <20190728140357.137295-10-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 09/39] env: Move env_relocate() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_relocate() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- common/board_r.c | 1 + env/common.c | 1 + include/common.h | 1 - include/env.h | 8 ++++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/board_r.c b/common/board_r.c index abc31b17b8..b0ab56faf1 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/env/common.c b/env/common.c index bd340fe9d5..1fbc4a874d 100644 --- a/env/common.c +++ b/env/common.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 55cbe1f97d..cb6b584b70 100644 --- a/include/common.h +++ b/include/common.h @@ -146,7 +146,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); int do_ext2load(cmd_tbl_t *, int, int, char * const []); /* common/cmd_nvedit.c */ -void env_relocate (void); int envmatch (uchar *, int); /** diff --git a/include/env.h b/include/env.h index 5d205ef02d..72980962bf 100644 --- a/include/env.h +++ b/include/env.h @@ -31,6 +31,14 @@ int env_get_id(void); */ int env_init(void); +/** + * env_relocate() - Set up the post-relocation environment + * + * This loads the environment into RAM so that it can be modified. This is + * called after relocation, before the environment is used + */ +void env_relocate(void); + /** * env_get_f() - Look up the value of an environment variable (early) * From patchwork Sun Jul 28 14:03:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137986 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jBaKSNqx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPpl1M1Yz9s8m for ; Mon, 29 Jul 2019 00:10:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D8ED6C21E38; Sun, 28 Jul 2019 14:08:32 +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=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 53857C21E2B; Sun, 28 Jul 2019 14:06:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D92F6C21DFD; Sun, 28 Jul 2019 14:06:16 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 5AAD3C21D9A for ; Sun, 28 Jul 2019 14:06:10 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id k20so114453945ios.10 for ; Sun, 28 Jul 2019 07:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BL8MQ2hSgSf/gPmgN3r+DS+3vCu8qMtdknSHXG//D1w=; b=jBaKSNqxzHQ3ywnO7tt1QaOnD2QrAircf2vpyw8uEs4QUULph6Al5ZPIxk4g40l8Ax aYGZ5YJQOMtyJFFSIid4CdkbORf4TiYniC9PZC0Zb/XVfokCRVF8ILOlxJTEtSw4GcA6 w+0qae0S2VNBAQjypBQPdzOC1S3pFJbXBWFVI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BL8MQ2hSgSf/gPmgN3r+DS+3vCu8qMtdknSHXG//D1w=; b=Np3bJIcMzgVgwxhVDGSZ74GbdkoIRRhXBepG9GAABVEqXpd6duna9FuE6LOfbPz6OI XH5sTmF9HsynefJewor1kUMLeqpQGlY3wuCeDAtbsN5AgionRaftKaBzaaEPIrdwlqqj Awir4ERGsWRa65uxZHa6l5Bg1srHbp9XBvBRZHImFKJcwGNNfcS/+WeMxa2UO5XVBi1J CvihryF11favB2muMrcvkwsVAAxSMfEcohHCiSTFNywz8ZfNSHWO7mP24VQSMOxXNJqg foE0yqBgRcdrw1R0h7TftK32O/nSjYEDakm2k7fySpSo4ocj50LTa6iYNRq91UlLtgDT 9Cew== X-Gm-Message-State: APjAAAWNa/SVtvMU6l3B1LQ1HgVaGpnqx4lc4NkISBR6f3DiUd1xUSVk SyVBQNYAbx6QLkkrklkbGpGWjKTSvZ8= X-Google-Smtp-Source: APXvYqywhXOAOrtRUHVyDpOTuIV1ThZC8JxFW/Ho4dgwMfLW8v36GbRZbnCZf0OpxjjQ3ayny4okFA== X-Received: by 2002:a02:9a03:: with SMTP id b3mr16127577jal.0.1564322769247; Sun, 28 Jul 2019 07:06:09 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:27 -0600 Message-Id: <20190728140357.137295-11-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 10/39] env: Move envmatch() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move envmatch() over to the new header file. Also rename it to env_match() to better line up with other functions. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- cmd/nvedit.c | 12 ++---------- examples/api/glue.c | 3 ++- include/common.h | 3 --- include/env.h | 11 +++++++++++ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 4f3edab8b9..751b77d0e9 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -709,7 +709,7 @@ int env_get_f(const char *name, char *buf, unsigned len) return -1; } - val = envmatch((uchar *)name, i); + val = env_match((uchar *)name, i); if (val < 0) continue; @@ -785,15 +785,7 @@ U_BOOT_CMD( #endif #endif /* CONFIG_SPL_BUILD */ - -/* - * Match a name / name=value pair - * - * s1 is either a simple 'name', or a 'name=value' pair. - * i2 is the environment index for a 'name2=value2' pair. - * If the names match, return the index for the value2, else -1. - */ -int envmatch(uchar *s1, int i2) +int env_match(uchar *s1, int i2) { if (s1 == NULL) return -1; diff --git a/examples/api/glue.c b/examples/api/glue.c index 9c8ed8d11c..4086616a94 100644 --- a/examples/api/glue.c +++ b/examples/api/glue.c @@ -4,6 +4,7 @@ */ #include +#include #include #include @@ -365,7 +366,7 @@ const char * ub_env_enum(const char *last) /* * It's OK to pass only the name piece as last (and not the whole - * 'name=val' string), since the API_ENUM_ENV call uses envmatch() + * 'name=val' string), since the API_ENUM_ENV call uses env_match() * internally, which handles such case */ if (!syscall(API_ENV_ENUM, NULL, last, &env)) diff --git a/include/common.h b/include/common.h index cb6b584b70..26ec18ded4 100644 --- a/include/common.h +++ b/include/common.h @@ -145,9 +145,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); /* common/cmd_ext2.c */ int do_ext2load(cmd_tbl_t *, int, int, char * const []); -/* common/cmd_nvedit.c */ -int envmatch (uchar *, int); - /** * env_get() - Look up the value of an environment variable * diff --git a/include/env.h b/include/env.h index 72980962bf..bf34ac3f86 100644 --- a/include/env.h +++ b/include/env.h @@ -39,6 +39,17 @@ int env_init(void); */ void env_relocate(void); +/** + * env_match() - Match a name / name=value pair + * + * This is used prior to relocation for finding envrionment variables + * + * @name: A simple 'name', or a 'name=value' pair. + * @index: The environment index for a 'name2=value2' pair. + * @return index for the value if the names match, else -1. + */ +int env_match(unsigned char *name, int index); + /** * env_get_f() - Look up the value of an environment variable (early) * From patchwork Sun Jul 28 14:03:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137990 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="nFnwxobr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPsM468sz9s4Y for ; Mon, 29 Jul 2019 00:12:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 22345C21E7E; Sun, 28 Jul 2019 14:09:25 +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=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 9B735C21DB6; Sun, 28 Jul 2019 14:06:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3FF00C21DA2; Sun, 28 Jul 2019 14:06:19 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 6DDFEC21E13 for ; Sun, 28 Jul 2019 14:06:12 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id o9so10893023iom.3 for ; Sun, 28 Jul 2019 07:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wBzJULETjfarUmK5GPx/3YqiK4g/zT5FLtAZFQclOhs=; b=nFnwxobrOq5Xnb5fX2aXKWq+B0EJpGAzyJ4REusZiBK3nTEcbazuSBsM5VEiMIqeh7 yyFiuJVI+Itn1EW+SwpH9U/LjXQZT49decTKzm9kgwJFQC2XUJuM2lg4qTk5J08VmEEw eLWJ8yKmiNMMjtKhXXdZ04rxkWVRdK5VWvQhk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wBzJULETjfarUmK5GPx/3YqiK4g/zT5FLtAZFQclOhs=; b=suHOLKCtqyzBKKGL67ILBtJPOtKODjOvs/OCnJEGcsBMAhPzyYTCwV1OYG8CX65c9/ cO/t/EyjMDX/r6iGgruPryGAntkeCOnYBtcsbeZQar2W8gVybF+291zCi5Z6i8814ZWd QpNnn5golkmQ0CzewXdcts3jTHb2GS9op4fHMYjh8uS0yLWWchkMjIPB+1AZ5uqusjYU PSggKlayLGcFiRU0PWPjIyrDWqxvz45P9ZhEl+ohGQncgJ0RCHCBLCUddywWxFOgL5G8 q0wP8dAISqfBVPzHzIPICZ5L2hPF/KcZFBErBGdHU8R6zTw/v8/4dywxI8S1AWYTRW6X 1Cjg== X-Gm-Message-State: APjAAAV0EMtGvSneDGhlGsseXshG5vtrlrlHFmHTzeNcYOdAXKnqQOCn 8fGLzWUkz882NbF+VR52srftLN3Cbs4= X-Google-Smtp-Source: APXvYqzvdPTwZ6StUtEO4lnp/xS/rGNad0YFRDfUrkdqqw4PeEaMrkU2ZHInvPj1GUVMvf440jJOKQ== X-Received: by 2002:a02:ce52:: with SMTP id y18mr103747045jar.78.1564322771055; Sun, 28 Jul 2019 07:06:11 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:10 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:28 -0600 Message-Id: <20190728140357.137295-12-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 11/39] env: Move env_set_hex() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_set_hex() over to the new header file along with env_set_addr() which uses it. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- api/api.c | 1 + arch/arm/mach-tegra/cboot.c | 1 + arch/arm/mach-uniphier/board_late_init.c | 1 + board/BuR/common/common.c | 1 + board/boundary/nitrogen6x/nitrogen6x.c | 1 + board/broadcom/bcmstb/bcmstb.c | 1 + board/emulation/qemu-riscv/qemu-riscv.c | 1 + board/freescale/qemu-ppce500/qemu-ppce500.c | 1 + board/raspberrypi/rpi/rpi.c | 1 + board/sunxi/board.c | 1 + board/xilinx/zynqmp/cmds.c | 1 + cmd/cbfs.c | 1 + cmd/cramfs.c | 1 + cmd/fdt.c | 1 + cmd/jffs2.c | 1 + cmd/load.c | 1 + cmd/lzmadec.c | 1 + cmd/nand.c | 1 + cmd/reiser.c | 1 + cmd/setexpr.c | 1 + cmd/spl.c | 1 + cmd/tpm-v1.c | 1 + cmd/trace.c | 1 + cmd/ubi.c | 1 + cmd/unzip.c | 1 + cmd/ximg.c | 1 + cmd/zfs.c | 1 + cmd/zip.c | 1 + common/autoboot.c | 1 + common/bootm.c | 1 + common/bootm_os.c | 1 + drivers/fastboot/fb_command.c | 1 + drivers/net/fm/fm.c | 1 + drivers/usb/gadget/f_sdp.c | 1 + fs/fs.c | 1 + fs/ubifs/ubifs.c | 1 + include/common.h | 21 -------------------- include/env.h | 22 +++++++++++++++++++++ net/net.c | 1 + 39 files changed, 59 insertions(+), 21 deletions(-) diff --git a/api/api.c b/api/api.c index 9f03f1a35b..8a41b7cce7 100644 --- a/api/api.c +++ b/api/api.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index a829ef794f..bd4f33686d 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 3180b24330..14b61fc7df 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 89087d7dba..148fc9075e 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 867eade4bd..26af3f7102 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 7f8e0f951d..5fc2c0591b 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index d6167aaef1..49e304f7eb 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 42a6b5427a..fb36d8366c 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 617c892dde..104589bff1 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 98bc3cd0c1..bb425cbf66 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c index 321670d4e3..ed7ba58c64 100644 --- a/board/xilinx/zynqmp/cmds.c +++ b/board/xilinx/zynqmp/cmds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/cbfs.c b/cmd/cbfs.c index c118a952ac..3d1fc95972 100644 --- a/cmd/cbfs.c +++ b/cmd/cbfs.c @@ -8,6 +8,7 @@ */ #include #include +#include #include static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, diff --git a/cmd/cramfs.c b/cmd/cramfs.c index 598028cfad..2188910b2a 100644 --- a/cmd/cramfs.c +++ b/cmd/cramfs.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/fdt.c b/cmd/fdt.c index 10d8f3230b..25a6ed40d2 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/cmd/jffs2.c b/cmd/jffs2.c index 64621f2546..b47cd3d989 100644 --- a/cmd/jffs2.c +++ b/cmd/jffs2.c @@ -72,6 +72,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/load.c b/cmd/load.c index dd1e8dac13..713fe56b55 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c index 6860b5f758..e3b9cc75ac 100644 --- a/cmd/lzmadec.c +++ b/cmd/lzmadec.c @@ -11,6 +11,7 @@ #include #include +#include #include #include diff --git a/cmd/nand.c b/cmd/nand.c index 899d504533..27efef20bc 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/reiser.c b/cmd/reiser.c index 2c0bca1c54..7f51b927a4 100644 --- a/cmd/reiser.c +++ b/cmd/reiser.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/setexpr.c b/cmd/setexpr.c index 1a6cecdeda..0182f19938 100644 --- a/cmd/setexpr.c +++ b/cmd/setexpr.c @@ -11,6 +11,7 @@ #include #include #include +#include #include static ulong get_arg(char *s, int w) diff --git a/cmd/spl.c b/cmd/spl.c index 038f48818d..56051b8a4b 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c index b75e0933a1..2807331524 100644 --- a/cmd/tpm-v1.c +++ b/cmd/tpm-v1.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/cmd/trace.c b/cmd/trace.c index 7d328f88be..392b129536 100644 --- a/cmd/trace.c +++ b/cmd/trace.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/cmd/ubi.c b/cmd/ubi.c index c511a2fb76..ca5dc9021b 100644 --- a/cmd/ubi.c +++ b/cmd/ubi.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/cmd/unzip.c b/cmd/unzip.c index 8474d9becf..afd58e7cdb 100644 --- a/cmd/unzip.c +++ b/cmd/unzip.c @@ -6,6 +6,7 @@ #include #include +#include #include static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) diff --git a/cmd/ximg.c b/cmd/ximg.c index 920a80edc8..a9481004f0 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -13,6 +13,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/zfs.c b/cmd/zfs.c index 384ac4c939..ed5402bb13 100644 --- a/cmd/zfs.c +++ b/cmd/zfs.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/zip.c b/cmd/zip.c index 9cd400a7e8..8ef46e9815 100644 --- a/cmd/zip.c +++ b/cmd/zip.c @@ -6,6 +6,7 @@ #include #include +#include static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { diff --git a/common/autoboot.c b/common/autoboot.c index 94133eaeda..6201f0f17b 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/common/bootm.c b/common/bootm.c index 2cd47f96c8..da554f4cb1 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/common/bootm_os.c b/common/bootm_os.c index 855c471c28..6fb7d658da 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 200f9910c5..4864344853 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index 0a43dfe74e..ce0f1678fd 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -4,6 +4,7 @@ * Dave Liu */ #include +#include #include #include #include diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index fab7ce6f97..bcd1c5d47c 100644 --- a/drivers/usb/gadget/f_sdp.c +++ b/drivers/usb/gadget/f_sdp.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/fs/fs.c b/fs/fs.c index 48d8f1f6da..d8a4ced469 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 72e8a24d3b..67a0e8caae 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include "ubifs.h" diff --git a/include/common.h b/include/common.h index 26ec18ded4..100eac6e5e 100644 --- a/include/common.h +++ b/include/common.h @@ -209,27 +209,6 @@ int env_set(const char *varname, const char *value); */ int env_set_ulong(const char *varname, ulong value); -/** - * env_set_hex() - set an environment variable to a hex value - * - * @varname: Variable to adjust - * @value: Value to set for the variable (will be converted to a hex string) - * @return 0 if OK, 1 on error - */ -int env_set_hex(const char *varname, ulong value); - -/** - * env_set_addr - Set an environment variable to an address in hex - * - * @varname: Environment variable to set - * @addr: Value to set it to - * @return 0 if ok, 1 on error - */ -static inline int env_set_addr(const char *varname, const void *addr) -{ - return env_set_hex(varname, (ulong)addr); -} - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index bf34ac3f86..5c780f30d6 100644 --- a/include/env.h +++ b/include/env.h @@ -10,6 +10,7 @@ #define __ENV_H #include +#include /** * env_get_id() - Gets a sequence number for the environment @@ -62,6 +63,27 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_set_hex() - set an environment variable to a hex value + * + * @varname: Variable to adjust + * @value: Value to set for the variable (will be converted to a hex string) + * @return 0 if OK, 1 on error + */ +int env_set_hex(const char *varname, ulong value); + +/** + * env_set_addr - Set an environment variable to an address in hex + * + * @varname: Environment variable to set + * @addr: Value to set it to + * @return 0 if ok, 1 on error + */ +static inline int env_set_addr(const char *varname, const void *addr) +{ + return env_set_hex(varname, (ulong)addr); +} + /** * env_complete() - return an auto-complete for environment variables * diff --git a/net/net.c b/net/net.c index 58b0417cbe..1a175c4597 100644 --- a/net/net.c +++ b/net/net.c @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include From patchwork Sun Jul 28 14:03:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137998 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ikxsijvc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ0643bRz9s4Y for ; Mon, 29 Jul 2019 00:18:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 33310C21C2F; Sun, 28 Jul 2019 14:09:50 +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=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 2EE7FC21E38; Sun, 28 Jul 2019 14:06:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BEE61C21DD3; Sun, 28 Jul 2019 14:06:22 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 231FBC21DA6 for ; Sun, 28 Jul 2019 14:06:14 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id g20so114468623ioc.12 for ; Sun, 28 Jul 2019 07:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XDwCxkdoRpqrp6GP2l+Qaho++xIUcdt6gRfHh4cN8Rw=; b=ikxsijvcEKFjOLre5SrdGuA6nwlMa2CDwYKuPFjEBAMyYCJ6OABK/FRWc9AuA2BoOJ zL7I+q3FjtxDc5aD6sz320xWB2wHNmr9AV55kUIspc2TXcVilGc3pnFCK15Cmi56N6A/ I8oygccjMc1TVy2b2X9uXkqCRoAALMvwp3ZC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XDwCxkdoRpqrp6GP2l+Qaho++xIUcdt6gRfHh4cN8Rw=; b=C98YgtmS7M1mYAJ2RMA9pn3d86Z5DPWt2GJnNlpxlBf+lM1o+meQdwJtBB9/e5mxHr 7e3o5LFufRUkaEn/pb6EzYLVjhV1MpFDIo5mInFan5F7l1tJCJGHEmT+VxefHCST4hql NKJQu+Z2iQ5LYuWN/eg0lN9rAR0w6++HasF1TIGgtI+pY0Bs2ae4d3qspnGPBobNOM1H pywwVDmTg702DXcUpWK2i7EcTChdcksfDKcdmF5jp97AxLWYnw1ENeRRIfMOZQlQdONX 8CcgCQCfgo2sV39K/AoYTTwn3j+r/DgZgvG0U1TB9vgHqRJRSvEj0s9sdhU2o3VtvLri /F4w== X-Gm-Message-State: APjAAAXEBpX8QL+0arhoHx5uoNU3Lj6iVnYatkcrmZDvH2CJwvTLqrYw puGVzLId6rbABUY6/vMx5YHcTXDsCPE= X-Google-Smtp-Source: APXvYqzE3hWBZ142GSsk2LJHuf+wxUDEceaUXGfelK8xnkCi/M6qJYIe06gC5nJgttCN3lCjlFa0ag== X-Received: by 2002:a02:5a02:: with SMTP id v2mr104872190jaa.124.1564322772861; Sun, 28 Jul 2019 07:06:12 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:29 -0600 Message-Id: <20190728140357.137295-13-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 12/39] env: Move env_set_ulong() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_set_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/mach-uniphier/mmc-first-dev.c | 1 + board/BuR/brppt1/board.c | 1 + board/BuR/common/br_resetc.c | 1 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 + board/engicam/common/board.c | 1 + board/gdsys/mpc8308/gazerbeam.c | 1 + board/grinn/liteboard/board.c | 1 + board/imgtec/ci20/ci20.c | 1 + board/synopsys/hsdk/hsdk.c | 1 + board/warp7/warp7.c | 1 + cmd/tpm-common.c | 1 + drivers/bootcount/bootcount_env.c | 1 + drivers/scsi/scsi.c | 1 + include/bootcount.h | 1 + include/common.h | 9 --------- include/env.h | 9 +++++++++ 16 files changed, 23 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c index 2f1c109b9e..149e662070 100644 --- a/arch/arm/mach-uniphier/mmc-first-dev.c +++ b/arch/arm/mach-uniphier/mmc-first-dev.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index b8ab19c0e7..ef4f5c9501 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c index c8cc73ab14..c0e7fb65b2 100644 --- a/board/BuR/common/br_resetc.c +++ b/board/BuR/common/br_resetc.c @@ -6,6 +6,7 @@ * B&R Industrial Automation GmbH - http://www.br-automation.com/ * */ #include +#include #include #include #include diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 5f6ea35e5f..418657c2d5 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 7486f0ac2d..0880647183 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index cd621744d2..ddd6ee8953 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 1491b8c3d4..1558ea4b84 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c index 9811ef559f..f72a660581 100644 --- a/board/imgtec/ci20/ci20.c +++ b/board/imgtec/ci20/ci20.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index ac4d980c49..8a7642a0aa 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 134a6c99d7..39ae982257 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c index 89f2aa001b..38900fb159 100644 --- a/cmd/tpm-common.c +++ b/cmd/tpm-common.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c index 9084ca8a6e..50e0857b3b 100644 --- a/drivers/bootcount/bootcount_env.c +++ b/drivers/bootcount/bootcount_env.c @@ -5,6 +5,7 @@ */ #include +#include #include void bootcount_store(ulong a) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 75900d8228..48cb2a2818 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/include/bootcount.h b/include/bootcount.h index daee84316c..8fa8cf8218 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef CONFIG_DM_BOOTCOUNT diff --git a/include/common.h b/include/common.h index 100eac6e5e..283cb23fd1 100644 --- a/include/common.h +++ b/include/common.h @@ -200,15 +200,6 @@ int env_get_yesno(const char *var); */ int env_set(const char *varname, const char *value); -/** - * env_set_ulong() - set an environment variable to an integer - * - * @varname: Variable to adjust - * @value: Value to set for the variable (will be converted to a string) - * @return 0 if OK, 1 on error - */ -int env_set_ulong(const char *varname, ulong value); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index 5c780f30d6..8898b78b8e 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,15 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_set_ulong() - set an environment variable to an integer + * + * @varname: Variable to adjust + * @value: Value to set for the variable (will be converted to a string) + * @return 0 if OK, 1 on error + */ +int env_set_ulong(const char *varname, ulong value); + /** * env_set_hex() - set an environment variable to a hex value * From patchwork Sun Jul 28 14:03:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137987 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZYG0QROj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPpl1MKlz9sBF for ; Mon, 29 Jul 2019 00:10:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E3304C21E39; Sun, 28 Jul 2019 14:08:07 +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=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 131D5C21E07; Sun, 28 Jul 2019 14:06:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A9AABC21DCA; Sun, 28 Jul 2019 14:06:22 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 11471C21DDC for ; Sun, 28 Jul 2019 14:06:16 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id q22so4794322iog.4 for ; Sun, 28 Jul 2019 07:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nRfdfDxzZYhLMle0b13AqEJaCwM9LxOJzzKXQw4nLc8=; b=ZYG0QROjRgSotlHi5OI562LefA6mO6+RyfUGuU8qUH96jHJUbvroEIKes4hC65PD2e M8LHsDWx1ToPxNcd2BrMoNJsfvHmeVqi6rfmHP5tP8BhPj/bhNs6QNscqHdo1eIkZ78n 6NwKcII0nB9CZmEXQlEJxVLiGrjd90BYB7SJ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nRfdfDxzZYhLMle0b13AqEJaCwM9LxOJzzKXQw4nLc8=; b=JJ6HE3zjCzifujFchBsXeYbi0oEzFMUnd+RQKa1+zqn4SsnjFgOZPS/TplzDJCw4Nt 50xmxFYuLrYoH+E9mAiwcn+srcBAZ2xkU6vG6+DF+SBuBRIxV2VH4oMnbAPqF0VDbxjc T6U5SRLiAlEvYAUHpyPy8Exas585AN9nCniKR+kAYiMBG42JB44nDjUrlYs2XNI1vMZj yJw6hKvGcc+LzsW2ozFGm38JA48icSgxPZMGVboREmPBaULHB0Qo8eKt6fvURHh5Stc5 ok/B3c6K1aiT7m/wQ15cZvQ2u46SJP3ap1wrt3AbxKLx05cCigEhEactN4gMCqBskbYR hcCQ== X-Gm-Message-State: APjAAAWtQh/JMAhF97VS602LeZxwF6aIix4I2DD7FkPHs6fI4V2KS/k1 TKUa8vFVjVIAZvpoXI8TqLR0NDGELMg= X-Google-Smtp-Source: APXvYqwCxOwcPfiD3eB11cwwFNiKavO2rGw92n6IeIWsx0kbIVKX2fOHQn+mqbx4vXEWYqFX50uwig== X-Received: by 2002:a6b:5b01:: with SMTP id v1mr92630531ioh.120.1564322774886; Sun, 28 Jul 2019 07:06:14 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:14 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:30 -0600 Message-Id: <20190728140357.137295-14-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 13/39] env: Move env_get_ulong() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- board/BuR/brxre1/board.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/synopsys/hsdk/env-lib.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + board/toradex/colibri_imx6/colibri_imx6.c | 1 + include/common.h | 13 ------------- include/env.h | 13 +++++++++++++ lib/fdtdec.c | 1 + net/bootp.c | 1 + 9 files changed, 20 insertions(+), 13 deletions(-) diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 0d1c6c4720..873208c668 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -9,6 +9,7 @@ * */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 6ac956caca..43f5404231 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c index 66e4581fae..f443c21e6d 100644 --- a/board/synopsys/hsdk/env-lib.c +++ b/board/synopsys/hsdk/env-lib.c @@ -5,6 +5,7 @@ */ #include "env-lib.h" +#include #define MAX_CMD_LEN 25 diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 6d0fc21c67..4ff9a44b37 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 6417ba4980..f657db87d8 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 283cb23fd1..48f443e851 100644 --- a/include/common.h +++ b/include/common.h @@ -157,19 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_get_ulong() - Return an environment variable as an integer value - * - * Most U-Boot environment variables store hex values. For those which store - * (e.g.) base-10 integers, this function can be used to read the value. - * - * @name: Variable to look up - * @base: Base to use (e.g. 10 for base 10, 2 for binary) - * @default_val: Default value to return if no value is found - * @return the value found, or @default_val if none - */ -ulong env_get_ulong(const char *name, int base, ulong default_val); - /** * env_get_hex() - Return an environment variable as a hex value * diff --git a/include/env.h b/include/env.h index 8898b78b8e..9124718f2d 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,19 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_get_ulong() - Return an environment variable as an integer value + * + * Most U-Boot environment variables store hex values. For those which store + * (e.g.) base-10 integers, this function can be used to read the value. + * + * @name: Variable to look up + * @base: Base to use (e.g. 10 for base 10, 2 for binary) + * @default_val: Default value to return if no value is found + * @return the value found, or @default_val if none + */ +ulong env_get_ulong(const char *name, int base, ulong default_val); + /** * env_set_ulong() - set an environment variable to an integer * diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 464de5b3b5..ef5e54875c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/net/bootp.c b/net/bootp.c index 9a2b512e4a..505489140e 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include From patchwork Sun Jul 28 14:03:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137985 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="lC77HKg1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPnj5lTkz9s8m for ; Mon, 29 Jul 2019 00:09:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 670D8C21D83; Sun, 28 Jul 2019 14:08:45 +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=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 EE654C21DED; Sun, 28 Jul 2019 14:06:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 15DA3C21E31; Sun, 28 Jul 2019 14:06:23 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id CFC30C21DD9 for ; Sun, 28 Jul 2019 14:06:17 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id z3so4806212iog.0 for ; Sun, 28 Jul 2019 07:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KGRplEElRVbELHuFjY0PvPcwzc9DSXYeIt9bVPLAyQ4=; b=lC77HKg18bwZaQtoV6ScpM+ZDRb0O+1aTpChdHqxjxIDjkkMEiwG+lqe7Us18AyGyi FJP0NrnGp7pLNO8Yx7slIVdJp8r/uYnZdXYu11iElajNJUKpw8b+u6ndoALlByTqeCKR mSXXPanPNeKpVRjgoPTmK0lWfF9naZmFmmLGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KGRplEElRVbELHuFjY0PvPcwzc9DSXYeIt9bVPLAyQ4=; b=K6I4pNp++NDXyN6eeuFIEim9jqR74oWT1f20qDEEp5QQr9hfQ8WE+RzW6EvWaTT7UQ LojMJqIE6fL4/CcnmcLEnFsgXT5y5IS/tDQrZxnzWGO2IffJh3VLz4gsL3ezBP6wb2tC 3dcTu8LMXtpEbmiE5YYZBwDo9Ks6uCF37dvNUV0RHVqDJyoDFn0ndlYzBNMEgFPumn2g spWRUQYQ3MW7AC8J0ew48GEQchktRFlDJTWVax6l1Tqf53+lWM0X3I+1VCqkJ+tpjQUo VTRgp3t1kcFrZMqxifjWZalV6JYkGxhiGWgN2grAV81qDDgTUuLoUCr7CWTBdsCnk74d tMeg== X-Gm-Message-State: APjAAAUhMoWELXbfanOqOi4MGYY5gWaKhSfCrl/x39bY50by8Edb/k1Y E5AHK4z+g4SwYiE85fN3nY27sky66HI= X-Google-Smtp-Source: APXvYqw3ZM1G5phUdGTEGz9XhyKrVG7vpqrR+8bSx+U6RAvHJf07PnyYtWq/HcS/Ev6hwd03dkX9Vw== X-Received: by 2002:a6b:8f47:: with SMTP id r68mr100798883iod.204.1564322776662; Sun, 28 Jul 2019 07:06:16 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:31 -0600 Message-Id: <20190728140357.137295-15-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 14/39] env: Move env_get_yesno() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get_yesno() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/powerpc/cpu/mpc85xx/mp.c | 1 + board/gateworks/gw_ventana/gw_ventana_spl.c | 1 + cmd/source.c | 1 + include/common.h | 6 ------ include/env.h | 8 ++++++++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index b0aa72ed6e..119d4b3510 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index 740fc57b91..6886ff9b33 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/source.c b/cmd/source.c index 1a9a71aa37..3a51ebf0b6 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 48f443e851..83050073bf 100644 --- a/include/common.h +++ b/include/common.h @@ -169,12 +169,6 @@ char *env_get(const char *varname); */ ulong env_get_hex(const char *varname, ulong default_val); -/* - * Read an environment variable as a boolean - * Return -1 if variable does not exist (default to true) - */ -int env_get_yesno(const char *var); - /** * env_set() - set an environment variable * diff --git a/include/env.h b/include/env.h index 9124718f2d..d7190da335 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,14 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_get_yesno() - Read an environment variable as a boolean + * + * @return 1 if yes/true (Y/y/T/t), -1 if variable does not exist (i.e. default + * to true), 0 if otherwise + */ +int env_get_yesno(const char *var); + /** * env_get_ulong() - Return an environment variable as an integer value * From patchwork Sun Jul 28 14:03:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137988 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="O/ch5D/T"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPqg67ySz9s4Y for ; Mon, 29 Jul 2019 00:10:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 820D7C21E6C; Sun, 28 Jul 2019 14:08:21 +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=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 A9229C21E1B; Sun, 28 Jul 2019 14:06:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E706CC21DB6; Sun, 28 Jul 2019 14:06:24 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 9AA0BC21DC1 for ; Sun, 28 Jul 2019 14:06:19 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id i10so1136655iol.13 for ; Sun, 28 Jul 2019 07:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ny3qF3N9oRPR9nsYKFnA/6q4d5MxKmAob4AIYrZSzHo=; b=O/ch5D/TZOvbyJ9ht6Y/TKxCc4pbBsf2m9bUpXWO44BqCPJ4jqtLiG8rD39J0lJPMD KT/HHHtrVOXrsMrBcM/SJvedzty9DVuf5+Z51N3DSOnErKgC4svUhwmQqFxXHGHxc3IU uI0m7yQfYYAvG6rbks1U9rX27tgmzt+IMgHr0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ny3qF3N9oRPR9nsYKFnA/6q4d5MxKmAob4AIYrZSzHo=; b=H+Sm2AwkeCVur4B2mMfji0qoJZrrRwoOMIZ5jRoCKsqPbPS0wphx0f3n+zySBgcaka 0K5rdOdEjK/ajMeQW6vIYwq+XhRJ7LX/UfKiXJhUIsE5GyUPGaQY/LbgeShgvApkmhZp zXE5SHnBWQZ/YLGgLsAS2Ru+3538fETjW0J881k0rZO/OiWv1efUE3OANhndEAfjOJ/Y qRwjM4EyeRZgDU9frsXvsJujmt3GAwDHIAMnB+pnaCm0FUH0mUZ5nGJKDfjRLoWp07Im BQNJQ3KK9tMGombY7VggVgAwAUD2CZA5D9J/xRJ9oz5RPEjYNpTrHSulYXdSxYexbvwu jekQ== X-Gm-Message-State: APjAAAU6qdXF+TjK7jUetlU80+8P62fC6GK9rPzwJXQVYKpIBPQgT/pN 3DXrivXqgvSmz6RB+S3ZNgDRpY85IPc= X-Google-Smtp-Source: APXvYqx8FxDW/0/TQe/hKCqLS63ntdmtT09C6tJAHlBSZJluLmcOJ8602dEcK/bN9ru/HAdUGiwtsA== X-Received: by 2002:a02:cd82:: with SMTP id l2mr106452066jap.96.1564322778488; Sun, 28 Jul 2019 07:06:18 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:18 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:32 -0600 Message-Id: <20190728140357.137295-16-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 15/39] env: Move env_get_hex() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get_hex() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/x86/lib/zimage.c | 1 + cmd/elf.c | 1 + common/image-fdt.c | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 230b38e938..6a6258a505 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/cmd/elf.c b/cmd/elf.c index d883be4193..5e5cf47cf8 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/common/image-fdt.c b/common/image-fdt.c index e70da3dcb3..4247dcee0c 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 83050073bf..8d8bbc4da3 100644 --- a/include/common.h +++ b/include/common.h @@ -157,18 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_get_hex() - Return an environment variable as a hex value - * - * Decode an environment as a hex number (it may or may not have a 0x - * prefix). If the environment variable cannot be found, or does not start - * with hex digits, the default value is returned. - * - * @varname: Variable to decode - * @default_val: Value to return on error - */ -ulong env_get_hex(const char *varname, ulong default_val); - /** * env_set() - set an environment variable * diff --git a/include/env.h b/include/env.h index d7190da335..dd063feb39 100644 --- a/include/env.h +++ b/include/env.h @@ -93,6 +93,18 @@ ulong env_get_ulong(const char *name, int base, ulong default_val); */ int env_set_ulong(const char *varname, ulong value); +/** + * env_get_hex() - Return an environment variable as a hex value + * + * Decode an environment as a hex number (it may or may not have a 0x + * prefix). If the environment variable cannot be found, or does not start + * with hex digits, the default value is returned. + * + * @varname: Variable to decode + * @default_val: Value to return on error + */ +ulong env_get_hex(const char *varname, ulong default_val); + /** * env_set_hex() - set an environment variable to a hex value * From patchwork Sun Jul 28 14:03:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138013 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Hz0OkYsf"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ9z1NFWz9s4Y for ; Mon, 29 Jul 2019 00:26:47 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CE4F6C21E29; Sun, 28 Jul 2019 14:12:07 +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=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 B1EF5C21DD4; Sun, 28 Jul 2019 14:08:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6CD2AC21DB3; Sun, 28 Jul 2019 14:06:36 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 84151C21DA1 for ; Sun, 28 Jul 2019 14:06:31 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id o9so10894134iom.3 for ; Sun, 28 Jul 2019 07:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lljpYC/QczS+AnY9KAYLL/USagO2TOCwIi4q8eDbvSo=; b=Hz0OkYsfqVD7smXiMhHYrUgmj5rOAOQQsxkT1gFhCxWD19UDv/n6uv32sfUArITWIN tFrATLJtANSq6RQG6sVM+VshzhlmDQczsnCesweyeuGyo0Mzd6T6XcAiL43rRAyxecL8 irk8XPH4vlQHFkwwqnpbs5yJ5JVX/9RwL4oSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lljpYC/QczS+AnY9KAYLL/USagO2TOCwIi4q8eDbvSo=; b=XRfIkuVJVvEoVvNdHLRCiKgFECcqi0jcr5zbOtOFXnQr6LACwihaJ0K/CaJS6R1/lE Xg27YjT6rzKmGTVHJiZX5KNllHwCjKtB+RsWW7e2P4OCMEO2zHkrzHUZWyNMrPJh5D/P Brd9bCqDgKYlkgSdAz3lGJyci7naItj0i7Jjib+rxG1WiFafaOGIims5DfXMvRNUzRNk 328q3dBJCe0fVRoz5VS6id2f8FoChj0evRqqpDjVHpR0VVBEY5fES8PA3QbTqA/muZsA 6520DVuu3zQZux/HU9OAsIaAU1pD2GHIznQb/A+R4/4mMUBRvBIZCEBrv/goLxgrfFnp bBnw== X-Gm-Message-State: APjAAAUNu9GsSyLgNyyPTt/DG6lK0eT71Ha7taMFOE09U3D7J67zf5tP SHWL/VjhUMLirri8m75cT9tfJ1nFUp4= X-Google-Smtp-Source: APXvYqyJCnPqvJeP9ePcKU+CvoQTSr8nrqgu2GFuj+IwHVwjKjalzzR4OP1iOeUqdjNYBoDsWCsjOQ== X-Received: by 2002:a02:a703:: with SMTP id k3mr39439146jam.12.1564322787503; Sun, 28 Jul 2019 07:06:27 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:33 -0600 Message-Id: <20190728140357.137295-17-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 16/39] env: Move env_set() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_set() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/cpu/arm926ejs/spear/spr_misc.c | 1 + arch/arm/cpu/armv7/vf610/generic.c | 1 + arch/arm/cpu/armv8/fsl-layerscape/soc.c | 1 + arch/arm/mach-davinci/misc.c | 1 + arch/arm/mach-imx/mx6/opos6ul.c | 1 + arch/arm/mach-imx/mx7/soc.c | 1 + arch/arm/mach-meson/board-common.c | 1 + arch/arm/mach-omap2/utils.c | 1 + arch/arm/mach-rmobile/cpu_info.c | 1 + arch/arm/mach-rockchip/rk3288-board.c | 1 + arch/arm/mach-socfpga/misc_gen5.c | 1 + arch/arm/mach-socfpga/misc_s10.c | 1 + arch/arm/mach-stm32mp/cpu.c | 1 + arch/arm/mach-tegra/board2.c | 1 + board/Arcturus/ucp1020/cmd_arc.c | 1 + board/Arcturus/ucp1020/ucp1020.c | 1 + board/CZ.NIC/turris_mox/turris_mox.c | 1 + board/LaCie/net2big_v2/net2big_v2.c | 1 + board/LaCie/netspace_v2/netspace_v2.c | 1 + board/Synology/ds414/cmd_syno.c | 1 + board/alliedtelesis/x530/x530.c | 1 + board/amazon/kc1/kc1.c | 1 + board/amlogic/p200/p200.c | 1 + board/amlogic/p201/p201.c | 1 + board/amlogic/p212/p212.c | 1 + board/amlogic/q200/q200.c | 1 + board/aristainetos/aristainetos-v2.c | 1 + board/armltd/integrator/integrator.c | 1 + board/atmel/common/board.c | 1 + board/atmel/common/mac_eeprom.c | 1 + board/atmel/sama5d3xek/sama5d3xek.c | 1 + board/bachmann/ot1200/ot1200.c | 1 + board/bosch/shc/board.c | 1 + board/buffalo/lsxl/lsxl.c | 1 + board/cadence/xtfpga/xtfpga.c | 1 + board/ccv/xpress/xpress.c | 1 + board/compulab/cl-som-imx7/cl-som-imx7.c | 1 + board/compulab/cm_fx6/cm_fx6.c | 1 + board/compulab/cm_t335/cm_t335.c | 1 + board/compulab/cm_t35/cm_t35.c | 1 + board/compulab/cm_t54/cm_t54.c | 1 + board/congatec/cgtqmx6eval/cgtqmx6eval.c | 1 + board/cssi/MCR3000/MCR3000.c | 1 + board/davinci/da8xxevm/da850evm.c | 1 + board/davinci/da8xxevm/omapl138_lcdk.c | 1 + board/dhelectronics/dh_imx6/dh_imx6.c | 1 + board/eets/pdu001/board.c | 1 + board/el/el6x/el6x.c | 1 + board/freescale/common/cmd_esbc_validate.c | 1 + board/freescale/common/fsl_chain_of_trust.c | 1 + board/freescale/common/sys_eeprom.c | 1 + board/freescale/imx8mq_evk/imx8mq_evk.c | 1 + board/freescale/imx8qm_mek/imx8qm_mek.c | 1 + board/freescale/imx8qxp_mek/imx8qxp_mek.c | 1 + board/freescale/ls2080ardb/ls2080ardb.c | 1 + board/freescale/mpc8323erdb/mpc8323erdb.c | 1 + board/freescale/mx53loco/mx53loco.c | 1 + board/freescale/mx6sabreauto/mx6sabreauto.c | 1 + board/freescale/mx6sabresd/mx6sabresd.c | 1 + board/freescale/mx6sxsabresd/mx6sxsabresd.c | 1 + board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 1 + board/freescale/mx6ullevk/mx6ullevk.c | 1 + board/gardena/smart-gateway-at91sam/board.c | 1 + board/gardena/smart-gateway-mt7688/board.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/ge/bx50v3/bx50v3.c | 1 + board/ge/common/ge_common.c | 1 + board/ge/mx53ppd/mx53ppd.c | 1 + board/grinn/chiliboard/board.c | 1 + board/gumstix/pepper/board.c | 1 + board/highbank/highbank.c | 1 + board/intel/edison/edison.c | 1 + board/isee/igep003x/board.c | 1 + board/isee/igep00x0/igep00x0.c | 1 + board/k+p/kp_imx53/kp_id_rev.c | 1 + board/k+p/kp_imx53/kp_imx53.c | 1 + board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 1 + board/keymile/common/common.c | 1 + board/keymile/common/ivm.c | 1 + board/keymile/km83xx/km83xx.c | 1 + board/keymile/km_arm/km_arm.c | 1 + board/keymile/kmp204x/kmp204x.c | 1 + board/kosagi/novena/novena.c | 1 + board/laird/wb50n/wb50n.c | 1 + board/lg/sniper/sniper.c | 1 + board/liebherr/display5/display5.c | 1 + board/logicpd/imx6/imx6logic.c | 1 + board/logicpd/zoom1/zoom1.c | 1 + board/nokia/rx51/rx51.c | 1 + board/overo/overo.c | 1 + board/phytec/pcm051/board.c | 1 + board/phytec/pcm052/pcm052.c | 1 + board/phytec/pfla02/pfla02.c | 1 + board/phytec/phycore_rk3288/phycore-rk3288.c | 1 + board/qualcomm/dragonboard410c/dragonboard410c.c | 1 + board/qualcomm/dragonboard820c/dragonboard820c.c | 1 + board/renesas/blanche/blanche.c | 1 + board/renesas/sh7752evb/sh7752evb.c | 1 + board/renesas/sh7753evb/sh7753evb.c | 1 + board/renesas/sh7757lcr/sh7757lcr.c | 1 + board/rockchip/tinker_rk3288/tinker-rk3288.c | 1 + board/samsung/common/misc.c | 1 + board/samsung/trats/trats.c | 1 + board/samsung/universal_c210/universal.c | 1 + board/samtec/vining_fpga/socfpga.c | 1 + board/siemens/common/factoryset.c | 1 + board/siemens/draco/board.c | 1 + board/siemens/pxm2/board.c | 1 + board/siemens/rut/board.c | 1 + board/siemens/taurus/taurus.c | 1 + board/silica/pengwyn/board.c | 1 + board/softing/vining_2000/vining_2000.c | 1 + board/solidrun/mx6cuboxi/mx6cuboxi.c | 1 + board/technologic/ts4800/ts4800.c | 1 + board/theobroma-systems/puma_rk3399/puma-rk3399.c | 1 + board/ti/am43xx/board.c | 1 + board/ti/am65x/evm.c | 1 + board/ti/beagle/beagle.c | 1 + board/ti/common/board_detect.c | 1 + board/ti/evm/evm.c | 1 + board/ti/panda/panda.c | 1 + board/ti/ti814x/evm.c | 1 + board/ti/ti816x/evm.c | 1 + board/timll/devkit8000/devkit8000.c | 1 + board/toradex/apalis-imx8/apalis-imx8.c | 1 + board/toradex/apalis_imx6/apalis_imx6.c | 1 + board/toradex/colibri-imx6ull/colibri-imx6ull.c | 1 + board/toradex/colibri-imx8x/colibri-imx8x.c | 1 + board/toradex/colibri_vf/colibri_vf.c | 1 + board/toradex/common/tdx-common.c | 1 + board/tqc/tqma6/tqma6.c | 1 + board/udoo/neo/neo.c | 1 + board/udoo/udoo.c | 1 + board/varisys/common/sys_eeprom.c | 1 + board/vscom/baltos/board.c | 1 + board/wandboard/wandboard.c | 1 + board/xilinx/zynq/board.c | 1 + board/xilinx/zynqmp/zynqmp.c | 1 + cmd/avb.c | 1 + cmd/binop.c | 1 + cmd/dtimg.c | 1 + cmd/gpt.c | 1 + cmd/ini.c | 1 + cmd/md5sum.c | 1 + cmd/net.c | 1 + cmd/nvedit_efi.c | 1 + cmd/part.c | 1 + cmd/pxe.c | 1 + cmd/qfw.c | 1 + common/cli_hush.c | 1 + common/console.c | 1 + common/hash.c | 1 + common/hwconfig.c | 1 + common/image-android.c | 1 + common/main.c | 1 + common/spl/spl_dfu.c | 1 + common/update.c | 1 + drivers/net/fec_mxc.c | 1 + drivers/net/lan91c96.c | 1 + drivers/net/ne2000_base.c | 1 + drivers/net/sandbox-raw.c | 1 + drivers/usb/gadget/ether.c | 1 + env/flags.c | 1 + examples/api/demo.c | 1 + include/command.h | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ include/env_flags.h | 1 + include/exports.h | 1 + include/net.h | 1 + include/search.h | 1 + lib/efi_loader/efi_variable.c | 1 + lib/uuid.c | 1 + net/dns.c | 1 + net/eth-uclass.c | 1 + net/eth_legacy.c | 1 + net/wol.c | 1 + test/dm/eth.c | 1 + tools/env/fw_env.c | 1 + tools/env/fw_env.h | 1 + tools/env/fw_env_main.c | 1 + 181 files changed, 191 insertions(+), 12 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index 371dea5657..533268513e 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 337f4af7a8..7e4641fd32 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #ifdef CONFIG_FSL_ESDHC_IMX #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 7414215208..00c705f74e 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index df500c8f35..b310bc7293 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 264fa8a48e..8b921a7d37 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -13,6 +13,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 1b4bbc5037..3b8e1ba9c3 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index 18383f774e..08a7aae2b9 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index edf5edcb68..cf4f10a8f5 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -4,6 +4,7 @@ * Aneesh V */ #include +#include #include #include #include diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 784a2a28d5..ef6ab32e65 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #ifdef CONFIG_ARCH_CPU_INIT diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index a250d50387..06bb86dae9 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c index 71547d81ab..31681b799d 100644 --- a/arch/arm/mach-socfpga/misc_gen5.c +++ b/arch/arm/mach-socfpga/misc_gen5.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c index 29abc4a54c..0a5fab11c0 100644 --- a/arch/arm/mach-socfpga/misc_s10.c +++ b/arch/arm/mach-socfpga/misc_s10.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index 10190f40d4..b06b84c315 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index bbc487aa3b..f13bd256cc 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index 7a510c61fb..755f569d13 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c index 54fd1782cb..6a880c97bc 100644 --- a/board/Arcturus/ucp1020/ucp1020.c +++ b/board/Arcturus/ucp1020/ucp1020.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 3818e3752a..f3c89d63d5 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c index fb08e50415..1609089502 100644 --- a/board/LaCie/net2big_v2/net2big_v2.c +++ b/board/LaCie/net2big_v2/net2big_v2.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index 453c0dd467..ba667934e4 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c index 59e6fe0310..777948f90f 100644 --- a/board/Synology/ds414/cmd_syno.c +++ b/board/Synology/ds414/cmd_syno.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c index 97dbed79dd..e0fa8067c1 100644 --- a/board/alliedtelesis/x530/x530.c +++ b/board/alliedtelesis/x530/x530.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c index 031fd11092..9034c4fbff 100644 --- a/board/amazon/kc1/kc1.c +++ b/board/amazon/kc1/kc1.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c index 62f0f4c871..7f33ce0f0b 100644 --- a/board/amlogic/p200/p200.c +++ b/board/amlogic/p200/p200.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c index ef0c65cd9f..0a17fbedf1 100644 --- a/board/amlogic/p201/p201.c +++ b/board/amlogic/p201/p201.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c index 1159cee4ce..4d6ac7264c 100644 --- a/board/amlogic/p212/p212.c +++ b/board/amlogic/p212/p212.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c index 2ea97c362e..880945f143 100644 --- a/board/amlogic/q200/q200.c +++ b/board/amlogic/q200/q200.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/aristainetos/aristainetos-v2.c b/board/aristainetos/aristainetos-v2.c index c81c441172..c0a2e41f02 100644 --- a/board/aristainetos/aristainetos-v2.c +++ b/board/aristainetos/aristainetos-v2.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index 69d92a32a5..0a2baa7297 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c index 20c3b8c086..c41706c400 100644 --- a/board/atmel/common/board.c +++ b/board/atmel/common/board.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c index 7ff1ec7462..f016ef7a6a 100644 --- a/board/atmel/common/mac_eeprom.c +++ b/board/atmel/common/mac_eeprom.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index e373f45800..acf61486d2 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index 067a970830..36f37084b3 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index feed63bdf2..29be3739f9 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index bf69a746e4..b2ccb83c8a 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c index bdda9314a5..256611638a 100644 --- a/board/cadence/xtfpga/xtfpga.c +++ b/board/cadence/xtfpga/xtfpga.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c index 35e1c557b5..05286e643c 100644 --- a/board/ccv/xpress/xpress.c +++ b/board/ccv/xpress/xpress.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 94e7bf194b..6cc7554c1a 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index e9262c64a5..57bbe41b8c 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c index 95cbb77753..fca7685ca7 100644 --- a/board/compulab/cm_t335/cm_t335.c +++ b/board/compulab/cm_t335/cm_t335.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index 4d171f4900..ead4700646 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c index 504a537f45..d7c59d5a32 100644 --- a/board/compulab/cm_t54/cm_t54.c +++ b/board/compulab/cm_t54/cm_t54.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 7c767fb8b4..6b3d5b833f 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index d26ac35b44..445b84c180 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 43483d526a..88a21ba433 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index dd11551428..b9f99b351a 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index 1d41690c0c..a920e262db 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index b857a5a935..74a6684274 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c index 55db26a819..18d69a7da3 100644 --- a/board/el/el6x/el6x.c +++ b/board/el/el6x/el6x.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c index b06235f291..36b620ca23 100644 --- a/board/freescale/common/cmd_esbc_validate.c +++ b/board/freescale/common/cmd_esbc_validate.c @@ -5,6 +5,7 @@ #include #include +#include #include int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc, diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c index dddfd26a13..a024e7239e 100644 --- a/board/freescale/common/fsl_chain_of_trust.c +++ b/board/freescale/common/fsl_chain_of_trust.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index ab0fe0baf1..510d7c266b 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c index 322713cced..1463e6e696 100644 --- a/board/freescale/imx8mq_evk/imx8mq_evk.c +++ b/board/freescale/imx8mq_evk/imx8mq_evk.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index e69efc4dd6..b7caa31954 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 120731422c..f42a3aa908 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index ce419dfcae..a278e2fc11 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -4,6 +4,7 @@ * Copyright 2017 NXP */ #include +#include #include #include #include diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index 2dc6d7f5f5..e5aecc4e1f 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index d023ce667d..a177815bb8 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index e1a3b47425..dc156efbbc 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 63e1dd0a83..b0c0117968 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 8ee85cc384..1c10958879 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 785247f7e2..ccbe404478 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c index 1f0f70efbd..e119347802 100644 --- a/board/freescale/mx6ullevk/mx6ullevk.c +++ b/board/freescale/mx6ullevk/mx6ullevk.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c index 6a1389eb05..3e2da0d6f8 100644 --- a/board/gardena/smart-gateway-at91sam/board.c +++ b/board/gardena/smart-gateway-at91sam/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 6e11077977..baa3e5726c 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 92edc10381..3c40a4a892 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 806525204f..917ecc4c18 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ge/common/ge_common.c b/board/ge/common/ge_common.c index 4e6ef9c480..501c8b2daf 100644 --- a/board/ge/common/ge_common.c +++ b/board/ge/common/ge_common.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index bf75bd2d46..aadf4668d9 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index dc0de620fc..6b9e6e9a09 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c index ea29dcd75e..7ae4c5cd77 100644 --- a/board/gumstix/pepper/board.c +++ b/board/gumstix/pepper/board.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 996daffa1b..9563763dfa 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index 5faf3c57f2..599e1e35bc 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index 965a009a9f..398c945990 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 367af82d4a..74fc5f0890 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -4,6 +4,7 @@ * ISEE 2007 SL, */ #include +#include #include #include #include diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c index e8f51769f6..642adf78d8 100644 --- a/board/k+p/kp_imx53/kp_id_rev.c +++ b/board/k+p/kp_imx53/kp_id_rev.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include "kp_id_rev.h" diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index b447e13461..84cddd4894 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include "kp_id_rev.h" diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c index 7bdc64b1be..2c541ace02 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 92d4a6ff61..08f7f8d884 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index 23bd21c4bc..da0634f01b 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "common.h" diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index 880ce67fa6..51778368d9 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 3db80615ef..922cc621f7 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index e7dcefacdd..4d1e38aa3a 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index dcf3d7ff89..e0f0d7c60c 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/laird/wb50n/wb50n.c b/board/laird/wb50n/wb50n.c index 89d3795857..a2f8eaf0ba 100644 --- a/board/laird/wb50n/wb50n.c +++ b/board/laird/wb50n/wb50n.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c index a7de4c2167..b4205d6ed4 100644 --- a/board/lg/sniper/sniper.c +++ b/board/lg/sniper/sniper.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 6b7ff0acb6..4dcd52625f 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c index e48b3beb16..3dbea3a98a 100644 --- a/board/logicpd/imx6/imx6logic.c +++ b/board/logicpd/imx6/imx6logic.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 5e32077d64..54716125f3 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -15,6 +15,7 @@ */ #include #include +#include #include #include #include diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 76f6ede38c..71ca79deab 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/board/overo/overo.c b/board/overo/overo.c index 8fa41f8155..f13bff1871 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -13,6 +13,7 @@ */ #include #include +#include #include #include #include diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c index e720fdc0d9..0cb85e940c 100644 --- a/board/phytec/pcm051/board.c +++ b/board/phytec/pcm051/board.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index c30df5df9d..dffd03786d 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c index 753cf2b87d..ae9ffe0390 100644 --- a/board/phytec/pfla02/pfla02.c +++ b/board/phytec/pfla02/pfla02.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index ffe1833b06..0a341e717f 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index 9ceed3ad9b..06d3d7e0f8 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c index ff6903523d..7a889646df 100644 --- a/board/qualcomm/dragonboard820c/dragonboard820c.c +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c index f5ada6e288..898abfbd85 100644 --- a/board/renesas/blanche/blanche.c +++ b/board/renesas/blanche/blanche.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index da33a0bd8a..b14ce263f7 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index 5ddddb6571..f643867806 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index 3222701ad2..2d32440aeb 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index 44f13183a5..de9f1e4a8c 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 53cd1b2907..3ef1e79980 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index e0846bcb5b..ec85f707c1 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index f8281f209a..ed9c5b50d9 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c index efc8ddf162..63ce4a20b5 100644 --- a/board/samtec/vining_fpga/socfpga.c +++ b/board/samtec/vining_fpga/socfpga.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index 96615424f6..cd224a8e1c 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -8,6 +8,7 @@ #if !defined(CONFIG_SPL_BUILD) #include +#include #include #include #include diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index 95b89dac0e..a6840b895b 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c index 1b9e83e248..0a82a5ef5c 100644 --- a/board/siemens/pxm2/board.c +++ b/board/siemens/pxm2/board.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c index 25e2ed22a6..539ecef22c 100644 --- a/board/siemens/rut/board.c +++ b/board/siemens/rut/board.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 6ea97eb4e8..d0efb67bbc 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c index 90ea8c601c..dc10b76160 100644 --- a/board/silica/pengwyn/board.c +++ b/board/silica/pengwyn/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index 533280130e..d1df8fc0cc 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index d333ccc446..f82fb0786a 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c index 927a19d05a..38d3a3de26 100644 --- a/board/technologic/ts4800/ts4800.c +++ b/board/technologic/ts4800/ts4800.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 251cd2d566..49d7979ec1 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index d29a22cf05..756b516aa6 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 7bd8c4fa66..e01adcd642 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 91e0a4c026..0138fc91fc 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -14,6 +14,7 @@ */ #include #include +#include #include #ifdef CONFIG_LED_STATUS #include diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 32fa10599e..bc89cc57bd 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "board_detect.h" diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index 93408047b2..d0b9bafbd1 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index f88aa4dfc6..20199da390 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "panda_mux_data.h" diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c index d8ee51b366..a4c094b6dc 100644 --- a/board/ti/ti814x/evm.c +++ b/board/ti/ti814x/evm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 240df8cbe1..de9e91a685 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index 50b70a501c..f8970b0b6d 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index f516e546a8..135cf0c237 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 341735153b..89f1b728fd 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index 21addaf6ed..d1ae463941 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index aa8eaa0ea1..366cfb53d7 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 9d63fbf3bd..3096dab679 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 2d560cceaf..71642a13ea 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 5f0c7aace3..5b20afd488 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index d51f648178..5c468a6a97 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c index c34a5a636b..f2c2bf47b0 100644 --- a/board/udoo/udoo.c +++ b/board/udoo/udoo.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c index dea9af9b5d..77772a6923 100644 --- a/board/varisys/common/sys_eeprom.c +++ b/board/varisys/common/sys_eeprom.c @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index c5949ad267..5f5a51bfbf 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 74d7a17028..69cdf3e9c9 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 6857f2c0b8..35191b2f81 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index c840e92d9c..dafb079a4b 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/cmd/avb.c b/cmd/avb.c index c5af4a2e46..7054601f85 100644 --- a/cmd/avb.c +++ b/cmd/avb.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/cmd/binop.c b/cmd/binop.c index 116a2c0d55..6d2df5f3dd 100644 --- a/cmd/binop.c +++ b/cmd/binop.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/cmd/dtimg.c b/cmd/dtimg.c index ae7d82f26d..6c5d53cc68 100644 --- a/cmd/dtimg.c +++ b/cmd/dtimg.c @@ -4,6 +4,7 @@ * Sam Protsenko */ +#include #include #include diff --git a/cmd/gpt.c b/cmd/gpt.c index 33cda51396..0c4349f4b2 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/cmd/ini.c b/cmd/ini.c index 8c28fa6394..f4faa7cae1 100644 --- a/cmd/ini.c +++ b/cmd/ini.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/cmd/md5sum.c b/cmd/md5sum.c index 9d2d4180c5..63cbae0364 100644 --- a/cmd/md5sum.c +++ b/cmd/md5sum.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/cmd/net.c b/cmd/net.c index 89721b8f8b..237403977e 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -9,6 +9,7 @@ */ #include #include +#include #include static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []); diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index 60a8ac84c8..ed6d09a530 100644 --- a/cmd/nvedit_efi.c +++ b/cmd/nvedit_efi.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/part.c b/cmd/part.c index 653e13ced1..6cfb67b279 100644 --- a/cmd/part.c +++ b/cmd/part.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/cmd/pxe.c b/cmd/pxe.c index 1dd0a74ea3..2059975446 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/cmd/qfw.c b/cmd/qfw.c index 7bf700538c..af826627a2 100644 --- a/cmd/qfw.c +++ b/cmd/qfw.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/common/cli_hush.c b/common/cli_hush.c index 955e8fe536..8f86e4aa4a 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -75,6 +75,7 @@ #define __U_BOOT__ #ifdef __U_BOOT__ +#include #include /* malloc, free, realloc*/ #include /* isalpha, isdigit */ #include /* readline */ diff --git a/common/console.c b/common/console.c index 0b0dd76256..4c5f7d8f1f 100644 --- a/common/console.c +++ b/common/console.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/common/hash.c b/common/hash.c index 413a5bfcda..d33e329897 100644 --- a/common/hash.c +++ b/common/hash.c @@ -12,6 +12,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #include #include diff --git a/common/hwconfig.c b/common/hwconfig.c index e9e956a322..72f3c4e0fa 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -11,6 +11,7 @@ #ifndef HWCONFIG_TEST #include #include +#include #include #include #include diff --git a/common/image-android.c b/common/image-android.c index 6c9568a655..264bf90007 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/common/main.c b/common/main.c index 07b34bf2b0..02ecd71f88 100644 --- a/common/main.c +++ b/common/main.c @@ -10,6 +10,7 @@ #include #include #include +#include #include /* diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c index c0225dc4e1..a05b867567 100644 --- a/common/spl/spl_dfu.c +++ b/common/spl/spl_dfu.c @@ -6,6 +6,7 @@ * Ravi B */ #include +#include #include #include #include diff --git a/common/update.c b/common/update.c index f237ea53bb..457b29f42a 100644 --- a/common/update.c +++ b/common/update.c @@ -17,6 +17,7 @@ #endif #include +#include #include #include #include diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index d7c080943a..9fb3ac9ccd 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c index f2489aaf82..c08bd21f95 100644 --- a/drivers/net/lan91c96.c +++ b/drivers/net/lan91c96.c @@ -46,6 +46,7 @@ #include #include +#include #include #include "lan91c96.h" #include diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c index 421aa20ea6..3bc7a35086 100644 --- a/drivers/net/ne2000_base.c +++ b/drivers/net/ne2000_base.c @@ -74,6 +74,7 @@ Add SNMP #include #include +#include #include #include #include diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c index 7e6625d020..3707ee35eb 100644 --- a/drivers/net/sandbox-raw.c +++ b/drivers/net/sandbox-raw.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 0b5a1a4796..fa49d3126f 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/env/flags.c b/env/flags.c index 79dccc05fe..7277711594 100644 --- a/env/flags.c +++ b/env/flags.c @@ -4,6 +4,7 @@ * Joe Hershberger, National Instruments, joe.hershberger@ni.com */ +#include #include #include diff --git a/examples/api/demo.c b/examples/api/demo.c index e177bf17eb..e7523786b4 100644 --- a/examples/api/demo.c +++ b/examples/api/demo.c @@ -6,6 +6,7 @@ */ #include +#include #include #include diff --git a/include/command.h b/include/command.h index 2bfee89df3..f6170e7151 100644 --- a/include/command.h +++ b/include/command.h @@ -10,6 +10,7 @@ #ifndef __COMMAND_H #define __COMMAND_H +#include #include #ifndef NULL diff --git a/include/common.h b/include/common.h index 8d8bbc4da3..739bbd400a 100644 --- a/include/common.h +++ b/include/common.h @@ -157,18 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_set() - set an environment variable - * - * This sets or deletes the value of an environment variable. For setting the - * value the variable is created if it does not already exist. - * - * @varname: Variable to adjust - * @value: Value to set for the variable, or NULL or "" to delete the variable - * @return 0 if OK, 1 on error - */ -int env_set(const char *varname, const char *value); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index dd063feb39..6770a6176d 100644 --- a/include/env.h +++ b/include/env.h @@ -71,6 +71,18 @@ int env_get_f(const char *name, char *buf, unsigned int len); */ int env_get_yesno(const char *var); +/** + * env_set() - set an environment variable + * + * This sets or deletes the value of an environment variable. For setting the + * value the variable is created if it does not already exist. + * + * @varname: Variable to adjust + * @value: Value to set for the variable, or NULL or "" to delete the variable + * @return 0 if OK, 1 on error + */ +int env_set(const char *varname, const char *value); + /** * env_get_ulong() - Return an environment variable as an integer value * diff --git a/include/env_flags.h b/include/env_flags.h index 23744e395c..f2306436b4 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -146,6 +146,7 @@ int env_flags_validate_env_set_params(char *name, char *const val[], int count); #else /* !USE_HOSTCC */ +#include #include /* diff --git a/include/exports.h b/include/exports.h index a4b862f191..0b80a67be3 100644 --- a/include/exports.h +++ b/include/exports.h @@ -3,6 +3,7 @@ #ifndef __ASSEMBLY__ #ifdef CONFIG_PHY_AQUANTIA +#include #include #endif diff --git a/include/net.h b/include/net.h index 7684076af6..0262175c81 100644 --- a/include/net.h +++ b/include/net.h @@ -14,6 +14,7 @@ #include #include /* for nton* / ntoh* stuff */ +#include #include #define DEBUG_LL_STATE 0 /* Link local state machine changes */ diff --git a/include/search.h b/include/search.h index 5d07b49073..9750336b5e 100644 --- a/include/search.h +++ b/include/search.h @@ -14,6 +14,7 @@ #ifndef _SEARCH_H_ #define _SEARCH_H_ +#include #include #define __set_errno(val) do { errno = val; } while (0) diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 889a7f2ba0..8a0e0db13e 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -5,6 +5,7 @@ * Copyright (c) 2017 Rob Clark */ +#include #include #include #include diff --git a/lib/uuid.c b/lib/uuid.c index 7d7a2749b6..527868c753 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/net/dns.c b/net/dns.c index eee8a02f7c..67d761d7c0 100644 --- a/net/dns.c +++ b/net/dns.c @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 031d558625..4e4f472431 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/net/eth_legacy.c b/net/eth_legacy.c index e250a430f3..0f558b23ce 100644 --- a/net/eth_legacy.c +++ b/net/eth_legacy.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/net/wol.c b/net/wol.c index 946bd91b47..51543343e4 100644 --- a/net/wol.c +++ b/net/wol.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include "wol.h" diff --git a/test/dm/eth.c b/test/dm/eth.c index 6e002b8dce..ad5354b4bf 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index eef12dd2b7..f06252d916 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -10,6 +10,7 @@ #define _GNU_SOURCE #include +#include #include #include #include diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index b250e2f3d7..3d2b457b31 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -4,6 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ +#include #include /* diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c index 26ba6624cd..1d193bd437 100644 --- a/tools/env/fw_env_main.c +++ b/tools/env/fw_env_main.c @@ -26,6 +26,7 @@ * of AES key), eg. '-a aabbccddeeff00112233445566778899'. */ +#include #include #include #include From patchwork Sun Jul 28 14:03:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137991 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bdpw/lxX"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPsb5HPvz9s8m for ; Mon, 29 Jul 2019 00:12:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7C1C7C21E52; Sun, 28 Jul 2019 14:10:13 +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=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 4B44AC21DD7; Sun, 28 Jul 2019 14:07:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 44D57C21DDC; Sun, 28 Jul 2019 14:06:34 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 55463C21CB6 for ; Sun, 28 Jul 2019 14:06:31 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id i10so1137246iol.13 for ; Sun, 28 Jul 2019 07:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nNRrIImtlmC+8wNbCC+b5tzlmYRShuGY3h5F2ad31Jg=; b=bdpw/lxX7OR9aQ7W+SIg5AUHACB5+qICO3VvoM7drT0gSeWNGrpCtbQHsvgQRc04Y6 nRox6+o6JKqi8JhaIohzYiGgsc8+RNmZHj0J56aOQPLJee2MnAsAdJNP/d+CnSkp9qZM GBpdookRQrqo/vJmgV38E5HlCCKYXTAgW81Wg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nNRrIImtlmC+8wNbCC+b5tzlmYRShuGY3h5F2ad31Jg=; b=Mf9D/dzYHFkauCEZm1ZqzUzfJ4VKmBRfY2LuEen8XcVF2uBdUYiBEZATnY16mzR5Rr zydN08WKTU0Gr0uwzCklNSYnJh1Bewyarp6UEVWYOhMwsv4UY5VOTc0qeWaWG6IYr4Kg 0HG8uAe1dA8jguCBhKxiHXdLkna4hCMpWkFjw9WnTL46BtcEQWKbQgCg0Stn4QcU2hwY x5C2bOXl7gapQLLOeUM4ABs9jFk6BWoIi6omSBgmd/SQOIXcOUV1LUWLzItJ6qHcQ4CR JQnD9VCaPDO7J47T5P54O+ZaaE6KUTm+/ndXrOFJmpb81qJjqMGApPo6R1OQ35lXRhQB EJCA== X-Gm-Message-State: APjAAAUsq4M4qhNL0ZVN1NcCI47ByqZyarc0y0Ju4hrJGNAenGq6HSwJ Qt85ImffoCK+ONIG7iRty1Mg5LMVcb0= X-Google-Smtp-Source: APXvYqyvqlwQzYewt/BszkTydXjX/K0h+8cyV1bidUC7OghamgN03iX8xfGZ7pKCIwabDYz/FFt3dQ== X-Received: by 2002:a5d:8c87:: with SMTP id g7mr16767659ion.85.1564322789118; Sun, 28 Jul 2019 07:06:29 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:34 -0600 Message-Id: <20190728140357.137295-18-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 17/39] env: Move env_get() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/lib/bootm.c | 1 + arch/arm/mach-imx/video.c | 1 + arch/arm/mach-kirkwood/cpu.c | 1 + arch/m68k/lib/bootm.c | 1 + arch/microblaze/lib/bootm.c | 1 + arch/nds32/lib/bootm.c | 1 + arch/powerpc/cpu/mpc85xx/mp.c | 1 + arch/powerpc/lib/bootm.c | 1 + arch/xtensa/lib/bootm.c | 1 + board/BuS/eb_cpu5282/eb_cpu5282.c | 1 + board/CarMediaLab/flea3/flea3.c | 1 + board/bluegiga/apx4devkit/apx4devkit.c | 1 + board/bluewater/gurnard/gurnard.c | 1 + board/broadcom/bcm23550_w1d/bcm23550_w1d.c | 1 + board/broadcom/bcm28155_ap/bcm28155_ap.c | 1 + board/compulab/common/omap3_display.c | 1 + board/freescale/bsc9131rdb/bsc9131rdb.c | 1 + board/freescale/bsc9132qds/bsc9132qds.c | 1 + board/freescale/c29xpcie/c29xpcie.c | 1 + board/freescale/common/vid.c | 1 + board/freescale/corenet_ds/corenet_ds.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls1088a/ls1088a.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/freescale/ls2080aqds/ls2080aqds.c | 1 + board/freescale/lx2160a/eth_lx2160aqds.c | 1 + board/freescale/mpc837xemds/pci.c | 1 + board/freescale/mpc8572ds/mpc8572ds.c | 1 + board/freescale/mx51evk/mx51evk_video.c | 1 + board/freescale/mx53loco/mx53loco_video.c | 1 + board/freescale/p1010rdb/p1010rdb.c | 1 + board/freescale/p1022ds/p1022ds.c | 1 + board/freescale/p1023rdb/p1023rdb.c | 1 + board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 1 + board/freescale/p1_twr/p1_twr.c | 1 + board/freescale/p2041rdb/p2041rdb.c | 1 + board/freescale/t102xqds/t102xqds.c | 1 + board/freescale/t102xrdb/t102xrdb.c | 1 + board/freescale/t1040qds/t1040qds.c | 1 + board/freescale/t104xrdb/t104xrdb.c | 1 + board/freescale/t208xqds/t208xqds.c | 1 + board/freescale/t208xrdb/t208xrdb.c | 1 + board/freescale/t4qds/t4240emu.c | 1 + board/freescale/t4qds/t4240qds.c | 1 + board/freescale/t4rdb/t4240rdb.c | 1 + board/gateworks/gw_ventana/common.c | 1 + board/gdsys/a38x/keyprogram.c | 1 + board/gdsys/mpc8308/hrcon.c | 1 + board/gdsys/mpc8308/strider.c | 1 + board/gdsys/p1022/controlcenterd.c | 1 + board/hisilicon/poplar/poplar.c | 1 + board/menlo/m53menlo/m53menlo.c | 1 + board/nvidia/p2371-2180/p2371-2180.c | 1 + board/nvidia/p2771-0000/p2771-0000.c | 1 + board/renesas/alt/alt.c | 1 + board/renesas/gose/gose.c | 1 + board/renesas/koelsch/koelsch.c | 1 + board/renesas/lager/lager.c | 1 + board/renesas/porter/porter.c | 1 + board/renesas/silk/silk.c | 1 + board/renesas/stout/stout.c | 1 + board/samsung/common/exynos5-dt.c | 1 + board/samsung/odroid/odroid.c | 1 + board/siemens/common/board.c | 1 + board/ti/ks2_evm/board.c | 1 + board/toradex/common/tdx-cfg-block.c | 1 + board/varisys/cyrus/cyrus.c | 1 + board/work-microwave/work_92105/work_92105_display.c | 1 + cmd/bdinfo.c | 1 + cmd/bootefi.c | 1 + cmd/bootm.c | 1 + cmd/bootmenu.c | 1 + cmd/fpga.c | 1 + cmd/itest.c | 1 + cmd/mvebu/bubt.c | 1 + common/bootretry.c | 1 + common/cli.c | 1 + common/cli_simple.c | 1 + common/fdt_support.c | 1 + common/image.c | 1 + common/spl/spl_ext.c | 1 + common/spl/spl_fat.c | 1 + common/splash.c | 1 + common/splash_source.c | 1 + common/usb_hub.c | 1 + common/usb_kbd.c | 1 + disk/part.c | 1 + disk/part_amiga.c | 1 + drivers/dfu/dfu.c | 1 + drivers/fastboot/fb_common.c | 1 + drivers/fastboot/fb_getvar.c | 1 + drivers/fastboot/fb_mmc.c | 1 + drivers/input/i8042.c | 1 + drivers/input/input.c | 1 + drivers/misc/fs_loader.c | 1 + drivers/net/dc2114x.c | 1 + drivers/net/fm/fdt.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/net/fsl_mcdmafec.c | 1 + drivers/net/ftmac100.c | 1 + drivers/net/mcffec.c | 1 + drivers/net/phy/micrel_ksz90x1.c | 1 + drivers/net/sh_eth.c | 1 + drivers/pci/fsl_pci_init.c | 1 + drivers/pci/pci.c | 1 + drivers/pci/pci_common.c | 1 + drivers/reset/reset-socfpga.c | 1 + drivers/rtc/m41t60.c | 1 + drivers/serial/usbtty.c | 1 + drivers/usb/gadget/designware_udc.c | 1 + drivers/usb/gadget/f_dfu.c | 1 + drivers/usb/gadget/f_fastboot.c | 1 + drivers/usb/gadget/f_rockusb.c | 1 + drivers/usb/host/ehci-fsl.c | 1 + drivers/video/ati_radeon_fb.c | 1 + drivers/video/cfb_console.c | 1 + drivers/video/mb862xx.c | 1 + drivers/video/mx3fb.c | 1 + drivers/video/mxsfb.c | 1 + drivers/video/videomodes.c | 1 + env/callback.c | 1 + env/eeprom.c | 1 + env/nvram.c | 1 + include/common.h | 12 ------------ include/env.h | 12 ++++++++++++ lib/efi_loader/efi_console.c | 1 + lib/smbios.c | 1 + net/link_local.c | 1 + net/tftp.c | 1 + 129 files changed, 139 insertions(+), 12 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index bf68a5ba62..1638f1e81d 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c index 22a371a212..1bc9b7cc7e 100644 --- a/arch/arm/mach-imx/video.c +++ b/arch/arm/mach-imx/video.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 8f8e300385..6ad2543438 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index 1b15430297..5b7a68b250 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 083a43c3a5..ec332944d8 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index 0cfdc52b46..a472f6a187 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 119d4b3510..3882c95f92 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 15e9c2a83e..52bcd4e6f1 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -8,6 +8,7 @@ #include +#include #include #include #include diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index aceed153d7..93eea53c5f 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index 379194803a..0b916d2482 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -11,6 +11,7 @@ #include #include "asm/m5282.h" #include +#include #include #include diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c index 9eec1b7838..be0bc228ec 100644 --- a/board/CarMediaLab/flea3/flea3.c +++ b/board/CarMediaLab/flea3/flea3.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c index 9aa87f5ccf..9268aa0daa 100644 --- a/board/bluegiga/apx4devkit/apx4devkit.c +++ b/board/bluegiga/apx4devkit/apx4devkit.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index 3cda2fafab..48e31d9065 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/board/bluewater/gurnard/gurnard.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #ifndef CONFIG_DM_ETH diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c index 72a32a2765..ce9f0494ee 100644 --- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c +++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c index 6faeb6a515..87616386cb 100644 --- a/board/broadcom/bcm28155_ap/bcm28155_ap.c +++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/compulab/common/omap3_display.c b/board/compulab/common/omap3_display.c index bc9f31ab87..cb9ebae7f9 100644 --- a/board/compulab/common/omap3_display.c +++ b/board/compulab/common/omap3_display.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c index 9d9c83f716..30e7a1f7ed 100644 --- a/board/freescale/bsc9131rdb/bsc9131rdb.c +++ b/board/freescale/bsc9131rdb/bsc9131rdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c index 36a55285e8..dd9ad90508 100644 --- a/board/freescale/bsc9132qds/bsc9132qds.c +++ b/board/freescale/bsc9132qds/bsc9132qds.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c index 8ee3e140bb..6d103be7ff 100644 --- a/board/freescale/c29xpcie/c29xpcie.c +++ b/board/freescale/c29xpcie/c29xpcie.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index 0ca389c9ae..b804971981 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #ifdef CONFIG_FSL_LSCH2 diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index b166faf326..3ce9a76aae 100644 --- a/board/freescale/corenet_ds/corenet_ds.c +++ b/board/freescale/corenet_ds/corenet_ds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index f16b78cf03..d4ab9791e9 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 6d11a134dc..a1c9eb3f46 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -3,6 +3,7 @@ * Copyright 2017-2018 NXP */ #include +#include #include #include #include diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c index f706fd4cb6..1b4e6c65fb 100644 --- a/board/freescale/ls2080aqds/eth.c +++ b/board/freescale/ls2080aqds/eth.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index a0a3301691..e9e0999a18 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -3,6 +3,7 @@ * Copyright 2015 Freescale Semiconductor */ #include +#include #include #include #include diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c index f6e22d7337..92c06e5060 100644 --- a/board/freescale/lx2160a/eth_lx2160aqds.c +++ b/board/freescale/lx2160a/eth_lx2160aqds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c index 4217638952..41b78cf5e4 100644 --- a/board/freescale/mpc837xemds/pci.c +++ b/board/freescale/mpc837xemds/pci.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c index 6abeeba43b..89f4d6c05f 100644 --- a/board/freescale/mpc8572ds/mpc8572ds.c +++ b/board/freescale/mpc8572ds/mpc8572ds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mx51evk/mx51evk_video.c b/board/freescale/mx51evk/mx51evk_video.c index 995fb9a9ab..3715c5d738 100644 --- a/board/freescale/mx51evk/mx51evk_video.c +++ b/board/freescale/mx51evk/mx51evk_video.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mx53loco/mx53loco_video.c b/board/freescale/mx53loco/mx53loco_video.c index 160af1ef0d..ff3fc8ce3e 100644 --- a/board/freescale/mx53loco/mx53loco_video.c +++ b/board/freescale/mx53loco/mx53loco_video.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index b0db353167..449df937e6 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c index 835ede562e..9406e75517 100644 --- a/board/freescale/p1022ds/p1022ds.c +++ b/board/freescale/p1022ds/p1022ds.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c index d0012ea38b..7db04043ca 100644 --- a/board/freescale/p1023rdb/p1023rdb.c +++ b/board/freescale/p1023rdb/p1023rdb.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 4b151e8ef3..a04a73528f 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c index fe99ebf4b2..01cac181b3 100644 --- a/board/freescale/p1_twr/p1_twr.c +++ b/board/freescale/p1_twr/p1_twr.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index 6324027c8a..baf1506908 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c index d770aebebb..6c754503d1 100644 --- a/board/freescale/t102xqds/t102xqds.c +++ b/board/freescale/t102xqds/t102xqds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index acc0be07c5..793f54d69e 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 911190b1fe..55516b9f06 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index c9557b465f..c7a645108f 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index abd069fdfe..86d6b1defe 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index adae3f96ca..d03d48bcfa 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c index 512229a380..d9cb967c22 100644 --- a/board/freescale/t4qds/t4240emu.c +++ b/board/freescale/t4qds/t4240emu.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index 125bfa31bf..bb18b97e6a 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 3bfebb6214..0c95607762 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c index a543916615..1240a9da17 100644 --- a/board/gateworks/gw_ventana/common.c +++ b/board/gateworks/gw_ventana/common.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c index 291edc340d..000897984a 100644 --- a/board/gdsys/a38x/keyprogram.c +++ b/board/gdsys/a38x/keyprogram.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c index d14a28ec94..60faa4688c 100644 --- a/board/gdsys/mpc8308/hrcon.c +++ b/board/gdsys/mpc8308/hrcon.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c index 1fdea675bd..886bc2b035 100644 --- a/board/gdsys/mpc8308/strider.c +++ b/board/gdsys/mpc8308/strider.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index 7bdc924a89..6eb3d6c5d0 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 77948445e2..4926419a90 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -155,6 +155,7 @@ static void usb2_phy_init(void) } #if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG) +#include #include #include #include diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index a63af5fae0..bda5f0df5b 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c index 4985302d6b..b1da5c9982 100644 --- a/board/nvidia/p2371-2180/p2371-2180.c +++ b/board/nvidia/p2371-2180/p2371-2180.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c index d294c7ae01..8c91b75f96 100644 --- a/board/nvidia/p2771-0000/p2771-0000.c +++ b/board/nvidia/p2771-0000/p2771-0000.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 0726776a57..77979704be 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index 7c61008739..bffa85c232 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index d07a7ca2ab..1bb3b492e2 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index f062bb0172..bda3295bad 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index 2e15a4cbbd..d3afc2a400 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index 59ba262ad7..bda6a414e6 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c index 7c515950d6..95b5711fdb 100644 --- a/board/renesas/stout/stout.c +++ b/board/renesas/stout/stout.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index 87eb381345..387d1b9180 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 3e594fd850..9aa97f0f2c 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index 622bde5f9f..676935a843 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index eed62e9cac..e9bc68049b 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -8,6 +8,7 @@ #include #include "board.h" +#include #include #include #include diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index f69c4433b2..20e1891eec 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -20,6 +20,7 @@ #endif #include #include +#include #include #include #include diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c index 4ccce8a736..fa02fefefa 100644 --- a/board/varisys/cyrus/cyrus.c +++ b/board/varisys/cyrus/cyrus.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c index ffa0fcfa87..db04dcabc7 100644 --- a/board/work-microwave/work_92105/work_92105_display.c +++ b/board/work-microwave/work_92105/work_92105_display.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index f576e226ee..06aa1aa9f8 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -9,6 +9,7 @@ */ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/cmd/bootefi.c b/cmd/bootefi.c index a45bfd139f..f613cce7e2 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootm.c b/cmd/bootm.c index 41b341e2e5..b326ac9b43 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 7f88c1ed63..7eeed9060c 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/fpga.c b/cmd/fpga.c index aacf09f002..cc6bdaeece 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -9,6 +9,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/itest.c b/cmd/itest.c index fd6f4166f1..8b630d71e6 100644 --- a/cmd/itest.c +++ b/cmd/itest.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index b4d371f305..84d2d531f0 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/common/bootretry.c b/common/bootretry.c index 072055b010..47aaaa8220 100644 --- a/common/bootretry.c +++ b/common/bootretry.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/common/cli.c b/common/cli.c index f4054fb1fc..49b910666b 100644 --- a/common/cli.c +++ b/common/cli.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/common/cli_simple.c b/common/cli_simple.c index 311880ad56..6c881c133c 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #define DEBUG_PARSER 0 /* set to 1 to debug */ diff --git a/common/fdt_support.c b/common/fdt_support.c index 86de5b8f05..baf7924ff6 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/common/image.c b/common/image.c index 9f9538fac2..eaff468b7b 100644 --- a/common/image.c +++ b/common/image.c @@ -8,6 +8,7 @@ #ifndef USE_HOSTCC #include +#include #include #ifdef CONFIG_SHOW_BOOT_PROGRESS diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c index fe05223605..2a6252229c 100644 --- a/common/spl/spl_ext.c +++ b/common/spl/spl_ext.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include #include diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index 163e540622..aa371ab52c 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/common/splash.c b/common/splash.c index 79d50577ee..e15cc847b6 100644 --- a/common/splash.c +++ b/common/splash.c @@ -21,6 +21,7 @@ */ #include +#include #include #include diff --git a/common/splash_source.c b/common/splash_source.c index 8f276a34ca..d37b4b304c 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/common/usb_hub.c b/common/usb_hub.c index 9069f4b33a..25c2ac4345 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/common/usb_kbd.c b/common/usb_kbd.c index cc99c6be07..3873737461 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/disk/part.c b/disk/part.c index 7e84214731..8982ef3bae 100644 --- a/disk/part.c +++ b/disk/part.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/disk/part_amiga.c b/disk/part_amiga.c index 86d008d476..5a2bb718b5 100644 --- a/disk/part_amiga.c +++ b/disk/part_amiga.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include "part_amiga.h" diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 318949529b..d2b67b18cf 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index 17eca73be0..e76af8ecc3 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c index bf957e8326..149e1d565d 100644 --- a/drivers/fastboot/fb_getvar.c +++ b/drivers/fastboot/fb_getvar.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 0a335db3a6..b0b19c5762 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index 9a5dc46207..98015899f2 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/input/input.c b/drivers/input/input.c index 4f514dba56..6ab378b979 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index f42eeff8f6..88e486e9d5 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index e3c403c13f..43c2253f10 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ #include +#include #include #include #include diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c index 6125797125..72d1294751 100644 --- a/drivers/net/fm/fdt.c +++ b/drivers/net/fm/fdt.c @@ -3,6 +3,7 @@ * Copyright 2016 Freescale Semiconductor, Inc. */ #include +#include #include /* For struct qe_firmware */ #ifdef CONFIG_SYS_DPAA_FMAN diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index cc59b21f9f..1d96e4bdc2 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -5,6 +5,7 @@ * Copyright 2017-2018 NXP */ #include +#include #include #include #include diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index 88309b186c..41752c0b6a 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index c08889c4b1..d8f1dde657 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 2b54e3a549..a8553cbbc2 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c index f18e40a2fe..0105fc5af1 100644 --- a/drivers/net/phy/micrel_ksz90x1.c +++ b/drivers/net/phy/micrel_ksz90x1.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index da79b766a6..dfc41bcbc4 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index b4c8556686..ab5e49941f 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -4,6 +4,7 @@ */ #include +#include #include #include diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e2195726c8..5db24f1c51 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c index 9f2d2678e3..5231b69dc9 100644 --- a/drivers/pci/pci_common.c +++ b/drivers/pci/pci_common.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index ee4cbcb02f..8feccf8d4e 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c index c84c8e11b3..532d2105e1 100644 --- a/drivers/rtc/m41t60.c +++ b/drivers/rtc/m41t60.c @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index d0465b844e..76d9c8a3a6 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include "usbtty.h" diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index fa947dade6..432f312cee 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -10,6 +10,7 @@ #include #include +#include #include #include "ep0.h" #include diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c index 30ece524a8..cc8c76089d 100644 --- a/drivers/usb/gadget/f_dfu.c +++ b/drivers/usb/gadget/f_dfu.c @@ -14,6 +14,7 @@ * (C) Copyright 2006 by Harald Welte */ +#include #include #include #include diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 3ad4346f2d..fc27dbe8de 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index f3d24772cd..1cfeabcd31 100644 --- a/drivers/usb/gadget/f_rockusb.c +++ b/drivers/usb/gadget/f_rockusb.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index b8f8e7a794..ced295ef0f 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c index 87557e52c0..6fce033636 100644 --- a/drivers/video/ati_radeon_fb.c +++ b/drivers/video/ati_radeon_fb.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index ac02921d46..e5c077e4f5 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -65,6 +65,7 @@ */ #include +#include #include #include #include diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c index 1a3c970b3d..301c1f0df1 100644 --- a/drivers/video/mb862xx.c +++ b/drivers/video/mb862xx.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include "videomodes.h" diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 176ae70b7c..a984443ef9 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -6,6 +6,7 @@ * HALE electronic GmbH, */ #include +#include #include #include diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index f02ba20138..8e24b0fafc 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include #include diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c index d7614329ff..ac25b45f81 100644 --- a/drivers/video/videomodes.c +++ b/drivers/video/videomodes.c @@ -58,6 +58,7 @@ #include #include +#include #include #include diff --git a/env/callback.c b/env/callback.c index 54d2de4a96..95be80d454 100644 --- a/env/callback.c +++ b/env/callback.c @@ -5,6 +5,7 @@ */ #include +#include #include #if defined(CONFIG_NEEDS_MANUAL_RELOC) diff --git a/env/eeprom.c b/env/eeprom.c index ac2689cc14..8d82cf892c 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #if defined(CONFIG_I2C_ENV_EEPROM_BUS) diff --git a/env/nvram.c b/env/nvram.c index df1b37913d..a5b1873aaf 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 739bbd400a..70f40daa9e 100644 --- a/include/common.h +++ b/include/common.h @@ -145,18 +145,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); /* common/cmd_ext2.c */ int do_ext2load(cmd_tbl_t *, int, int, char * const []); -/** - * env_get() - Look up the value of an environment variable - * - * In U-Boot proper this can be called before relocation (which is when the - * environment is loaded from storage, i.e. GD_FLG_ENV_READY is 0). In that - * case this function calls env_get_f(). - * - * @varname: Variable to look up - * @return value of variable, or NULL if not found - */ -char *env_get(const char *varname); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index 6770a6176d..297fd7a071 100644 --- a/include/env.h +++ b/include/env.h @@ -51,6 +51,18 @@ void env_relocate(void); */ int env_match(unsigned char *name, int index); +/** + * env_get() - Look up the value of an environment variable + * + * In U-Boot proper this can be called before relocation (which is when the + * environment is loaded from storage, i.e. GD_FLG_ENV_READY is 0). In that + * case this function calls env_get_f(). + * + * @varname: Variable to look up + * @return value of variable, or NULL if not found + */ +char *env_get(const char *varname); + /** * env_get_f() - Look up the value of an environment variable (early) * diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 6c8229da42..d4765afb98 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/lib/smbios.c b/lib/smbios.c index e8ee55c4ae..7b74971f68 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/net/link_local.c b/net/link_local.c index 31cdef4083..dd9fcad087 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -12,6 +12,7 @@ */ #include +#include #include #include "arp.h" #include "net_rand.h" diff --git a/net/tftp.c b/net/tftp.c index 34488b76c8..5a69bca641 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include From patchwork Sun Jul 28 14:03:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137992 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SMu/MS+O"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPsk6sRMz9s8m for ; Mon, 29 Jul 2019 00:12:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8B324C21EB4; Sun, 28 Jul 2019 14:11:26 +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_MSPIKE_H2, 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 1E2C8C21E08; Sun, 28 Jul 2019 14:08:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DBDDBC21DB5; Sun, 28 Jul 2019 14:06:34 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 0DBC1C21E07 for ; Sun, 28 Jul 2019 14:06:32 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id i10so1137281iol.13 for ; Sun, 28 Jul 2019 07:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tiDyYVvRQ7ZsDfGL8UQ32aibQQlvq6SS5xo82JDThSg=; b=SMu/MS+Ox+yLxJcmbm4kL8QdAbGP7/Lq0Ve+fMcMwtfXWR4qbYdwx9oKAX34d9q77o 1VMFOD4216QaP/KvIK/F0erIElSRaey4JQb64jfu7CeVxxQdT2UYEimog7nKshsIohxo BDx3rOqNlGlBWMRRUXO+0Zo8YEkdPT0vB2eSI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tiDyYVvRQ7ZsDfGL8UQ32aibQQlvq6SS5xo82JDThSg=; b=Cm2J/UGt6S7whmcFfcoTAQ+w74WOuabsW4D/ctsxsIZpe5RW58vOkh+aHjYhWYU3Ac mpVvaTc15meADVqi+Io4Dc+wYqDzqV6/4aVM+UCnifDao56CxNy9YvPNGqKr5QVCz7uI GZy0SJ8grSqWyuNwIS/F3jAPdZ54uHKsqmro9nuQdbSQInzK4R8YcUJOJRoqE45kdher aTkmojvSQtbmpt5MkCtdbdl58pMKE1wt9TlpP/smTXlAAFhrc8yRuenSdHXgO6FpTMPM 61xS+HL4k3ZP3H7D4/D+bn2h2LA6OWKvU6m7e7XsH4E/9g+uyZlB4lBRtI+QpOt3KI+t 0+ww== X-Gm-Message-State: APjAAAUUYSyHEwSw8tcCM3qU1L64Rg16DRss6i7OhX7eYrFdwOb/tAbE 2YpA8FAeFVL/rH2F73FplOSyzEzGHaA= X-Google-Smtp-Source: APXvYqzZAepS6lXzURK+e+ETXa2PDwQWjV8DoSEWdYX2FXeATr9k9mk573rKjAP4978Y73hoi8dVsw== X-Received: by 2002:a5d:8249:: with SMTP id n9mr82100126ioo.14.1564322790935; Sun, 28 Jul 2019 07:06:30 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:30 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:35 -0600 Message-Id: <20190728140357.137295-19-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 18/39] env: Move eth_env_get/set_enetaddr() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move these two functions over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 18 ++++++++++++++++++ include/environment.h | 2 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/env.h b/include/env.h index 297fd7a071..2e9a850284 100644 --- a/include/env.h +++ b/include/env.h @@ -164,4 +164,22 @@ static inline int env_set_addr(const char *varname, const void *addr) int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, bool dollar_comp); +/** + * eth_env_get_enetaddr() - Get an ethernet address from the environmnet + * + * @name: Environment variable to get (e.g. "ethaddr") + * @enetaddr: Place to put MAC address (6 bytes) + * @return 0 if OK, 1 on error + */ +int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); + +/** + * eth_env_set_enetaddr() - Set an ethernet address in the environmnet + * + * @name: Environment variable to set (e.g. "ethaddr") + * @enetaddr: Pointer to MAC address to put into the variable (6 bytes) + * @return 0 if OK, 1 on error + */ +int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); + #endif diff --git a/include/environment.h b/include/environment.h index de67cf4f0e..77915f459e 100644 --- a/include/environment.h +++ b/include/environment.h @@ -326,8 +326,6 @@ int env_erase(void); void env_fix_drivers(void); void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); -int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); -int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); #endif /* DO_DEPS_ONLY */ From patchwork Sun Jul 28 14:03:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138019 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="JhvlRDTa"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQCJ272sz9s4Y for ; Mon, 29 Jul 2019 00:27:56 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F2368C21E31; Sun, 28 Jul 2019 14:13:47 +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=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 2C750C21E0D; Sun, 28 Jul 2019 14:08:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 23FF8C21DD9; Sun, 28 Jul 2019 14:06:37 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id BBBE3C21DB5 for ; Sun, 28 Jul 2019 14:06:33 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id e20so84096356iob.9 for ; Sun, 28 Jul 2019 07:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BcIYkpX6F4kI2smoaoOmI7Me9j8k4kpf3kgJvdoap1c=; b=JhvlRDTaoL+tX6rTCqPtqoVJg8btUqSQKIPdtfGnjT4Imx/Ml8l6SW2O43QN0P9iye FbCrWXR+NNPwVLHnNbFokMnjgpj6W7uMPdnceWKn++6ivRYsudj6BXXbKIJEp4cWh8j2 YLTNTptFvu7fd9wR9YE7L6Yvwk8wWJ4H2FcUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BcIYkpX6F4kI2smoaoOmI7Me9j8k4kpf3kgJvdoap1c=; b=YnNf9Pf9NBZqkcS3SNh5r35zehtahl6ya+0hbzCscpY1n5EgpSovlH3NBp9nE6vgWK +XSdQP5KPwlGefIvrfSoP4gKGvaGhCB5ww0+HymDY/l5QiZr/ff1IaqKPjXpS4gGFa10 oF5Lx2t8Gdx4KHCebk5uZ2I8Zuv/9r1Y8OkLkhELop4JcXqgyg47HSd1lh9DI8ypLtrG +/9VnavF9A6pbyGqo5vPFnnREPur2Y+ylQ7TdHi/WokEz0M6O4i6oLlzDkXSfcsWrUcZ zIyIJASnpz9QH+DbBQltH6SoUzicGqrc0DFWwYnqyD69Nu6PxN7XzuHUpztZvbzsbVxn FYpw== X-Gm-Message-State: APjAAAX8BLhiDW/F+fDYo0mEFRIIcPO42pjtLhwH/ixl7BxfB1ay3pTz 8DRwkFqxYc8URiwB29bQ3Tl+YNZth7A= X-Google-Smtp-Source: APXvYqwFgGbN78WuciVIShFFZl2Wjs6KNqG15e3qGupOD9Ko7sELhsWsRmW2LIQJLBzpAU+2MPOTvQ== X-Received: by 2002:a5e:d817:: with SMTP id l23mr26549623iok.282.1564322792655; Sun, 28 Jul 2019 07:06:32 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:32 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:36 -0600 Message-Id: <20190728140357.137295-20-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 19/39] env: Move uncommon functions to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move eth_parse_enetaddr() and env_fix_drivers() over to the new header file. Signed-off-by: Simon Glass --- cmd/ethsw.c | 1 + include/env.h | 16 ++++++++++++++++ include/environment.h | 7 ------- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cmd/ethsw.c b/cmd/ethsw.c index 473324f878..0b57a69f2f 100644 --- a/cmd/ethsw.c +++ b/cmd/ethsw.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/include/env.h b/include/env.h index 2e9a850284..924b327c44 100644 --- a/include/env.h +++ b/include/env.h @@ -182,4 +182,20 @@ int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); */ int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); +/** + * eth_parse_enetaddr() - Parse a MAC address + * + * Convert a string MAC address + * + * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit + * hex value + * @enetaddr: Place to put MAC address (6 bytes) + */ +void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); + +/** + * env_fix_drivers() - Updates envdriver as per relocation + */ +void env_fix_drivers(void); + #endif diff --git a/include/environment.h b/include/environment.h index 77915f459e..7be1ef98ad 100644 --- a/include/environment.h +++ b/include/environment.h @@ -320,13 +320,6 @@ int env_save(void); */ int env_erase(void); -/** - * env_fix_drivers() - Updates envdriver as per relocation - */ -void env_fix_drivers(void); - -void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); - #endif /* DO_DEPS_ONLY */ #endif /* _ENVIRONMENT_H_ */ From patchwork Sun Jul 28 14:03:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138011 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="V8Yb19sR"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ8t2r1Xz9s4Y for ; Mon, 29 Jul 2019 00:25:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F0AC6C21E18; Sun, 28 Jul 2019 14:14:07 +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=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 726E5C21C2F; Sun, 28 Jul 2019 14:08:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A8ECDC21E18; Sun, 28 Jul 2019 14:06:39 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 55D7BC21E2F for ; Sun, 28 Jul 2019 14:06:36 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id j5so110363269ioj.8 for ; Sun, 28 Jul 2019 07:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CinBlh2+VbnV6KFoz+u8ALe+3jcIWRqBHKIk7HzjesA=; b=V8Yb19sRswF/IVtOmC0bJ8VFZUVYrG/ZNeeMDl+0VcRYWQ3H27SN/oBRyAhfdcZ8mX WlSF5cY240oFdus6seDWa3E8Us9Sh+F7DM+MBJNWnDCGSy1ugEKf2INtwUJ0BGTppMj1 Sfng0t7OveQLwsifQ4+LD+X4cIMl2OpfTFcgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CinBlh2+VbnV6KFoz+u8ALe+3jcIWRqBHKIk7HzjesA=; b=n6xaj2EYjyTjKoDs5a/Qh2qpYYQvrv63NFvCxMtzjo3qdizHq9TTV3x7fyU87DFknF aTvouVltMyihWAfRkaz+IdH2aEuatasJwu+SRiQ/8AH/D+jcOSmX56Zg2MuTy2MlwczF 2jtJqel2qPFHXYJuonkcDn3Jju8Bi+CNjoUfXiXmiPmKY9KlhSU6iaXd736OjIi4SYJE S0e11SXWzknvZEfWpC5+cUaT00tQW54OacwuUuByLX68iEBcfgHIcWRMPrFgTACZWDGp WkNOyOajj5QZMwYT6Y+My2x/+fBPtKJGPf5gufO7tBSKXLrXqBKDZh55Lq3TpR7tjhpM oz3A== X-Gm-Message-State: APjAAAVwEyUf+ghbBRK6hRq0UddZvoFxidgPEFErEj1CbLfWI6MeEZsp Tf1fsSm/si6YtHy7+MFxqxk/EZPnaOI= X-Google-Smtp-Source: APXvYqzLAM1ote0KRscjhfhpxXwt9+0aBWetZWUfispRAc1lHowTrmpds6ZkMyvckhbo8/+9PvG1ag== X-Received: by 2002:a6b:1ca:: with SMTP id 193mr100548738iob.264.1564322795172; Sun, 28 Jul 2019 07:06:35 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:34 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:37 -0600 Message-Id: <20190728140357.137295-21-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 20/39] env: Move set_default_vars to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move this function to the new header file and rename it so it has an env_ prefix. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- cmd/nvedit.c | 2 +- env/common.c | 2 +- include/env.h | 11 +++++++++++ include/environment.h | 3 --- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 751b77d0e9..390d040de3 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -832,7 +832,7 @@ static int do_env_default(cmd_tbl_t *cmdtp, int flag, } if (!all && (argc > 0)) { /* Reset individual variables */ - set_default_vars(argc, argv, env_flag); + env_set_default_vars(argc, argv, env_flag); return 0; } diff --git a/env/common.c b/env/common.c index 1fbc4a874d..db2a033f68 100644 --- a/env/common.c +++ b/env/common.c @@ -92,7 +92,7 @@ void set_default_env(const char *s, int flags) /* [re]set individual variables to their value in the default environment */ -int set_default_vars(int nvars, char * const vars[], int flags) +int env_set_default_vars(int nvars, char * const vars[], int flags) { /* * Special use-case: import from default environment diff --git a/include/env.h b/include/env.h index 924b327c44..5c01cd3d6d 100644 --- a/include/env.h +++ b/include/env.h @@ -198,4 +198,15 @@ void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); */ void env_fix_drivers(void); +/** + * env_set_default_vars() - reset variables to their default value + * + * This resets individual variables to their value in the default environment + * + * @nvars: Number of variables to set/reset + * @vars: List of variables to set/reset + * @flags: Flags controlling matching (H_... - see search.h) + */ +int env_set_default_vars(int nvars, char *const vars[], int flags); + #endif diff --git a/include/environment.h b/include/environment.h index 7be1ef98ad..97d4886599 100644 --- a/include/environment.h +++ b/include/environment.h @@ -274,9 +274,6 @@ char *env_get_default(const char *name); /* [re]set to the default environment */ void set_default_env(const char *s, int flags); -/* [re]set individual variables to their value in the default environment */ -int set_default_vars(int nvars, char * const vars[], int flags); - /* Import from binary representation into hash table */ int env_import(const char *buf, int check); From patchwork Sun Jul 28 14:03:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138018 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="iv9UlyVI"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQCB2XFHz9s4Y for ; Mon, 29 Jul 2019 00:27:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F1C7FC21DD3; Sun, 28 Jul 2019 14:13:57 +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=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 B3634C21D9A; Sun, 28 Jul 2019 14:08:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 806A6C21E16; Sun, 28 Jul 2019 14:06:41 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 5D2A8C21DB5 for ; Sun, 28 Jul 2019 14:06:38 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id z3so4807212iog.0 for ; Sun, 28 Jul 2019 07:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qI6pbaS7Uw1cVnD+3mXZh82NSkhdIPjHG+feEH7M5nk=; b=iv9UlyVIBlBhnt8oDrgIfFOXGqXig95MHSsrePds4kh0lAIdZghuzwQ+w8H4TMMNu9 FRdB4M8zmDHcZMeuNQywDFWonlgKCCCZwTenN+bjexDSHD8Yq3ZxEyTP/QfIshs7EJ5D lBFm8Chz+sK4Iai20YzAU7hganBShTMmvALmU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qI6pbaS7Uw1cVnD+3mXZh82NSkhdIPjHG+feEH7M5nk=; b=Qg8uqgCjQFqaWc8LSZcONQ9kdTPcPvRrI62iT/72HZFDZnwrAExpWFkhaIK5Y/Jfxy q/QBbY8IJZXiURjd+JIpaAh+NL3m2Vii3xmmlC9ShmW0mXGcKhOB/FXafYbI7ILQ2Nu5 oBgwdV7fVa7znEbnHnpM0Q99KnWC6DwN1ilnn5vrINKr+vii7i6mmBJymQmVjewOOsJx FS1EInzjLrtT3qepe2UKu9T3pNbXEtHGPCu3qN1vRt1k43D8bF9NX1P5e6/g2sXhobST HrrYBsL5tLaSCF/6XejN4ssbC0tS1DYdt7QNyXMGztXLXo2108dT1doJm8yWhlirLOJZ WIag== X-Gm-Message-State: APjAAAXKRrqRdMwmkNYGlZyA8lFhy8cxG10dzcbPk0irmdSIhfE09ZO/ xtfvP6iRWlbsZVQykGHATFxdA2lI2Ec= X-Google-Smtp-Source: APXvYqx0DICicylJqmyF6po8QYBKDTP4ua173vs499Q1rcc4Td4nnOqDFc7pOMPdKsi0PiYmj8f6OQ== X-Received: by 2002:a6b:fb0f:: with SMTP id h15mr98689156iog.266.1564322797124; Sun, 28 Jul 2019 07:06:37 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:36 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:38 -0600 Message-Id: <20190728140357.137295-22-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 21/39] env: Move env_load/save functions to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move these function to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 21 +++++++++++++++++++++ include/environment.h | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/env.h b/include/env.h index 5c01cd3d6d..2ba345fc4a 100644 --- a/include/env.h +++ b/include/env.h @@ -209,4 +209,25 @@ void env_fix_drivers(void); */ int env_set_default_vars(int nvars, char *const vars[], int flags); +/** + * env_load() - Load the environment from storage + * + * @return 0 if OK, -ve on error + */ +int env_load(void); + +/** + * env_save() - Save the environment to storage + * + * @return 0 if OK, -ve on error + */ +int env_save(void); + +/** + * env_erase() - Erase the environment on storage + * + * @return 0 if OK, -ve on error + */ +int env_erase(void); + #endif diff --git a/include/environment.h b/include/environment.h index 97d4886599..b921b8f28e 100644 --- a/include/environment.h +++ b/include/environment.h @@ -296,27 +296,6 @@ int env_import_redund(const char *buf1, int buf1_status, */ int env_get_char(int index); -/** - * env_load() - Load the environment from storage - * - * @return 0 if OK, -ve on error - */ -int env_load(void); - -/** - * env_save() - Save the environment to storage - * - * @return 0 if OK, -ve on error - */ -int env_save(void); - -/** - * env_erase() - Erase the environment on storage - * - * @return 0 if OK, -ve on error - */ -int env_erase(void); - #endif /* DO_DEPS_ONLY */ #endif /* _ENVIRONMENT_H_ */ From patchwork Sun Jul 28 14:03:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138010 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SX6LBSuH"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ8b3t07z9s4Y for ; Mon, 29 Jul 2019 00:25:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 36087C21E35; Sun, 28 Jul 2019 14:14:19 +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=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 AF065C21DB3; Sun, 28 Jul 2019 14:08:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 78AE9C21E16; Sun, 28 Jul 2019 14:06:42 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 26B32C21DED for ; Sun, 28 Jul 2019 14:06:40 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id j5so110363450ioj.8 for ; Sun, 28 Jul 2019 07:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eTzJjpXah/A+mnMuOFlNu9SEyL3ITpTRKowlmWkH5sY=; b=SX6LBSuHKGlzQZCCx5sque3sz2Bd+/nGfIMXGTBgK/LqOs0b++flZ0+B9ASNwlJBIu yD+6KLCQXehr9mlnL9xHpGWFHGxsudlfCBv05HWhEn5h4WgAeQ1Ex15WFnjU50NPqSjs ALgTXxKP38POAGRzFP8amBXUEBPN9jIPlkFVA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eTzJjpXah/A+mnMuOFlNu9SEyL3ITpTRKowlmWkH5sY=; b=sWDfL12DEMc8CwWVzQW07eKcUe+be4/hut1cCzobfuJsNOVJI4QK1Cc2/baA/TdMH8 S4p5lCIhkmXKnLOfJCyxnv8EKI6iGCPRfFcKIDNWUQyg+VAHcWLW+ggmBrEXU/hZ5eS8 Ilg4z+sw/k1Ii0DjdK8kA0Yr6EvSqj9v3waCOShH3r/ypxwcF18Io3DZu+i8hy21dYkM H9tp5R4ytBXNF0Bnxxcu9JInezB+g15pvEteL2Qm2v+fSxGDOJR11B2Ac2+h0g4UbhC8 Ny0cgEVkabG8LyfvqnNErvRciy1t9ZNxzuF6NBxA/j3IVZ+SRgDOX0dfUZcQ3YLg98DY LiZg== X-Gm-Message-State: APjAAAWeGwg5aXbUTCTOh3IleNGCZOsCZF1eltrWR/Xs0s5fo9wf7/+/ 9TfALLlrFiay5C+uL6WG7/Iyljvf7Ns= X-Google-Smtp-Source: APXvYqxmtBmjKDIjm9Hy1XJf7m/+NM2KhI7dYUd8Ehro8Lip6SoDC/SwboOZ36BDBiyffzMcz78pdg== X-Received: by 2002:a02:3f0a:: with SMTP id d10mr33896150jaa.23.1564322799041; Sun, 28 Jul 2019 07:06:39 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.38 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:38 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:39 -0600 Message-Id: <20190728140357.137295-23-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 22/39] env: Move env import/export functions to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move these functions to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 38 ++++++++++++++++++++++++++++++++++++++ include/environment.h | 12 ------------ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/include/env.h b/include/env.h index 2ba345fc4a..d6718fdf99 100644 --- a/include/env.h +++ b/include/env.h @@ -12,6 +12,8 @@ #include #include +struct environment_s; + /** * env_get_id() - Gets a sequence number for the environment * @@ -230,4 +232,40 @@ int env_save(void); */ int env_erase(void); +/** + * env_import() - Import from a binary representation into hash table + * + * This imports the environment from a buffer. THe format for each variable is + * var=value\0 with a double \0 at the end of the buffer. + * + * @buf: Buffer containing the environment (struct environemnt_s *) + * @check: non-zero to check the CRC at the start of the environment, 0 to + * ignore it + * @return 0 if imported successfully, -ENOMSG if the CRC was bad, -EIO if + * something else went wrong + */ +int env_import(const char *buf, int check); + +/** + * env_export() - Export the environment to a buffer + * + * Export from hash table into binary representation + * + * @env_out: Buffer to contain the environment (must be large enough!) + * @return 0 if OK, 1 on error + */ +int env_export(struct environment_s *env_out); + +/** + * env_import_redund() - Select and import one of two redundant environments + * + * @buf1: First environment (struct environemnt_s *) + * @buf1_read_fail: 0 if buf1 is valid, non-zero if invalid + * @buf2: Second environment (struct environemnt_s *) + * @buf2_read_fail: 0 if buf2 is valid, non-zero if invalid + * @return 0 if OK, -EIO if no environment is valid, -ENOMSG if the CRC was bad + */ +int env_import_redund(const char *buf1, int buf1_read_fail, + const char *buf2, int buf2_read_fail); + #endif diff --git a/include/environment.h b/include/environment.h index b921b8f28e..c740d5a216 100644 --- a/include/environment.h +++ b/include/environment.h @@ -274,18 +274,6 @@ char *env_get_default(const char *name); /* [re]set to the default environment */ void set_default_env(const char *s, int flags); -/* Import from binary representation into hash table */ -int env_import(const char *buf, int check); - -/* Export from hash table into binary representation */ -int env_export(env_t *env_out); - -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT -/* Select and import one of two redundant environments */ -int env_import_redund(const char *buf1, int buf1_status, - const char *buf2, int buf2_status); -#endif - /** * env_get_char() - Get a character from the early environment * From patchwork Sun Jul 28 14:03:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138015 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="RUbrP1lf"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQBj5dhxz9s4Y for ; Mon, 29 Jul 2019 00:27:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6E6C3C21D74; Sun, 28 Jul 2019 14:13:38 +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=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 75694C21C6A; Sun, 28 Jul 2019 14:08:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E58F4C21E16; Sun, 28 Jul 2019 14:06:44 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id D7291C21D72 for ; Sun, 28 Jul 2019 14:06:41 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id i10so1137722iol.13 for ; Sun, 28 Jul 2019 07:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWX1+lCIZcnvA2+WmU9BxgS96eStYconM0Zdp27wT+4=; b=RUbrP1lfLR+Qj8dZPeF2F/dKryZakALJ+LmZsyOiVkWfEGPUeSIxA/sO0VA4QbtZwr yYm7qxN6g3K9/oKAUx+4BlW7AtW3RIpaXzg6TdcF7JFBN3xlgNXjVpYE+IoqFtZeokqm lMkz0eplkARz8axwrX8W9TQZAsVUtJuNbW82g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWX1+lCIZcnvA2+WmU9BxgS96eStYconM0Zdp27wT+4=; b=f8CleyYJlUYLOPPd3IR3+HBw9zj9BEKRS8JokXvMXG7GFpd5brDcA65OsExE3ZEYXu RdP9l5MmF6gIvNypVm0dUkEp96iM+AnjGcFcrTmXovMVZxdEFXZHkscVA+Go9dpESJk1 MrLibGDO3QuPKyJxoRR/MnRyhEzraq+WCRIHvPmUjTE+4SNcgCbqLE5WoRY3FkSiM5tf 2IcGRjfnx8boAtusQt/G3ysWb6KOAUqO/Pv2mdiwOrJiEfzcIElkKxdh5sSPWEl1VvpR hDgFG7ZdQiBvmh7TgGVH5iAF6TwhwvMPp/JiVBppEIspM55UjnDHHyzWdzGYKFVCg1Pa Ka1Q== X-Gm-Message-State: APjAAAXVcktAlRWFOMgLfUe7mWPkRT3SCkSOgI+OgiCjbBmXNaTb0QD9 pH2LQKhCff/N1DbHdoykLceCGl+Ygg4= X-Google-Smtp-Source: APXvYqwXVzXUhGG1Q/62l0WQ0VSCDjDqOQ3DMZ5cs9bAHqDiMdWn2sNx0a4QMA/qCgteIn1sPyvLuw== X-Received: by 2002:a02:6616:: with SMTP id k22mr68290870jac.100.1564322800802; Sun, 28 Jul 2019 07:06:40 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:40 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:40 -0600 Message-Id: <20190728140357.137295-24-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 23/39] env: Drop env_crc_update() 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function is not defined or used in U-Boot. Drop it. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/environment.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/environment.h b/include/environment.h index c740d5a216..27c0fee65f 100644 --- a/include/environment.h +++ b/include/environment.h @@ -265,9 +265,6 @@ struct env_driver { extern struct hsearch_data env_htab; -/* Function that updates CRC of the enironment */ -void env_crc_update(void); - /* Look up the variable from the default environment */ char *env_get_default(const char *name); From patchwork Sun Jul 28 14:03:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137995 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Hr/dCzg4"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xPw94Psdz9s4Y for ; Mon, 29 Jul 2019 00:14:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4146DC21C2F; Sun, 28 Jul 2019 14:11:37 +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=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 E6ADEC21DDC; Sun, 28 Jul 2019 14:08:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0AB56C21D74; Sun, 28 Jul 2019 14:06:47 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 47B6AC21E02 for ; Sun, 28 Jul 2019 14:06:44 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id j5so110363671ioj.8 for ; Sun, 28 Jul 2019 07:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PqkviIOux29zJD/56s/amHXfgbt2cw8o0ydSxt/92L8=; b=Hr/dCzg4zUTm1r+m6vbdcI+gPVEd4gFjGYyIzbDn2G+xlfOIhY/PStHK3jS92ZOvjH H5/M49/qyVEk8X3fU+YNroVdpLjGDe+TVLjoNT7/onff7kscW65X/o4pdh4AWUz2X3nk GWN4IK5QB7hiBUi22H162eQBJ7x5GHI3t87iA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PqkviIOux29zJD/56s/amHXfgbt2cw8o0ydSxt/92L8=; b=lF2Y6H43x+ffDHkVgEThv5ADgdg4bBblqOJYeJZEG8WH+ZcruT+DjMwAC9IGReLeNL zjicSxF3WcyUHQCgY5e9ZbcQlZs3WCrctK2fslU5HM0EnbVpzeZO8FCfWvpOZp8Ffzbb 5R8hK4Tl7/6blic9P/aMmkoOXXPODE6da2XM6J8ygEGzA6kVb8BCGxmDZy5tq4umD/ID 1cii87rr2HXXgJo73QuYB6ZUobx03cPjagntdPzCebwLx2lI4KNjFHZhMeg8GXKRvetQ UMR9gIbdL8E8KXb0kuad3VjXi2hqFL0hwepjBwDpD5JCe3QFg/vR9j9VDPd7k9RdnuCi fArw== X-Gm-Message-State: APjAAAXJw5Xf+WzT6U+pVWVd2ymvfhdIf5zXC3xUYtsttR1RixmF1Ndq m+r8D64s0J6xNA4q6/asieM+5YWDQJg= X-Google-Smtp-Source: APXvYqzhWMDNTeZjmQOs7eGPbe+5zMjc4z0/dggmNszjC4xOEJMFYfxf+W1VSy9TaTKTQ34s4u5RsA== X-Received: by 2002:a5d:87da:: with SMTP id q26mr87937375ios.193.1564322802915; Sun, 28 Jul 2019 07:06:42 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:41 -0600 Message-Id: <20190728140357.137295-25-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 24/39] env: Move get/set_default_env() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move these functions to the new header file and rename set_default_env() to env_set_default() so that it has a consistent env_ prefix. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/mach-imx/mx6/opos6ul.c | 2 +- board/phytec/pcm052/pcm052.c | 2 +- cmd/nvedit.c | 2 +- common/board_r.c | 2 +- common/spl/spl_dfu.c | 2 +- env/common.c | 14 +++++++------- env/ext4.c | 3 ++- env/fat.c | 3 ++- env/mmc.c | 5 +++-- env/nand.c | 7 ++++--- env/sata.c | 3 ++- env/sf.c | 11 ++++++----- env/ubi.c | 7 ++++--- include/env.h | 11 +++++++++++ include/environment.h | 6 ------ 15 files changed, 46 insertions(+), 34 deletions(-) diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 8b921a7d37..183a0c961c 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -128,7 +128,7 @@ int board_late_init(void) /* In bootstrap don't use the env vars */ if (((reg & 0x3000000) >> 24) == 0x1) { - set_default_env(NULL, 0); + env_set_default(NULL, 0); env_set("preboot", ""); } diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index dffd03786d..2417111765 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -377,7 +377,7 @@ int board_late_init(void) if ((reg & SRC_SBMR1_BOOTCFG1_SDMMC) && !(reg & SRC_SBMR1_BOOTCFG1_MMC)) { printf("------ SD card boot -------\n"); - set_default_env("!LVFBootloader", 0); + env_set_default("!LVFBootloader", 0); env_set("bootcmd", "run prepare_install_bk4r1_envs; run install_bk4r1rs"); } diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 390d040de3..52ffa15fad 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -826,7 +826,7 @@ static int do_env_default(cmd_tbl_t *cmdtp, int flag, debug("Final value for argc=%d\n", argc); if (all && (argc == 0)) { /* Reset the whole environment */ - set_default_env("## Resetting to default environment\n", + env_set_default("## Resetting to default environment\n", env_flag); return 0; } diff --git a/common/board_r.c b/common/board_r.c index b0ab56faf1..adaadb5f1c 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -448,7 +448,7 @@ static int initr_env(void) if (should_load_env()) env_relocate(); else - set_default_env(NULL, 0); + env_set_default(NULL, 0); #ifdef CONFIG_OF_CONTROL env_set_hex("fdtcontroladdr", (unsigned long)map_to_sysmem(gd->fdt_blob)); diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c index a05b867567..3f54ae0260 100644 --- a/common/spl/spl_dfu.c +++ b/common/spl/spl_dfu.c @@ -39,7 +39,7 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr) int ret; /* set default environment */ - set_default_env(NULL, 0); + env_set_default(NULL, 0); str_env = env_get(dfu_alt_info); if (!str_env) { pr_err("\"%s\" env variable not defined!\n", dfu_alt_info); diff --git a/env/common.c b/env/common.c index db2a033f68..1d9d0f934d 100644 --- a/env/common.c +++ b/env/common.c @@ -62,7 +62,7 @@ char *env_get_default(const char *name) return ret_val; } -void set_default_env(const char *s, int flags) +void env_set_default(const char *s, int flags) { if (sizeof(default_environment) > ENV_SIZE) { puts("*** Error - default environment is too large\n\n"); @@ -118,7 +118,7 @@ int env_import(const char *buf, int check) memcpy(&crc, &ep->crc, sizeof(crc)); if (crc32(0, ep->data, ENV_SIZE) != crc) { - set_default_env("bad CRC", 0); + env_set_default("bad CRC", 0); return -ENOMSG; /* needed for env_load() */ } } @@ -131,7 +131,7 @@ int env_import(const char *buf, int check) pr_err("Cannot import environment: errno = %d\n", errno); - set_default_env("import failed", 0); + env_set_default("import failed", 0); return -EIO; } @@ -156,7 +156,7 @@ int env_import_redund(const char *buf1, int buf1_read_fail, } if (buf1_read_fail && buf2_read_fail) { - set_default_env("bad env area", 0); + env_set_default("bad env area", 0); return -EIO; } else if (!buf1_read_fail && buf2_read_fail) { gd->env_valid = ENV_VALID; @@ -172,7 +172,7 @@ int env_import_redund(const char *buf1, int buf1_read_fail, tmp_env2->crc; if (!crc1_ok && !crc2_ok) { - set_default_env("bad CRC", 0); + env_set_default("bad CRC", 0); return -ENOMSG; /* needed for env_load() */ } else if (crc1_ok && !crc2_ok) { gd->env_valid = ENV_VALID; @@ -236,10 +236,10 @@ void env_relocate(void) if (gd->env_valid == ENV_INVALID) { #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD) /* Environment not changable */ - set_default_env(NULL, 0); + env_set_default(NULL, 0); #else bootstage_error(BOOTSTAGE_ID_NET_CHECKSUM); - set_default_env("bad CRC", 0); + env_set_default("bad CRC", 0); #endif } else { env_load(); diff --git a/env/ext4.c b/env/ext4.c index 9947381bfd..6aa36867b6 100644 --- a/env/ext4.c +++ b/env/ext4.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -127,7 +128,7 @@ static int env_ext4_load(void) return env_import(buf, 1); err_env_relocate: - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } diff --git a/env/fat.c b/env/fat.c index 7f74c64dfe..d23753c6ff 100644 --- a/env/fat.c +++ b/env/fat.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -122,7 +123,7 @@ static int env_fat_load(void) return env_import(buf, 1); err_env_relocate: - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } diff --git a/env/mmc.c b/env/mmc.c index b7b833f423..4ca7c2b9ff 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -346,7 +347,7 @@ fini: fini_mmc_for_env(mmc); err: if (ret) - set_default_env(errmsg, 0); + env_set_default(errmsg, 0); #endif return ret; @@ -387,7 +388,7 @@ fini: fini_mmc_for_env(mmc); err: if (ret) - set_default_env(errmsg, 0); + env_set_default(errmsg, 0); #endif return ret; } diff --git a/env/nand.c b/env/nand.c index d0b95f483d..3e2235f5f3 100644 --- a/env/nand.c +++ b/env/nand.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -325,7 +326,7 @@ static int env_nand_load(void) tmp_env2 = (env_t *)malloc(CONFIG_ENV_SIZE); if (tmp_env1 == NULL || tmp_env2 == NULL) { puts("Can't allocate buffers for environment\n"); - set_default_env("malloc() failed", 0); + env_set_default("malloc() failed", 0); ret = -EIO; goto done; } @@ -364,14 +365,14 @@ static int env_nand_load(void) if (mtd && !get_nand_env_oob(mtd, &nand_env_oob_offset)) { printf("Found Environment offset in OOB..\n"); } else { - set_default_env("no env offset in OOB", 0); + env_set_default("no env offset in OOB", 0); return; } #endif ret = readenv(CONFIG_ENV_OFFSET, (u_char *)buf); if (ret) { - set_default_env("readenv() failed", 0); + env_set_default("readenv() failed", 0); return -EIO; } diff --git a/env/sata.c b/env/sata.c index a2ff5c66f7..a5364dda5d 100644 --- a/env/sata.c +++ b/env/sata.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -106,7 +107,7 @@ static void env_sata_load(void) } if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) { - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } diff --git a/env/sf.c b/env/sf.c index 4f92ae0568..5531293e05 100644 --- a/env/sf.c +++ b/env/sf.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ static int setup_flash_device(void) CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE, &new); if (ret) { - set_default_env("spi_flash_probe_bus_cs() failed", 0); + env_set_default("spi_flash_probe_bus_cs() failed", 0); return ret; } @@ -60,7 +61,7 @@ static int setup_flash_device(void) CONFIG_ENV_SPI_CS, CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); if (!env_flash) { - set_default_env("spi_flash_probe() failed", 0); + env_set_default("spi_flash_probe() failed", 0); return -EIO; } } @@ -161,7 +162,7 @@ static int env_sf_load(void) tmp_env2 = (env_t *)memalign(ARCH_DMA_MINALIGN, CONFIG_ENV_SIZE); if (!tmp_env1 || !tmp_env2) { - set_default_env("malloc() failed", 0); + env_set_default("malloc() failed", 0); ret = -EIO; goto out; } @@ -256,7 +257,7 @@ static int env_sf_load(void) buf = (char *)memalign(ARCH_DMA_MINALIGN, CONFIG_ENV_SIZE); if (!buf) { - set_default_env("malloc() failed", 0); + env_set_default("malloc() failed", 0); return -EIO; } @@ -267,7 +268,7 @@ static int env_sf_load(void) ret = spi_flash_read(env_flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, buf); if (ret) { - set_default_env("spi_flash_read() failed", 0); + env_set_default("spi_flash_read() failed", 0); goto err_read; } diff --git a/env/ubi.c b/env/ubi.c index e4b85167ec..a69db14afd 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -123,7 +124,7 @@ static int env_ubi_load(void) if (ubi_part(CONFIG_ENV_UBI_PART, UBI_VID_OFFSET)) { printf("\n** Cannot find mtd partition \"%s\"\n", CONFIG_ENV_UBI_PART); - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } @@ -160,14 +161,14 @@ static int env_ubi_load(void) if (ubi_part(CONFIG_ENV_UBI_PART, UBI_VID_OFFSET)) { printf("\n** Cannot find mtd partition \"%s\"\n", CONFIG_ENV_UBI_PART); - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) { printf("\n** Unable to read env from %s:%s **\n", CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME); - set_default_env(NULL, 0); + env_set_default(NULL, 0); return -EIO; } diff --git a/include/env.h b/include/env.h index d6718fdf99..15a0906847 100644 --- a/include/env.h +++ b/include/env.h @@ -268,4 +268,15 @@ int env_export(struct environment_s *env_out); int env_import_redund(const char *buf1, int buf1_read_fail, const char *buf2, int buf2_read_fail); +/** + * env_get_default() - Look up a variable from the default environment + * + * @name: Variable to look up + * @return value if found, NULL if not found in default environment + */ +char *env_get_default(const char *name); + +/* [re]set to the default environment */ +void env_set_default(const char *s, int flags); + #endif diff --git a/include/environment.h b/include/environment.h index 27c0fee65f..ef391cc21a 100644 --- a/include/environment.h +++ b/include/environment.h @@ -265,12 +265,6 @@ struct env_driver { extern struct hsearch_data env_htab; -/* Look up the variable from the default environment */ -char *env_get_default(const char *name); - -/* [re]set to the default environment */ -void set_default_env(const char *s, int flags); - /** * env_get_char() - Get a character from the early environment * From patchwork Sun Jul 28 14:03:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138006 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gWvuZIb/"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ6Y47WMz9s8m for ; Mon, 29 Jul 2019 00:23:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3DD1CC21E1B; Sun, 28 Jul 2019 14:19:35 +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_MSPIKE_H2, 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 2F5F8C21DD9; Sun, 28 Jul 2019 14:16:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 39969C21DB6; Sun, 28 Jul 2019 14:06:49 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id C8755C21DA2 for ; Sun, 28 Jul 2019 14:06:45 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id k20so114455764ios.10 for ; Sun, 28 Jul 2019 07:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9kolqoR0wzNcTR/shE3M8o6MDnhV0hOTCGnJbFaNPDE=; b=gWvuZIb/rRM1aM0XcE8voEHYla5HwrOGekQCqtEu+JhnIYg5/SraW63bVQuGPv7xQ/ QCwxFNT2eDwAQyRrLhFi4s53B5LQakO2KSRc6nPeLlm4PJpTHaOYmSZG+F29XnLAKbw7 X6RjxZmVDw6Csv2i+6r+5bRuk9UAetopNVaCU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9kolqoR0wzNcTR/shE3M8o6MDnhV0hOTCGnJbFaNPDE=; b=dRZinLPCJ7rB7Ri3Jv8la4hj1eVvVXeAK84uVHXEaRbslU4hO07cPVPWJQFhF2RZsA Tz4vCrlSIvkdrXm423xZOPGHXtBOz3y4R3vWSq6jps/JROkBk7yar00s1jSaLPy44Yav 8I88b/pRt33u/FB9vQyeOzT+FzZJUVvNVrJ6v+g4V12MmLwwAGbgFHRjp0fXyFTd7Vhi l4qNgXb3tIONi1VTYu23riDQPMtPIlg0sqR4h4TVCd2PCNcjAa/WmJW7Wz9ep3eJoiY+ wlhvSEjD9EYJr+9cdIg/fUS7DGNUwBKm2fnObGDO6cKDgGrKgs1HQ0mE7YzERP5WQEYi nHlA== X-Gm-Message-State: APjAAAU0yY6AgrUs6CtkFn/Bq1hRvxrUvG7auDV3Cz2ZgHmesQszXgod xTBTxzqGJKUNt7yuizQxWTm9n9D+I24= X-Google-Smtp-Source: APXvYqzYBT8xPiQ6DwSB35BYNIPyhwTobuAQH7lXUOiAZwTIEpKeh/aAbjlkbEa1vL2VjCrsH55baA== X-Received: by 2002:a6b:691d:: with SMTP id e29mr47279798ioc.96.1564322804701; Sun, 28 Jul 2019 07:06:44 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:42 -0600 Message-Id: <20190728140357.137295-26-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 25/39] env: Move env_get_char() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_get_char() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 10 ++++++++++ include/environment.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/env.h b/include/env.h index 15a0906847..827d96cc86 100644 --- a/include/env.h +++ b/include/env.h @@ -279,4 +279,14 @@ char *env_get_default(const char *name); /* [re]set to the default environment */ void env_set_default(const char *s, int flags); +/** + * env_get_char() - Get a character from the early environment + * + * This reads from the pre-relocation environment + * + * @index: Index of character to read (0 = first) + * @return character read, or -ve on error + */ +int env_get_char(int index); + #endif diff --git a/include/environment.h b/include/environment.h index ef391cc21a..ea45b57628 100644 --- a/include/environment.h +++ b/include/environment.h @@ -265,16 +265,6 @@ struct env_driver { extern struct hsearch_data env_htab; -/** - * env_get_char() - Get a character from the early environment - * - * This reads from the pre-relocation environment - * - * @index: Index of character to read (0 = first) - * @return character read, or -ve on error - */ -int env_get_char(int index); - #endif /* DO_DEPS_ONLY */ #endif /* _ENVIRONMENT_H_ */ From patchwork Sun Jul 28 14:03:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138012 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KDvhh11U"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ954L2Gz9s4Y for ; Mon, 29 Jul 2019 00:26:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 44E76C21D65; Sun, 28 Jul 2019 14:16:52 +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=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 F050BC21E5B; Sun, 28 Jul 2019 14:10:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB0A8C21E7E; Sun, 28 Jul 2019 14:06:50 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id BC888C21E36 for ; Sun, 28 Jul 2019 14:06:47 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id m24so114550641ioo.2 for ; Sun, 28 Jul 2019 07:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZAxDMQZpaMoouPu+lGd6p/dYZ7BsDL8B3wLVgPOzy0M=; b=KDvhh11UOTudlyh9UshY31rT58Ykv6QfxujFM/haTbi1my8IvOe5HOOxnLrq81npg/ Bc4fO84KLLLVb9p0A7O8dTljj0Ws5Hd9kM+gBYRC7FiPrceR0JhcNqP7kZJYBZML8nA6 84JMwyH9BUbLSbCISw6LzvAH0uQI0+7tNedu8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZAxDMQZpaMoouPu+lGd6p/dYZ7BsDL8B3wLVgPOzy0M=; b=crbUU+0LIRxtMysKaQWXsiydUUU8sVGPJb22G64C59vlYqt5rc2IEkpnLfeXZUBjFe 6UnftENGKuwIMn5Wh4CCXl8887hcYhTX8hguWQFCeaapJCjdF1Sk8CUM7ne449va7ZP/ neVvBd/MfBFP3c8EhAmYAqsHVL6j6nyzkdUfNbnQDYT9/BVKgPUAf8Buz2R7LnBjkxWu eCvMb/NzHEUlTf5eHjSnmzGTscFmFA/+aoiZv6N7sXSbvPamcbrjgsFXo+OEt2sLGydf hewaq8JHIzWZVeYa8Z05d2S/Yv7LTMFFzXikv802IFWmFs17p2XKbAPE/P5JUpIwWdWj +wiw== X-Gm-Message-State: APjAAAV1OzKNKzbjiwTnIivsZjv1R/+jyL0yqgpvah/wHF6ZQRyn7HmE uGUlPPMr9v7TxPcWbsi6cdk/eEVFNnM= X-Google-Smtp-Source: APXvYqzX1sQ2QMjENwlKACP7dvgk0RNo2zEQMOfmmtkkJa7yfNTg37LAbtVOKcTLoe6yO9YQTTpenQ== X-Received: by 2002:a5d:968b:: with SMTP id m11mr49972840ion.16.1564322806658; Sun, 28 Jul 2019 07:06:46 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:46 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:43 -0600 Message-Id: <20190728140357.137295-27-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 26/39] env: Move env_reloc() to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Move env_reloc() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 7 +++++++ include/environment.h | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/env.h b/include/env.h index 827d96cc86..82214d973e 100644 --- a/include/env.h +++ b/include/env.h @@ -289,4 +289,11 @@ void env_set_default(const char *s, int flags); */ int env_get_char(int index); +/** + * env_reloc() - Relocate the 'env' sub-commands + * + * This is used for those unfortunate archs with crappy toolchains + */ +void env_reloc(void); + #endif diff --git a/include/environment.h b/include/environment.h index ea45b57628..d23b92833e 100644 --- a/include/environment.h +++ b/include/environment.h @@ -158,10 +158,6 @@ extern env_t environment; extern const unsigned char default_environment[]; -#if defined(CONFIG_NEEDS_MANUAL_RELOC) -extern void env_reloc(void); -#endif - #ifndef DO_DEPS_ONLY #include From patchwork Sun Jul 28 14:03:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138004 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jzfwjuf9"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ5W2q15z9s4Y for ; Mon, 29 Jul 2019 00:22:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 19544C21C2C; Sun, 28 Jul 2019 14:16:31 +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=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 9A068C21E29; Sun, 28 Jul 2019 14:10:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 18B82C21DE8; Sun, 28 Jul 2019 14:06:52 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 8E756C21DA2 for ; Sun, 28 Jul 2019 14:06:49 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id h6so27949617iom.7 for ; Sun, 28 Jul 2019 07:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=igiPNP54c1GDawaPDqcN9mwj18ofJddlJ5/26qTkH0M=; b=jzfwjuf9Zj5prwbixR156iZgMvdWsZOphCwSzZYYKWFUNxcFBLVbFJ41cuM9yLAQUf uVBInKlC+MsTqxjHFa/cJqgjjIj7+Mt12h4GJTzX5keNN1AhlY2Weie2qyKAiyRntTGC mEaMEO3Oz+A0XjJDMKVsLGI3zvil5cf1T/TBc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=igiPNP54c1GDawaPDqcN9mwj18ofJddlJ5/26qTkH0M=; b=nKt7LZ++8Ov7hnMgj+vp4rRZG9XjPRHLYchb+mlFvoELHRw9FKVSu48g2q+FPyLfDY BDbCZlS/BN9njvTslK1SrgaD+QaAhXyuPs8Ju0Rkt9QNtwXXp2y5zcwukolW0uow2YaL Chb28m7z/NEUUtdewHoWAEMaexzIrbHjNOEs6nQaUHr1NqeCS1agE4CIzwzgILGPlfC3 N84J0B68QHQFAyN9E3epb+CaRd3yof/zlZFzzAI5JEsZJB8+knrvyHJQdN3edRKL4zMV gg7L1QF9ZNE1TEraA6B9qPSyyrBQvlP/gBCtX+qf4ZUN40hysB/K+QTFu1SL+P+utu5d x7pw== X-Gm-Message-State: APjAAAXHLL2L+C6wVYEE4XTFuVx4hEdtd7DH5qKVNfpME/dCJgXMtxDc dBhHyXsGe7j11nPlHw3NzRKh5NBfW+I= X-Google-Smtp-Source: APXvYqzizz5877iukpIlXI1U9pm//1Y9LW28M2lkwYzUWcCoL2t2gLJOjsCRc0cHOvlgNG+Kc1qf1A== X-Received: by 2002:a5d:8ccc:: with SMTP id k12mr14539224iot.141.1564322808397; Sun, 28 Jul 2019 07:06:48 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:48 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:44 -0600 Message-Id: <20190728140357.137295-28-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 27/39] env: Rename environment to embedded_environment 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The name 'environment' is widely used in U-Boot so is not a very useful name of a variable. Rename it to better indicate its purpose. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- env/flash.c | 2 +- include/env_default.h | 2 +- include/environment.h | 2 +- tools/envcrc.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/env/flash.c b/env/flash.c index dca6567a09..a26d94309d 100644 --- a/env/flash.c +++ b/env/flash.c @@ -47,7 +47,7 @@ DECLARE_GLOBAL_DATA_PTR; #if defined(CONFIG_ENV_ADDR_REDUND) && defined(CMD_SAVEENV) || \ !defined(CONFIG_ENV_ADDR_REDUND) && defined(INITENV) #ifdef ENV_IS_EMBEDDED -static env_t *env_ptr = &environment; +static env_t *env_ptr = &embedded_environment; #else /* ! ENV_IS_EMBEDDED */ static env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; diff --git a/include/env_default.h b/include/env_default.h index 86b639d3e2..56a8bae39a 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -10,7 +10,7 @@ #include #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED -env_t environment __UBOOT_ENV_SECTION__(environment) = { +env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { ENV_CRC, /* CRC Sum */ #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT 1, /* Flags: valid */ diff --git a/include/environment.h b/include/environment.h index d23b92833e..44a527e1fa 100644 --- a/include/environment.h +++ b/include/environment.h @@ -153,7 +153,7 @@ typedef struct environment_s { } env_t; #ifdef ENV_IS_EMBEDDED -extern env_t environment; +extern env_t embedded_environment; #endif /* ENV_IS_EMBEDDED */ extern const unsigned char default_environment[]; diff --git a/tools/envcrc.c b/tools/envcrc.c index 505949289f..7eb7246d45 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -61,7 +61,7 @@ #ifdef CONFIG_BUILD_ENVCRC # include extern unsigned int env_size; -extern env_t environment; +extern env_t embedded_environment; #endif /* CONFIG_BUILD_ENVCRC */ extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); @@ -71,7 +71,7 @@ int main (int argc, char **argv) #ifdef CONFIG_BUILD_ENVCRC unsigned char pad = 0x00; uint32_t crc; - unsigned char *envptr = (unsigned char *)&environment, + unsigned char *envptr = (unsigned char *)&embedded_environment, *dataptr = envptr + ENV_HEADER_SIZE; unsigned int datasize = ENV_SIZE; unsigned int eoe; From patchwork Sun Jul 28 14:03:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138009 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LdAmPOkb"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ7P4kp3z9s4Y for ; Mon, 29 Jul 2019 00:24:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 507D6C21DD3; Sun, 28 Jul 2019 14:16:42 +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_MSPIKE_H2, 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 56F42C21E56; Sun, 28 Jul 2019 14:10:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 086C1C21E7E; Sun, 28 Jul 2019 14:06:54 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 950A5C21D8E for ; Sun, 28 Jul 2019 14:06:51 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id k8so114555388iot.1 for ; Sun, 28 Jul 2019 07:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oJF3yzQLK7jEZeV/5VPnkvNIo/gioNfiBkzZuNM6atI=; b=LdAmPOkbbbUw/lMOaHARdObjIBcPxOFeX6ujsixJREMGa/YFLJpFDRpmpJr65VfrxE LbYt7wly6ZWuceZh1yjE7Ch/EMmPrelsKqFNJcaaWpE2GSD9V2/xEMJ0CRNs2cgRP6nW pnUR33/gLZfOqFkyIa4AnzzcgJyH0W4yWM3P8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oJF3yzQLK7jEZeV/5VPnkvNIo/gioNfiBkzZuNM6atI=; b=jzBRRNuH2WK98SP+sME8jxsWYADcsI/nqKuDaazvxL6ClAQ6NHN0x8+dWvs53fx3Pf DDQ5eIixb5PWEg+T4TucxrJLbKBK5n/I56glp19+anzyYt9uce3Bhflns5sahtJy27y9 crIvHlGlKLEMbg1UZXcE1obqEWNvdkKRuIdhd7+eWjhjlnUhh4Bj9o4QxDFSStSSNJdi jJQQozD8zGIkjuS2MfbS1o9Z2Q2XgT0ISuupcCK1YPK6e3Y/fGaV4E3lfRNwXVlr+mfZ EnWBR8zq+1ub2Xz5gaOggQ59YNvrn30PsdisDvb2UwSC9GpcLwH854vg4+WR9lfQ1Vw/ YWiw== X-Gm-Message-State: APjAAAWAPVZBg3adz/m88opLi+kOGNWgyHXzTS5f+/TBKNjN1q8PvmtH X353hZVIJfk/C1Gly48KoJ1Y6n0PSKU= X-Google-Smtp-Source: APXvYqwpzKaGxaGJJQV7EO4LHTgf8RwG/HbLMyerKWHt3XhxRfwjbhFXPaOSvygoKaFFXAvlKfygIg== X-Received: by 2002:a5e:d615:: with SMTP id w21mr28604974iom.0.1564322810184; Sun, 28 Jul 2019 07:06:50 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:45 -0600 Message-Id: <20190728140357.137295-29-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 28/39] env: Move env_valid to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This enum is somewhat widely used to determine if the environment is valid or not. Move it to the common environment header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- env/flash.c | 1 + env/nowhere.c | 1 + include/env.h | 9 ++++++++- include/environment.h | 7 ------- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/env/flash.c b/env/flash.c index a26d94309d..7a73466cf2 100644 --- a/env/flash.c +++ b/env/flash.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/env/nowhere.c b/env/nowhere.c index ea6c32eb3b..7db4eec845 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/include/env.h b/include/env.h index 82214d973e..93a4c3ed6b 100644 --- a/include/env.h +++ b/include/env.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Common environment functions + * Common environment functions and definitions * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -14,6 +14,13 @@ struct environment_s; +/* Value for environment validity */ +enum env_valid { + ENV_INVALID, /* No valid environment */ + ENV_VALID, /* First or only environment is valid */ + ENV_REDUND, /* Redundant environment is valid */ +}; + /** * env_get_id() - Gets a sequence number for the environment * diff --git a/include/environment.h b/include/environment.h index 44a527e1fa..c3e8d7840a 100644 --- a/include/environment.h +++ b/include/environment.h @@ -165,13 +165,6 @@ extern const unsigned char default_environment[]; #include #include -/* Value for environment validity */ -enum env_valid { - ENV_INVALID, /* No valid environment */ - ENV_VALID, /* First or only environment is valid */ - ENV_REDUND, /* Redundant environment is valid */ -}; - enum env_location { ENVL_UNKNOWN, ENVL_EEPROM, From patchwork Sun Jul 28 14:03:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138007 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="efMQfkDA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ7561Fdz9s4Y for ; Mon, 29 Jul 2019 00:24:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 85E9EC21DA6; Sun, 28 Jul 2019 14:14:39 +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=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 31C62C21E16; Sun, 28 Jul 2019 14:09:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EECC0C21DA1; Sun, 28 Jul 2019 14:06:55 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 288C7C21DC1 for ; Sun, 28 Jul 2019 14:06:53 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id z3so4808020iog.0 for ; Sun, 28 Jul 2019 07:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wKxg8jGBRGTXVXw9MnmgUgNMxPR8unGtIRhD93vAx5o=; b=efMQfkDABQz5/BYy0AIO/pC9upbt4D0n6ki85xkQ8QrmzpQipMvEmkJVlAg/brWtG9 16UZJrNcmQLM0jkWuzVdcmyeRULvoJ3cQC2QJyQrJAlmMCT1hDU/grI0f2cNMIFbH7i1 fF1LIswOfrKWeUzvLHYCSEgM8mFBR7bbYkDG4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wKxg8jGBRGTXVXw9MnmgUgNMxPR8unGtIRhD93vAx5o=; b=inr26iTcbFHXKY2X64dsd/z8XvTZV6iiq1tM4hAIzYkwRjOzoPxy3YBld9MPuqDsEo oi0n3AAI239Pvc3uBrBgDmKErzOuZ5H3FIb5KTluVb/D7FOHrBDh5uK7y092ATQv2gdO 18QZBt29Qo7fWLboy5hzZikqMPxXdpu61AM7aRG1aiXZTm4i0nYapjpGylAUvurKFlDT fKwfyEK2adRHSy4XgAS7xzQFJk4p9Y3K6904273vYhoal8z2SjDowkAV7fy5MWOoQ0UE mbz2YL7Kfew9dCn8FKNd7stYZvXDMHAXa1Sc7KXAF8Ajf3tggl3lDvXtkTIYCXlQM1L9 bZ/Q== X-Gm-Message-State: APjAAAW8E2WaLHdtTzIxaXINtw9M9qPluV/nq/WSoElX5DKXT2pECTQq l7oQJfOHBViESKFOSm3IqeCmj0/zcYA= X-Google-Smtp-Source: APXvYqzuYSfdHrgYQDOKdHp0k/Gz7skL4NxBBjjdwilbtei0e6P2sHtjW4bEPMlMellGzBSl685AcA== X-Received: by 2002:a6b:ef06:: with SMTP id k6mr24813071ioh.70.1564322811988; Sun, 28 Jul 2019 07:06:51 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:51 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:46 -0600 Message-Id: <20190728140357.137295-30-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 29/39] env: Move callback definitions to env.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" These definitions are effectively part of the 'public' API of the environment implementation since they do not require access to any internal variables. Move them to the env.h header. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/env.h | 34 ++++++++++++++++++++++++++++++++++ include/env_callback.h | 23 ----------------------- include/search.h | 6 ------ 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/include/env.h b/include/env.h index 93a4c3ed6b..3dbdf276cd 100644 --- a/include/env.h +++ b/include/env.h @@ -21,6 +21,40 @@ enum env_valid { ENV_REDUND, /* Redundant environment is valid */ }; +/** enum env_op - environment callback operation */ +enum env_op { + env_op_create, + env_op_delete, + env_op_overwrite, +}; + +/** struct env_clbk_tbl - declares a new callback */ +struct env_clbk_tbl { + const char *name; /* Callback name */ + int (*callback)(const char *name, const char *value, enum env_op op, + int flags); +}; + +/* + * Define a callback that can be associated with variables. + * when associated through the ".callbacks" environment variable, the callback + * will be executed any time the variable is inserted, overwritten, or deleted. + * + * For SPL these are silently dropped to reduce code size, since environment + * callbacks are not supported with SPL. + */ +#ifdef CONFIG_SPL_BUILD +#define U_BOOT_ENV_CALLBACK(name, callback) \ + static inline __maybe_unused void _u_boot_env_noop_##name(void) \ + { \ + (void)callback; \ + } +#else +#define U_BOOT_ENV_CALLBACK(name, callback) \ + ll_entry_declare(struct env_clbk_tbl, name, env_clbk) = \ + {#name, callback} +#endif + /** * env_get_id() - Gets a sequence number for the environment * diff --git a/include/env_callback.h b/include/env_callback.h index 507a52e13c..3d30a33f5b 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -72,29 +72,6 @@ "serial#:serialno," \ CONFIG_ENV_CALLBACK_LIST_STATIC -struct env_clbk_tbl { - const char *name; /* Callback name */ - int (*callback)(const char *name, const char *value, enum env_op op, - int flags); -}; - void env_callback_init(ENTRY *var_entry); -/* - * Define a callback that can be associated with variables. - * when associated through the ".callbacks" environment variable, the callback - * will be executed any time the variable is inserted, overwritten, or deleted. - */ -#ifdef CONFIG_SPL_BUILD -#define U_BOOT_ENV_CALLBACK(name, callback) \ - static inline __maybe_unused void _u_boot_env_noop_##name(void) \ - { \ - (void)callback; \ - } -#else -#define U_BOOT_ENV_CALLBACK(name, callback) \ - ll_entry_declare(struct env_clbk_tbl, name, env_clbk) = \ - {#name, callback} -#endif - #endif /* __ENV_CALLBACK_H__ */ diff --git a/include/search.h b/include/search.h index 9750336b5e..f9fb29fdf9 100644 --- a/include/search.h +++ b/include/search.h @@ -19,12 +19,6 @@ #define __set_errno(val) do { errno = val; } while (0) -enum env_op { - env_op_create, - env_op_delete, - env_op_overwrite, -}; - /* Action which shall be performed in the call to hsearch. */ typedef enum { FIND, From patchwork Sun Jul 28 14:03:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1137999 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jsju3+ar"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ1b6ThDz9s4Y for ; Mon, 29 Jul 2019 00:19:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 68107C21C2C; Sun, 28 Jul 2019 14:17:15 +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=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 9DCC0C21DC1; Sun, 28 Jul 2019 14:12:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EDA1BC21E1A; Sun, 28 Jul 2019 14:06:58 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 55691C21DCA for ; Sun, 28 Jul 2019 14:06:55 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id s7so114360577iob.11 for ; Sun, 28 Jul 2019 07:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yMZ9+QqRMYtNZ0ZaocpGsWIJOXl1B1q4BHsNVYexsEU=; b=jsju3+ar9YJFaUPe64d5RVrG8JGKJ5YQS+noM3IilPKIPXJwNGLSiFKFRgcTs7UJsd hGEkwe3uwcD14fH3IpMBJQ2z16z0x6XPpdoyZP5bOeypwznsRLhvouXHYv7zWaRyJh41 JUoZ1gmCyuJNa78lEYA65qATVrk6yBbKcL6JY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yMZ9+QqRMYtNZ0ZaocpGsWIJOXl1B1q4BHsNVYexsEU=; b=PibieRvXVPCVGYG2WcYLU9eNfxyn6rrOp8fX+707n7IkHhyCwgGqqvZN04BfayL7od Z6rspOKrbB1dNTWcAajgumujjsdD3dFqSkP051LRwUT6Cnx2VKuv5mCikenjNoyHx/G8 EZLexRfRXtrx5jFoEbPJwrFmpIQgokZ8mqdrSv+OrifH+/v7kJiW08iWZiYpmnZJwwuS N9tCTJ89iCyjeO528/DPc249r9Fh8PAEmG0FpglveXQJPajVPoBGUCRd/vQ3/D4KONii FZDZoyPInWk0pG2EYr8NsXvIYCdCTr9tCMQGk8cvnm1iOyfqOr4So0xrM+I13UF/kfKJ Dj8A== X-Gm-Message-State: APjAAAWADVIgtPZfn9HBCrfJ0PJiHUpTPR3NYCR68+Vm5cyAhdPMNZqw KsWkxWy/OXThUywUni0aWNLdyyJPNDg= X-Google-Smtp-Source: APXvYqwINthNn33kOch7ygEHoDXTT8qefADJpyFI8MrdOkyciWaXCfx4YilWQYJVc2cbCGaSx8Yu2A== X-Received: by 2002:a6b:8e82:: with SMTP id q124mr13734148iod.68.1564322813815; Sun, 28 Jul 2019 07:06:53 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:53 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:47 -0600 Message-Id: <20190728140357.137295-31-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 30/39] env: Drop the ENTRY typdef 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" U-Boot is not supposed to use typedef for structs anymore. Also this name is the same as the ENTRY() macro used in assembler files, and 'entry' itself is widely used in U-Boot (>8k matches). Drop the typedef and rename the struct to env_entry to reduce confusion. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- api/api.c | 2 +- cmd/nvedit.c | 12 +++++------ drivers/tee/sandbox.c | 2 +- env/callback.c | 6 +++--- env/common.c | 2 +- env/flags.c | 10 +++++----- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/search.h | 24 +++++++++++----------- lib/hashtable.c | 45 +++++++++++++++++++++--------------------- test/env/hashtable.c | 12 +++++------ 11 files changed, 62 insertions(+), 61 deletions(-) diff --git a/api/api.c b/api/api.c index 8a41b7cce7..a0fc62ca9e 100644 --- a/api/api.c +++ b/api/api.c @@ -497,7 +497,7 @@ static int API_env_enum(va_list ap) { int i, buflen; char *last, **next, *s; - ENTRY *match, search; + struct env_entry *match, search; static char *var; last = (char *)va_arg(ap, unsigned long); diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 52ffa15fad..7908d6cf0c 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -94,7 +94,7 @@ static int env_print(char *name, int flag) ssize_t len; if (name) { /* print a single name */ - ENTRY e, *ep; + struct env_entry e, *ep; e.key = name; e.data = NULL; @@ -225,7 +225,7 @@ static int _do_env_set(int flag, int argc, char * const argv[], int env_flag) { int i, len; char *name, *value, *s; - ENTRY e, *ep; + struct env_entry e, *ep; debug("Initial value for argc=%d\n", argc); @@ -485,7 +485,7 @@ static int print_static_binding(const char *var_name, const char *callback_name, return 0; } -static int print_active_callback(ENTRY *entry) +static int print_active_callback(struct env_entry *entry) { struct env_clbk_tbl *clbkp; int i; @@ -566,7 +566,7 @@ static int print_static_flags(const char *var_name, const char *flags, return 0; } -static int print_active_flags(ENTRY *entry) +static int print_active_flags(struct env_entry *entry) { enum env_flags_vartype type; enum env_flags_varaccess access; @@ -674,7 +674,7 @@ static int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char *env_get(const char *name) { if (gd->flags & GD_FLG_ENV_READY) { /* after import into hashtable */ - ENTRY e, *ep; + struct env_entry e, *ep; WATCHDOG_RESET(); @@ -1274,7 +1274,7 @@ static int do_env_info(cmd_tbl_t *cmdtp, int flag, static int do_env_exists(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - ENTRY e, *ep; + struct env_entry e, *ep; if (argc < 2) return CMD_RET_USAGE; diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c index 2f3355c7b7..4bbcf74967 100644 --- a/drivers/tee/sandbox.c +++ b/drivers/tee/sandbox.c @@ -79,7 +79,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, struct tee_param *params) { struct sandbox_tee_state *state = dev_get_priv(dev); - ENTRY e, *ep; + struct env_entry e, *ep; char *name; u32 res; uint slot; diff --git a/env/callback.c b/env/callback.c index 95be80d454..d539da93aa 100644 --- a/env/callback.c +++ b/env/callback.c @@ -43,7 +43,7 @@ static const char *callback_list; * This is called specifically when the variable did not exist in the hash * previously, so the blanket update did not find this variable. */ -void env_callback_init(ENTRY *var_entry) +void env_callback_init(struct env_entry *var_entry) { const char *var_name = var_entry->key; char callback_name[256] = ""; @@ -80,7 +80,7 @@ void env_callback_init(ENTRY *var_entry) * Called on each existing env var prior to the blanket update since removing * a callback association should remove its callback. */ -static int clear_callback(ENTRY *entry) +static int clear_callback(struct env_entry *entry) { entry->callback = NULL; @@ -92,7 +92,7 @@ static int clear_callback(ENTRY *entry) */ static int set_callback(const char *name, const char *value, void *priv) { - ENTRY e, *ep; + struct env_entry e, *ep; struct env_clbk_tbl *clbkp; e.key = name; diff --git a/env/common.c b/env/common.c index 1d9d0f934d..474ea2280b 100644 --- a/env/common.c +++ b/env/common.c @@ -250,7 +250,7 @@ void env_relocate(void) int env_complete(char *var, int maxv, char *cmdv[], int bufsz, char *buf, bool dollar_comp) { - ENTRY *match; + struct env_entry *match; int found, idx; if (dollar_comp) { diff --git a/env/flags.c b/env/flags.c index 7277711594..fdbad7bf33 100644 --- a/env/flags.c +++ b/env/flags.c @@ -419,7 +419,7 @@ static const char *flags_list; * This is called specifically when the variable did not exist in the hash * previously, so the blanket update did not find this variable. */ -void env_flags_init(ENTRY *var_entry) +void env_flags_init(struct env_entry *var_entry) { const char *var_name = var_entry->key; char flags[ENV_FLAGS_ATTR_MAX_LEN + 1] = ""; @@ -441,7 +441,7 @@ void env_flags_init(ENTRY *var_entry) * Called on each existing env var prior to the blanket update since removing * a flag in the flag list should remove its flags. */ -static int clear_flags(ENTRY *entry) +static int clear_flags(struct env_entry *entry) { entry->flags = 0; @@ -453,7 +453,7 @@ static int clear_flags(ENTRY *entry) */ static int set_flags(const char *name, const char *value, void *priv) { - ENTRY e, *ep; + struct env_entry e, *ep; e.key = name; e.data = NULL; @@ -496,8 +496,8 @@ U_BOOT_ENV_CALLBACK(flags, on_flags); * overwriting of write-once variables. */ -int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op, - int flag) +int env_flags_validate(const struct env_entry *item, const char *newval, + enum env_op op, int flag) { const char *name; const char *oldval = NULL; diff --git a/include/env_callback.h b/include/env_callback.h index 3d30a33f5b..982c07854d 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -72,6 +72,6 @@ "serial#:serialno," \ CONFIG_ENV_CALLBACK_LIST_STATIC -void env_callback_init(ENTRY *var_entry); +void env_callback_init(struct env_entry *var_entry); #endif /* __ENV_CALLBACK_H__ */ diff --git a/include/env_flags.h b/include/env_flags.h index f2306436b4..e5380f2948 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -153,13 +153,13 @@ int env_flags_validate_env_set_params(char *name, char *const val[], int count); * When adding a variable to the environment, initialize the flags for that * variable. */ -void env_flags_init(ENTRY *var_entry); +void env_flags_init(struct env_entry *var_entry); /* * Validate the newval for to conform with the requirements defined by its flags */ -int env_flags_validate(const ENTRY *item, const char *newval, enum env_op op, - int flag); +int env_flags_validate(const struct env_entry *item, const char *newval, + enum env_op op, int flag); #endif /* USE_HOSTCC */ diff --git a/include/search.h b/include/search.h index f9fb29fdf9..efa8bcbef6 100644 --- a/include/search.h +++ b/include/search.h @@ -25,16 +25,14 @@ typedef enum { ENTER } ACTION; -typedef struct entry { +/** struct env_entry - An entry in the environment hashtable */ +struct env_entry { const char *key; char *data; int (*callback)(const char *name, const char *value, enum env_op op, int flags); int flags; -} ENTRY; - -/* Opaque type for internal use. */ -struct _ENTRY; +}; /* * Family of hash table handling functions. The functions also @@ -54,8 +52,8 @@ struct hsearch_data { * shall force overwriting of write-once variables. * Must return 0 for approval, 1 for denial. */ - int (*change_ok)(const ENTRY *__item, const char *newval, enum env_op, - int flag); + int (*change_ok)(const struct env_entry *__item, const char *newval, + enum env_op, int flag); }; /* Create a new hash table which will contain at most "__nel" elements. */ @@ -70,15 +68,16 @@ extern void hdestroy_r(struct hsearch_data *__htab); * NULL. If ACTION is `ENTER' replace existing data (if any) with * __item.data. * */ -extern int hsearch_r(ENTRY __item, ACTION __action, ENTRY ** __retval, - struct hsearch_data *__htab, int __flag); +extern int hsearch_r(struct env_entry __item, ACTION __action, + struct env_entry **__retval, struct hsearch_data *__htab, + int __flag); /* * Search for an entry matching "__match". Otherwise, Same semantics * as hsearch_r(). */ -extern int hmatch_r(const char *__match, int __last_idx, ENTRY ** __retval, - struct hsearch_data *__htab); +extern int hmatch_r(const char *__match, int __last_idx, + struct env_entry **__retval, struct hsearch_data *__htab); /* Search and delete entry matching "__key" in internal hash table. */ extern int hdelete_r(const char *__key, struct hsearch_data *__htab, @@ -98,7 +97,8 @@ extern int himport_r(struct hsearch_data *__htab, char * const vars[]); /* Walk the whole table calling the callback on each element */ -extern int hwalk_r(struct hsearch_data *__htab, int (*callback)(ENTRY *)); +extern int hwalk_r(struct hsearch_data *__htab, + int (*callback)(struct env_entry *entry)); /* Flags for himport_r(), hexport_r(), hdelete_r(), and hsearch_r() */ #define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */ diff --git a/lib/hashtable.c b/lib/hashtable.c index 0d288d12d9..c77b68f4e6 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -61,12 +61,12 @@ typedef struct _ENTRY { int used; - ENTRY entry; + struct env_entry entry; } _ENTRY; -static void _hdelete(const char *key, struct hsearch_data *htab, ENTRY *ep, - int idx); +static void _hdelete(const char *key, struct hsearch_data *htab, + struct env_entry *ep, int idx); /* * hcreate() @@ -151,7 +151,7 @@ void hdestroy_r(struct hsearch_data *htab) /* free used memory */ for (i = 1; i <= htab->size; ++i) { if (htab->table[i].used > 0) { - ENTRY *ep = &htab->table[i].entry; + struct env_entry *ep = &htab->table[i].entry; free((void *)ep->key); free(ep->data); @@ -200,7 +200,7 @@ void hdestroy_r(struct hsearch_data *htab) * example for functions like hdelete(). */ -int hmatch_r(const char *match, int last_idx, ENTRY ** retval, +int hmatch_r(const char *match, int last_idx, struct env_entry **retval, struct hsearch_data *htab) { unsigned int idx; @@ -224,9 +224,10 @@ int hmatch_r(const char *match, int last_idx, ENTRY ** retval, * Compare an existing entry with the desired key, and overwrite if the action * is ENTER. This is simply a helper function for hsearch_r(). */ -static inline int _compare_and_overwrite_entry(ENTRY item, ACTION action, - ENTRY **retval, struct hsearch_data *htab, int flag, - unsigned int hval, unsigned int idx) +static inline int _compare_and_overwrite_entry(struct env_entry item, + ACTION action, struct env_entry **retval, + struct hsearch_data *htab, int flag, unsigned int hval, + unsigned int idx) { if (htab->table[idx].used == hval && strcmp(item.key, htab->table[idx].entry.key) == 0) { @@ -270,7 +271,7 @@ static inline int _compare_and_overwrite_entry(ENTRY item, ACTION action, return -1; } -int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval, +int hsearch_r(struct env_entry item, ACTION action, struct env_entry **retval, struct hsearch_data *htab, int flag) { unsigned int hval; @@ -431,10 +432,10 @@ int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval, * do that. */ -static void _hdelete(const char *key, struct hsearch_data *htab, ENTRY *ep, - int idx) +static void _hdelete(const char *key, struct hsearch_data *htab, + struct env_entry *ep, int idx) { - /* free used ENTRY */ + /* free used entry */ debug("hdelete: DELETING key \"%s\"\n", key); free((void *)ep->key); free(ep->data); @@ -447,7 +448,7 @@ static void _hdelete(const char *key, struct hsearch_data *htab, ENTRY *ep, int hdelete_r(const char *key, struct hsearch_data *htab, int flag) { - ENTRY e, *ep; + struct env_entry e, *ep; int idx; debug("hdelete: DELETE key \"%s\"\n", key); @@ -528,8 +529,8 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) static int cmpkey(const void *p1, const void *p2) { - ENTRY *e1 = *(ENTRY **) p1; - ENTRY *e2 = *(ENTRY **) p2; + struct env_entry *e1 = *(struct env_entry **)p1; + struct env_entry *e2 = *(struct env_entry **)p2; return (strcmp(e1->key, e2->key)); } @@ -563,8 +564,8 @@ static int match_string(int flag, const char *str, const char *pat, void *priv) return 0; } -static int match_entry(ENTRY *ep, int flag, - int argc, char * const argv[]) +static int match_entry(struct env_entry *ep, int flag, int argc, + char *const argv[]) { int arg; void *priv = NULL; @@ -596,7 +597,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, char **resp, size_t size, int argc, char * const argv[]) { - ENTRY *list[htab->size]; + struct env_entry *list[htab->size]; char *res, *p; size_t totlen; int i, n; @@ -617,7 +618,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, for (i = 1, n = 0, totlen = 0; i <= htab->size; ++i) { if (htab->table[i].used > 0) { - ENTRY *ep = &htab->table[i].entry; + struct env_entry *ep = &htab->table[i].entry; int found = match_entry(ep, flag, argc, argv); if ((argc > 0) && (found == 0)) @@ -657,7 +658,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, #endif /* Sort list by keys */ - qsort(list, n, sizeof(ENTRY *), cmpkey); + qsort(list, n, sizeof(struct env_entry *), cmpkey); /* Check if the user supplied buffer size is sufficient */ if (size) { @@ -869,7 +870,7 @@ int himport_r(struct hsearch_data *htab, } /* Parse environment; allow for '\0' and 'sep' as separators */ do { - ENTRY e, *rv; + struct env_entry e, *rv; /* skip leading white space */ while (isblank(*dp)) @@ -976,7 +977,7 @@ end: * Walk all of the entries in the hash, calling the callback for each one. * this allows some generic operation to be performed on each element. */ -int hwalk_r(struct hsearch_data *htab, int (*callback)(ENTRY *)) +int hwalk_r(struct hsearch_data *htab, int (*callback)(struct env_entry *entry)) { int i; int retval; diff --git a/test/env/hashtable.c b/test/env/hashtable.c index 8c87e65457..bad276bd10 100644 --- a/test/env/hashtable.c +++ b/test/env/hashtable.c @@ -18,8 +18,8 @@ static int htab_fill(struct unit_test_state *uts, struct hsearch_data *htab, size_t size) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < size; i++) { @@ -38,8 +38,8 @@ static int htab_check_fill(struct unit_test_state *uts, struct hsearch_data *htab, size_t size) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < size; i++) { @@ -61,8 +61,8 @@ static int htab_create_delete(struct unit_test_state *uts, struct hsearch_data *htab, size_t iterations) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < iterations; i++) { From patchwork Sun Jul 28 14:03:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138017 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ASKVOL1t"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQC143mWz9s4Y for ; Mon, 29 Jul 2019 00:27:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3946EC21D8E; Sun, 28 Jul 2019 14:17:39 +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=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 7249CC21E57; Sun, 28 Jul 2019 14:12:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 62991C21E57; Sun, 28 Jul 2019 14:06:59 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id AB020C21E2C for ; Sun, 28 Jul 2019 14:06:56 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id q22so4796382iog.4 for ; Sun, 28 Jul 2019 07:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CchfI1pKRy2JXyiBKVA+7GvMGOCcteleCtmmMZC0AiA=; b=ASKVOL1titYyw3Wl/g1z1I1y8OW4tznqm8kA24XQ31DkfmneXNRfNJYP7+0aDUfBaM 7Jy/P9d0LyV/+Fxo+JS/fzleERuKJS4yIqTo28he+E/Wv3MWy7uGQcAvdC1nOcZBFwvp jmUc/kGSRFT0nIY1jB2Z+ymHMGeu7nOAqu57w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CchfI1pKRy2JXyiBKVA+7GvMGOCcteleCtmmMZC0AiA=; b=VLiumybSQW+uj/3/Gx/7+AzdjqbBIpUy1mTTMC2S7rv9y14pp7sZy1xlzuQqcbf2EW qlpuHfZZjfLb0Ni46SbG0NmhwgK2IH5Tl1yM6PL12/dXTCArpi4iysugzNh8GwyP+yGd 9FeYgOSzOmWA7qcQt8ttHTuVv4P4ABQPfmAJSIb3dH207QQo7OIS/1bKxck03yMPTfj8 N1PEQmCc2RvWVtH6Cuha7a5jXp5yCS2NsLQOi5BvK+uGnVyCCCpsfB0habgVFvDeBIVo ocRbkgq0iieCCrdhU1PGwlUm7f+k6p3WjxDI98UyXb/i4WSSwo7+7y1XJtIMbtaVbqUx pIRw== X-Gm-Message-State: APjAAAU9/DWmLSRBFG1EJtIl3kQy+ZkAN9c6Q/4aNY+b/xMJ8BoscsEb 6b9Cvp9XNWxOrhnUwiMIPnndzomjENc= X-Google-Smtp-Source: APXvYqyKOtMltZoVPY27mWfj5i4dBYP49S9zH8Q3/Hi0X7RBRZnYCHkEuNR+DRoPBa0AuX5b8Je/kA== X-Received: by 2002:a05:6638:149:: with SMTP id y9mr108429799jao.76.1564322815575; Sun, 28 Jul 2019 07:06:55 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.55 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:55 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:48 -0600 Message-Id: <20190728140357.137295-32-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 31/39] env: Drop _ENTRY 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This typedef does not need to be defined in the search.h header since it is only used in one file (hashtable.c). Remove it from the header and change it to a struct. Signed-off-by: Simon Glass --- include/search.h | 2 +- lib/hashtable.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/search.h b/include/search.h index efa8bcbef6..c99648f80b 100644 --- a/include/search.h +++ b/include/search.h @@ -42,7 +42,7 @@ struct env_entry { /* Data type for reentrant functions. */ struct hsearch_data { - struct _ENTRY *table; + struct env_entry_node *table; unsigned int size; unsigned int filled; /* diff --git a/lib/hashtable.c b/lib/hashtable.c index c77b68f4e6..1093d8adaa 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -59,10 +59,10 @@ * which describes the current status. */ -typedef struct _ENTRY { +struct env_entry_node { int used; struct env_entry entry; -} _ENTRY; +}; static void _hdelete(const char *key, struct hsearch_data *htab, @@ -120,7 +120,8 @@ int hcreate_r(size_t nel, struct hsearch_data *htab) htab->filled = 0; /* allocate memory and zero out */ - htab->table = (_ENTRY *) calloc(htab->size + 1, sizeof(_ENTRY)); + htab->table = (struct env_entry_node *)calloc(htab->size + 1, + sizeof(struct env_entry_node)); if (htab->table == NULL) return 0; From patchwork Sun Jul 28 14:03:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138005 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="j/t4Jr2u"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ6J01sRz9s4Y for ; Mon, 29 Jul 2019 00:23:35 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9F62AC21DB5; Sun, 28 Jul 2019 14:18:52 +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=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 B9420C21EB1; Sun, 28 Jul 2019 14:12:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 23BD3C21EAE; Sun, 28 Jul 2019 14:07:01 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id B7507C21D72 for ; Sun, 28 Jul 2019 14:06:58 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id q22so4796485iog.4 for ; Sun, 28 Jul 2019 07:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=thpfXEkXXlE5pTLN0YcuaXuReIxZ8GXgwkHGNSYmuGo=; b=j/t4Jr2u75shXWJ5wvpdqZmgagMkT7S0h8zPrTG6PX9wfm7SvrEdyifv5ih/mMd2Nk QuRgYV6SnearyR7KWkWsuCyWbQ8wdi+xcugGwyrMv83zXEjc4Ygy34nskOp1Yj5IKqSg jhplp/6ON0zQ3yQVQFV+fHOGWJjpFofb+LGGg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=thpfXEkXXlE5pTLN0YcuaXuReIxZ8GXgwkHGNSYmuGo=; b=O1HxaXLT+CXAiywb5swR6DaIJPG3xab8Hi/EUJhypLuIsQND7zNUVt94BfnoCcQlon pAC/7OfbNNxo9A2kE0o5BVfVDoS47seUDxRxNAbHvWVHTUaXtBUvN/OrxKM4hdK4xq8Z M16m6Rgsg/+7AWCEcQTOsWbK/uzPI/FiWfTwSXA9lBUHYWjoJTFUvIl4KpbN5VF49I/Y qlHBdveioI5T3b6gp7gV2NO3yYI/Sp/dL1YhlQ1nQIeMxyg9sg0zznK0jc+qPj4ilK5B tEjCI09oPfg3O1H+OtT3OQN3BpnbiFGddyXIlGyZdqUpD1/YbU12nc00YdKIVaSeL1mv 0u8g== X-Gm-Message-State: APjAAAXn/cRLbtV7li6dKy6jH1FIXDfX19WfXlte8YUaFgeY5hrWDzlu zyhX5gOnRaO1uZ43BXXPA+9mnab0v74= X-Google-Smtp-Source: APXvYqyOs10FfaisEJM7OAwGnntXP+lzLYizGqSlcjlDW3cZZOQtq7ct9P5KsM8TFyb6/21sh2V8MQ== X-Received: by 2002:a02:5a02:: with SMTP id v2mr104875878jaa.124.1564322817407; Sun, 28 Jul 2019 07:06:57 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:49 -0600 Message-Id: <20190728140357.137295-33-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 32/39] env: Rename the redundancy flags 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass --- cmd/nvedit.c | 2 +- env/eeprom.c | 10 ++++++---- env/flash.c | 18 ++++++++++-------- env/sf.c | 6 ++---- include/env.h | 6 ++++++ include/environment.h | 5 +---- tools/env/fw_env.c | 23 +++++++++++++---------- 7 files changed, 39 insertions(+), 31 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7908d6cf0c..d6a86abb03 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -1014,7 +1014,7 @@ NXTARG: ; envp->crc = crc32(0, envp->data, size ? size - offsetof(env_t, data) : ENV_SIZE); #ifdef CONFIG_ENV_ADDR_REDUND - envp->flags = ACTIVE_FLAG; + envp->flags = ENVF_REDUND_ACTIVE; #endif } env_set_hex("filesize", len + offsetof(env_t, data)); diff --git a/env/eeprom.c b/env/eeprom.c index 8d82cf892c..0c30ca459c 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -132,9 +132,11 @@ static int env_eeprom_load(void) gd->env_valid = ENV_REDUND; } else { /* both ok - check serial */ - if (flags[0] == ACTIVE_FLAG && flags[1] == OBSOLETE_FLAG) + if (flags[0] == ENVF_REDUND_ACTIVE && + flags[1] == ENVF_REDUND_OBSOLETE) gd->env_valid = ENV_VALID; - else if (flags[0] == OBSOLETE_FLAG && flags[1] == ACTIVE_FLAG) + else if (flags[0] == ENVF_REDUND_OBSOLETE && + flags[1] == ENVF_REDUND_ACTIVE) gd->env_valid = ENV_REDUND; else if (flags[0] == 0xFF && flags[1] == 0) gd->env_valid = ENV_REDUND; @@ -194,7 +196,7 @@ static int env_eeprom_save(void) unsigned int off = CONFIG_ENV_OFFSET; #ifdef CONFIG_ENV_OFFSET_REDUND unsigned int off_red = CONFIG_ENV_OFFSET_REDUND; - char flag_obsolete = OBSOLETE_FLAG; + char flag_obsolete = ENVF_REDUND_OBSOLETE; #endif rc = env_export(&env_new); @@ -207,7 +209,7 @@ static int env_eeprom_save(void) off_red = CONFIG_ENV_OFFSET; } - env_new.flags = ACTIVE_FLAG; + env_new.flags = ENVF_REDUND_ACTIVE; #endif rc = eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR, diff --git a/env/flash.c b/env/flash.c index 7a73466cf2..9566dd7f05 100644 --- a/env/flash.c +++ b/env/flash.c @@ -95,10 +95,12 @@ static int env_flash_init(void) } else if (!crc1_ok && !crc2_ok) { gd->env_addr = addr_default; gd->env_valid = ENV_INVALID; - } else if (flag1 == ACTIVE_FLAG && flag2 == OBSOLETE_FLAG) { + } else if (flag1 == ENVF_REDUND_ACTIVE && + flag2 == ENVF_REDUND_OBSOLETE) { gd->env_addr = addr1; gd->env_valid = ENV_VALID; - } else if (flag1 == OBSOLETE_FLAG && flag2 == ACTIVE_FLAG) { + } else if (flag1 == ENVF_REDUND_OBSOLETE && + flag2 == ENVF_REDUND_ACTIVE) { gd->env_addr = addr2; gd->env_valid = ENV_VALID; } else if (flag1 == flag2) { @@ -121,7 +123,7 @@ static int env_flash_save(void) { env_t env_new; char *saved_data = NULL; - char flag = OBSOLETE_FLAG, new_flag = ACTIVE_FLAG; + char flag = ENVF_REDUND_OBSOLETE, new_flag = ENVF_REDUND_ACTIVE; int rc = 1; #if CONFIG_ENV_SECT_SIZE > CONFIG_ENV_SIZE ulong up_data = 0; @@ -322,9 +324,9 @@ static int env_flash_load(void) end_addr_new = ltmp; } - if (flash_addr_new->flags != OBSOLETE_FLAG && + if (flash_addr_new->flags != ENVF_REDUND_OBSOLETE && crc32(0, flash_addr_new->data, ENV_SIZE) == flash_addr_new->crc) { - char flag = OBSOLETE_FLAG; + char flag = ENVF_REDUND_OBSOLETE; gd->env_valid = ENV_REDUND; flash_sect_protect(0, (ulong)flash_addr_new, end_addr_new); @@ -334,9 +336,9 @@ static int env_flash_load(void) flash_sect_protect(1, (ulong)flash_addr_new, end_addr_new); } - if (flash_addr->flags != ACTIVE_FLAG && - (flash_addr->flags & ACTIVE_FLAG) == ACTIVE_FLAG) { - char flag = ACTIVE_FLAG; + if (flash_addr->flags != ENVF_REDUND_ACTIVE && + (flash_addr->flags & ENVF_REDUND_ACTIVE) == ENVF_REDUND_ACTIVE) { + char flag = ENVF_REDUND_ACTIVE; gd->env_valid = ENV_REDUND; flash_sect_protect(0, (ulong)flash_addr, end_addr); diff --git a/env/sf.c b/env/sf.c index 5531293e05..ae4136926b 100644 --- a/env/sf.c +++ b/env/sf.c @@ -30,8 +30,6 @@ static ulong env_offset = CONFIG_ENV_OFFSET; static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND; #endif -#define ACTIVE_FLAG 1 -#define OBSOLETE_FLAG 0 #endif /* CONFIG_ENV_OFFSET_REDUND */ DECLARE_GLOBAL_DATA_PTR; @@ -74,7 +72,7 @@ static int setup_flash_device(void) static int env_sf_save(void) { env_t env_new; - char *saved_buffer = NULL, flag = OBSOLETE_FLAG; + char *saved_buffer = NULL, flag = ENVF_REDUND_OBSOLETE; u32 saved_size, saved_offset, sector; int ret; @@ -85,7 +83,7 @@ static int env_sf_save(void) ret = env_export(&env_new); if (ret) return -EIO; - env_new.flags = ACTIVE_FLAG; + env_new.flags = ENVF_REDUND_ACTIVE; if (gd->env_valid == ENV_VALID) { env_new_offset = CONFIG_ENV_OFFSET_REDUND; diff --git a/include/env.h b/include/env.h index 3dbdf276cd..884b036d02 100644 --- a/include/env.h +++ b/include/env.h @@ -55,6 +55,12 @@ struct env_clbk_tbl { {#name, callback} #endif +/** enum env_redund_flags - Flags for the redundand_environment */ +enum env_redund_flags { + ENVF_REDUND_OBSOLETE = 0, + ENVF_REDUND_ACTIVE = 1, +}; + /** * env_get_id() - Gets a sequence number for the environment * diff --git a/include/environment.h b/include/environment.h index c3e8d7840a..70ee0fdb19 100644 --- a/include/environment.h +++ b/include/environment.h @@ -135,9 +135,6 @@ extern unsigned long nand_env_oob_offset; #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT # define ENV_HEADER_SIZE (sizeof(uint32_t) + 1) - -# define ACTIVE_FLAG 1 -# define OBSOLETE_FLAG 0 #else # define ENV_HEADER_SIZE (sizeof(uint32_t)) #endif @@ -147,7 +144,7 @@ extern unsigned long nand_env_oob_offset; typedef struct environment_s { uint32_t crc; /* CRC32 over data bytes */ #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT - unsigned char flags; /* active/obsolete flags */ + unsigned char flags; /* active/obsolete flags ENVF_REDUND_ */ #endif unsigned char data[ENV_SIZE]; /* Environment data */ } env_t; diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index f06252d916..204f9d593e 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -119,9 +119,12 @@ static struct environment environment = { static int have_redund_env; -static unsigned char active_flag = 1; -/* obsolete_flag must be 0 to efficiently set it on NOR flash without erasing */ -static unsigned char obsolete_flag = 0; +static unsigned char ENVF_REDUND_ACTIVE = 1; +/* + * ENVF_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash without + * erasing + */ +static unsigned char ENVF_REDUND_OBSOLETE; #define DEFAULT_ENV_INSTANCE_STATIC #include @@ -1142,7 +1145,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) erase.start = DEVOFFSET(dev); erase.length = DEVESIZE(dev); - /* This relies on the fact, that obsolete_flag == 0 */ + /* This relies on the fact, that ENVF_REDUND_OBSOLETE == 0 */ rc = lseek(fd, offset, SEEK_SET); if (rc < 0) { fprintf(stderr, "Cannot seek to set the flag on %s\n", @@ -1150,7 +1153,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) return rc; } ioctl(fd, MEMUNLOCK, &erase); - rc = write(fd, &obsolete_flag, sizeof(obsolete_flag)); + rc = write(fd, &ENVF_REDUND_OBSOLETE, sizeof(ENVF_REDUND_OBSOLETE)); ioctl(fd, MEMLOCK, &erase); if (rc < 0) perror("Could not set obsolete flag"); @@ -1169,7 +1172,7 @@ static int flash_write(int fd_current, int fd_target, int dev_target) (*environment.flags)++; break; case FLAG_BOOLEAN: - *environment.flags = active_flag; + *environment.flags = ENVF_REDUND_ACTIVE; break; default: fprintf(stderr, "Unimplemented flash scheme %u\n", @@ -1508,11 +1511,11 @@ int fw_env_open(struct env_opts *opts) } else { switch (environment.flag_scheme) { case FLAG_BOOLEAN: - if (flag0 == active_flag && - flag1 == obsolete_flag) { + if (flag0 == ENVF_REDUND_ACTIVE && + flag1 == ENVF_REDUND_OBSOLETE) { dev_current = 0; - } else if (flag0 == obsolete_flag && - flag1 == active_flag) { + } else if (flag0 == ENVF_REDUND_OBSOLETE && + flag1 == ENVF_REDUND_ACTIVE) { dev_current = 1; } else if (flag0 == flag1) { dev_current = 0; From patchwork Sun Jul 28 14:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138001 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="G+aiCO0L"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ3G21xpz9s4Y for ; Mon, 29 Jul 2019 00:20:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DAF1BC21D65; Sun, 28 Jul 2019 14:19:09 +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=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 41103C21D8A; Sun, 28 Jul 2019 14:16:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 29926C21D74; Sun, 28 Jul 2019 14:07:03 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 95DA7C21DEC for ; Sun, 28 Jul 2019 14:07:00 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id e20so84097591iob.9 for ; Sun, 28 Jul 2019 07:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8TgOgE7v8HOKzhP7ZseDx1E4luCyVNlhMBAU4l9PSUo=; b=G+aiCO0LjonNByMR/P0VvOesEb6TaGq95hw1kfTBWic5K7oidSrrURrPFyOpRSrtde JEk2t3M7i2AQFnJt34PeQxiMTUUNVSIjOkMFkF53R3Y+T0PSykzPMDvPrb1Cz4UhdDdx aVogGCx267QyHlyq3WMVk2U+B+xQoYYFc86Vg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8TgOgE7v8HOKzhP7ZseDx1E4luCyVNlhMBAU4l9PSUo=; b=B0u6iVY9atYrDsq+NMplqWsQI/xwmx7nll6zjbZfpNagn0wEDA6C4QiL7SwB2QmQjI SSIVAqWK4wVMRdEsL/AHIXcDHEaxUsPSg10ylH0Crl0cdAKu/bowoi5fSrBVUR1HWWma GMRavpHH0+JdjhSXtyK1XHgVzx9yuLhc3/tba4MT/mxaNfBGlb+wsdP0cY4Ju12MLoeW mn0rXl9ihmDhqg8NJdmQVRU14vzRXlVeyybtMybMNKSvEfr+xOe+Atn759PNYyuXNSZM t+xGJr3TtmiARKb9WSIt72ZUasLshQqTpRt5NPpGLCEo2xaesVRDb5MaiU+pGcuYl8bi 8M9w== X-Gm-Message-State: APjAAAVxXpyUwYv2Nr2CPD0hUyM31TH5EvW+l8aGW9zgXs9WxhMyVmib 7oPhV14uAC4eaOkSIqs+VqLgFwtnkX8= X-Google-Smtp-Source: APXvYqzpsTT3avNfHc01imB/ha8qiayWktmWZnYnxW5YzexvGXikM1398nYUfnEFvBUP0ROuCXGlOw== X-Received: by 2002:a05:6602:c7:: with SMTP id z7mr76446979ioe.130.1564322819348; Sun, 28 Jul 2019 07:06:59 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:50 -0600 Message-Id: <20190728140357.137295-34-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 33/39] env: Drop the ACTION typedef 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to both the enum and its members to make it clear that these are related to the environment. Add an ENV prefix to these two flags so that it is clear what they relate too. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass --- api/api.c | 2 +- cmd/nvedit.c | 8 ++++---- drivers/tee/sandbox.c | 6 +++--- env/callback.c | 2 +- env/flags.c | 2 +- include/search.h | 16 ++++++++-------- lib/hashtable.c | 18 +++++++++--------- test/env/hashtable.c | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/api/api.c b/api/api.c index a0fc62ca9e..5e7c8149bf 100644 --- a/api/api.c +++ b/api/api.c @@ -514,7 +514,7 @@ static int API_env_enum(va_list ap) if (s != NULL) *s = 0; search.key = var; - i = hsearch_r(search, FIND, &match, &env_htab, 0); + i = hsearch_r(search, ENVA_FIND, &match, &env_htab, 0); if (i == 0) { i = API_EINVAL; goto done; diff --git a/cmd/nvedit.c b/cmd/nvedit.c index d6a86abb03..3d244951b0 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -98,7 +98,7 @@ static int env_print(char *name, int flag) e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &env_htab, flag); + hsearch_r(e, ENVA_FIND, &ep, &env_htab, flag); if (ep == NULL) return 0; len = printf("%s=%s\n", ep->key, ep->data); @@ -288,7 +288,7 @@ static int _do_env_set(int flag, int argc, char * const argv[], int env_flag) e.key = name; e.data = value; - hsearch_r(e, ENTER, &ep, &env_htab, env_flag); + hsearch_r(e, ENVA_ENTER, &ep, &env_htab, env_flag); free(value); if (!ep) { printf("## Error inserting \"%s\" variable, errno=%d\n", @@ -680,7 +680,7 @@ char *env_get(const char *name) e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &env_htab, 0); return ep ? ep->data : NULL; } @@ -1281,7 +1281,7 @@ static int do_env_exists(cmd_tbl_t *cmdtp, int flag, int argc, e.key = argv[1]; e.data = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &env_htab, 0); return (ep == NULL) ? 1 : 0; } diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c index 4bbcf74967..0561957067 100644 --- a/drivers/tee/sandbox.c +++ b/drivers/tee/sandbox.c @@ -174,7 +174,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &state->pstorage_htab, 0); if (!ep) return TEE_ERROR_ITEM_NOT_FOUND; @@ -198,13 +198,13 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params, e.key = name; e.data = NULL; - hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &state->pstorage_htab, 0); if (ep) hdelete_r(e.key, &state->pstorage_htab, 0); e.key = name; e.data = value; - hsearch_r(e, ENTER, &ep, &state->pstorage_htab, 0); + hsearch_r(e, ENVA_ENTER, &ep, &state->pstorage_htab, 0); if (!ep) return TEE_ERROR_OUT_OF_MEMORY; diff --git a/env/callback.c b/env/callback.c index d539da93aa..9bfa744921 100644 --- a/env/callback.c +++ b/env/callback.c @@ -98,7 +98,7 @@ static int set_callback(const char *name, const char *value, void *priv) e.key = name; e.data = NULL; e.callback = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ if (ep != NULL) { diff --git a/env/flags.c b/env/flags.c index fdbad7bf33..388c2f184b 100644 --- a/env/flags.c +++ b/env/flags.c @@ -458,7 +458,7 @@ static int set_flags(const char *name, const char *value, void *priv) e.key = name; e.data = NULL; e.callback = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENVA_FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ if (ep != NULL) { diff --git a/include/search.h b/include/search.h index c99648f80b..fa7758480b 100644 --- a/include/search.h +++ b/include/search.h @@ -19,11 +19,11 @@ #define __set_errno(val) do { errno = val; } while (0) -/* Action which shall be performed in the call to hsearch. */ -typedef enum { - FIND, - ENTER -} ACTION; +/* enum env_action: action which shall be performed in the call to hsearch */ +enum env_action { + ENVA_FIND, + ENVA_ENTER, +}; /** struct env_entry - An entry in the environment hashtable */ struct env_entry { @@ -64,11 +64,11 @@ extern void hdestroy_r(struct hsearch_data *__htab); /* * Search for entry matching __item.key in internal hash table. If - * ACTION is `FIND' return found entry or signal error by returning - * NULL. If ACTION is `ENTER' replace existing data (if any) with + * __action is `ENVA_FIND' return found entry or signal error by returning + * NULL. If __action is `ENVA_ENTER' replace existing data (if any) with * __item.data. * */ -extern int hsearch_r(struct env_entry __item, ACTION __action, +extern int hsearch_r(struct env_entry __item, enum env_action __action, struct env_entry **__retval, struct hsearch_data *__htab, int __flag); diff --git a/lib/hashtable.c b/lib/hashtable.c index 1093d8adaa..6ff0de3e79 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -194,7 +194,7 @@ void hdestroy_r(struct hsearch_data *htab) * data any more. * - The standard implementation does not provide a way to update an * existing entry. This version will create a new entry or update an - * existing one when both "action == ENTER" and "item.data != NULL". + * existing one when both "action == ENVA_ENTER" and "item.data != NULL". * - Instead of returning 1 on success, we return the index into the * internal hash table, which is also guaranteed to be positive. * This allows us direct access to the found hash table slot for @@ -223,17 +223,17 @@ int hmatch_r(const char *match, int last_idx, struct env_entry **retval, /* * Compare an existing entry with the desired key, and overwrite if the action - * is ENTER. This is simply a helper function for hsearch_r(). + * is ENVA_ENTER. This is simply a helper function for hsearch_r(). */ static inline int _compare_and_overwrite_entry(struct env_entry item, - ACTION action, struct env_entry **retval, + enum env_action action, struct env_entry **retval, struct hsearch_data *htab, int flag, unsigned int hval, unsigned int idx) { if (htab->table[idx].used == hval && strcmp(item.key, htab->table[idx].entry.key) == 0) { /* Overwrite existing value? */ - if ((action == ENTER) && (item.data != NULL)) { + if (action == ENVA_ENTER && item.data) { /* check for permission */ if (htab->change_ok != NULL && htab->change_ok( &htab->table[idx].entry, item.data, @@ -272,8 +272,8 @@ static inline int _compare_and_overwrite_entry(struct env_entry item, return -1; } -int hsearch_r(struct env_entry item, ACTION action, struct env_entry **retval, - struct hsearch_data *htab, int flag) +int hsearch_r(struct env_entry item, enum env_action action, + struct env_entry **retval, struct hsearch_data *htab, int flag) { unsigned int hval; unsigned int count; @@ -354,7 +354,7 @@ int hsearch_r(struct env_entry item, ACTION action, struct env_entry **retval, } /* An empty bucket has been found. */ - if (action == ENTER) { + if (action == ENVA_ENTER) { /* * If table is full and another entry should be * entered return with error. @@ -456,7 +456,7 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag) e.key = (char *)key; - idx = hsearch_r(e, FIND, &ep, htab, 0); + idx = hsearch_r(e, ENVA_FIND, &ep, htab, 0); if (idx == 0) { __set_errno(ESRCH); return 0; /* not found */ @@ -931,7 +931,7 @@ int himport_r(struct hsearch_data *htab, e.key = name; e.data = value; - hsearch_r(e, ENTER, &rv, htab, flag); + hsearch_r(e, ENVA_ENTER, &rv, htab, flag); if (rv == NULL) printf("himport_r: can't insert \"%s=%s\" into hash table\n", name, value); diff --git a/test/env/hashtable.c b/test/env/hashtable.c index bad276bd10..f9f3807fca 100644 --- a/test/env/hashtable.c +++ b/test/env/hashtable.c @@ -28,7 +28,7 @@ static int htab_fill(struct unit_test_state *uts, item.data = key; item.flags = 0; item.key = key; - ut_asserteq(1, hsearch_r(item, ENTER, &ritem, htab, 0)); + ut_asserteq(1, hsearch_r(item, ENVA_ENTER, &ritem, htab, 0)); } return 0; @@ -48,7 +48,7 @@ static int htab_check_fill(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENVA_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); @@ -71,10 +71,10 @@ static int htab_create_delete(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, ENTER, &ritem, htab, 0); + hsearch_r(item, ENVA_ENTER, &ritem, htab, 0); ritem = NULL; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENVA_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); From patchwork Sun Jul 28 14:03:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138000 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oCLZ4U4f"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ313pRPz9s4Y for ; Mon, 29 Jul 2019 00:20:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 29E67C21E12; Sun, 28 Jul 2019 14:17:01 +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=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 A2633C21DEC; Sun, 28 Jul 2019 14:11:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6D425C21DFB; Sun, 28 Jul 2019 14:07:04 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 578F7C21DF3 for ; Sun, 28 Jul 2019 14:07:02 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id g20so114471118ioc.12 for ; Sun, 28 Jul 2019 07:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ONPFUiMygPxXHaH4f+cNwq12W3pyiQkk/UA0KfA+IZ0=; b=oCLZ4U4fDbEBADDocc2S4WPxfNyQmOx66aFYZ2sDaUURsU4MGrqe92iFszGZuSCtmA 6QR9D/cuTHHwGf4s/AWsCOSTgvqR3C9CJlG220VJy+mXSfs9MuYNWb/lxgCwag9CbU4w D2xdT5qFxdZlj/0ktaoMBhCChB3NVsk0mKdjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ONPFUiMygPxXHaH4f+cNwq12W3pyiQkk/UA0KfA+IZ0=; b=pWVBNsrfKXyCULNpegx6vLUYcA5EWjJA43EhAb2fFqs9crZb+OLwYAiusUQ9TQFPRh G39MR+A042111b82g/erLUx4GRaX0fSG2jNoCkm9C5Z8KS23e+CNqO3u37nwWWKdqwkK sp5IB32SKd3skdygUHg0BGD+RlpHbJNxVsZooIAvwYVhNMc6bhRmn+7K+A1WV56DBas2 c1sgOo8PllA7JgO2oKKpAXQ2haMtsH0MzlEtIj12nEnUXUfTIoymFBY3NSQB2F9+jMuK 3EvmZGkURuZoXw79m12FE2T7tcJdtMveh2lXKN+P4uOeyF2UoED8AA+2t2ZrFqS0TapG 0NQQ== X-Gm-Message-State: APjAAAUHwk3PM4+dqk2YnfwRaIcrnJUhi6YSqRtZUnnpipyl5/2ItwyO 5bWFWBsQ5kiTzlziZBafWlaQrlpn78w= X-Google-Smtp-Source: APXvYqwykLjBhRx9/tBBrS6mLmbWEOuoyvR6FxnsoPdHUAPm9UY6Worz757KHwxTbBKgv2HYGfRu0g== X-Received: by 2002:a5d:8c97:: with SMTP id g23mr20084661ion.250.1564322821170; Sun, 28 Jul 2019 07:07:01 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:51 -0600 Message-Id: <20190728140357.137295-35-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 34/39] env: Drop the double underscores in search.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There doesn't seem to be any good reason for using __ in the arguments in this header file. A double underscore is usually reserved for compiler features. Drop these and remove the unnecessary 'extern' as well. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- include/search.h | 52 ++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/include/search.h b/include/search.h index fa7758480b..f85d81b779 100644 --- a/include/search.h +++ b/include/search.h @@ -17,7 +17,7 @@ #include #include -#define __set_errno(val) do { errno = val; } while (0) +#define set_errno(val) do { errno = val; } while (0) /* enum env_action: action which shall be performed in the call to hsearch */ enum env_action { @@ -47,58 +47,54 @@ struct hsearch_data { unsigned int filled; /* * Callback function which will check whether the given change for variable - * "__item" to "newval" may be applied or not, and possibly apply such change. + * "item" to "newval" may be applied or not, and possibly apply such change. * When (flag & H_FORCE) is set, it shall not print out any error message and * shall force overwriting of write-once variables. * Must return 0 for approval, 1 for denial. */ - int (*change_ok)(const struct env_entry *__item, const char *newval, + int (*change_ok)(const struct env_entry *item, const char *newval, enum env_op, int flag); }; -/* Create a new hash table which will contain at most "__nel" elements. */ -extern int hcreate_r(size_t __nel, struct hsearch_data *__htab); +/* Create a new hash table which will contain at most "nel" elements. */ +int hcreate_r(size_t nel, struct hsearch_data *htab); /* Destroy current internal hash table. */ -extern void hdestroy_r(struct hsearch_data *__htab); +void hdestroy_r(struct hsearch_data *htab); /* - * Search for entry matching __item.key in internal hash table. If - * __action is `ENVA_FIND' return found entry or signal error by returning - * NULL. If __action is `ENVA_ENTER' replace existing data (if any) with - * __item.data. + * Search for entry matching item.key in internal hash table. If + * action is `ENVA_FIND' return found entry or signal error by returning + * NULL. If action is `ENVA_ENTER' replace existing data (if any) with + * item.data. * */ -extern int hsearch_r(struct env_entry __item, enum env_action __action, - struct env_entry **__retval, struct hsearch_data *__htab, - int __flag); +int hsearch_r(struct env_entry item, enum env_action action, + struct env_entry **retval, struct hsearch_data *htab, int flag); /* - * Search for an entry matching "__match". Otherwise, Same semantics + * Search for an entry matching "match". Otherwise, Same semantics * as hsearch_r(). */ -extern int hmatch_r(const char *__match, int __last_idx, - struct env_entry **__retval, struct hsearch_data *__htab); +int hmatch_r(const char *match, int last_idx, struct env_entry **retval, + struct hsearch_data *htab); -/* Search and delete entry matching "__key" in internal hash table. */ -extern int hdelete_r(const char *__key, struct hsearch_data *__htab, - int __flag); +/* Search and delete entry matching "key" in internal hash table. */ +int hdelete_r(const char *key, struct hsearch_data *htab, int flag); -extern ssize_t hexport_r(struct hsearch_data *__htab, - const char __sep, int __flag, char **__resp, size_t __size, - int argc, char * const argv[]); +ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, + char **resp, size_t size, int argc, char * const argv[]); /* * nvars: length of vars array * vars: array of strings (variable names) to import (nvars == 0 means all) */ -extern int himport_r(struct hsearch_data *__htab, - const char *__env, size_t __size, const char __sep, - int __flag, int __crlf_is_lf, int nvars, - char * const vars[]); +int himport_r(struct hsearch_data *htab, const char *env, size_t size, + const char sep, int flag, int crlf_is_lf, int nvars, + char * const vars[]); /* Walk the whole table calling the callback on each element */ -extern int hwalk_r(struct hsearch_data *__htab, - int (*callback)(struct env_entry *entry)); +int hwalk_r(struct hsearch_data *htab, + int (*callback)(struct env_entry *entry)); /* Flags for himport_r(), hexport_r(), hdelete_r(), and hsearch_r() */ #define H_NOCLEAR (1 << 0) /* do not clear hash table before importing */ From patchwork Sun Jul 28 14:03:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138003 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ol5WkdDg"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ4S2YJ6z9s4Y for ; Mon, 29 Jul 2019 00:22:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id EDE91C21DEC; Sun, 28 Jul 2019 14:14:50 +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=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 BDC03C21E62; Sun, 28 Jul 2019 14:10:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 90731C21E0F; Sun, 28 Jul 2019 14:07:06 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 266A7C21DCA for ; Sun, 28 Jul 2019 14:07:04 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id s7so114360994iob.11 for ; Sun, 28 Jul 2019 07:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RENEJvgfOzGUo0QMgd0erz1IwaiKLVpj0xLJnsm/k1M=; b=Ol5WkdDgkw+4VS3m/ksRIyHBkfCHAr3+4hO0PW8x/MX+JvXnbW/ryx9fvUkX3Gs6Yb GZa0UYnnYFBDDC9pSSbyp6kPbBcD8n+c6CAbgngzAVLdHtSiE+OrKqjhMcwKCkGo63Mj 5PquRmSRp1TRi/hJAc857YIfPV4v14qNBCA0I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RENEJvgfOzGUo0QMgd0erz1IwaiKLVpj0xLJnsm/k1M=; b=hjpmH+OVRiqIAN6UPlxwjobcJzYEfMnLRjqHdah6suhAYtKOEL/ABB3Al4zOco9iN1 Dm4s0uh0k6KIMYR3tMPYquOX06U2XJpun12dT8Wwf07EduVOhHfPI7QVYpbgKazCuoJ0 u4jyUMVcT6IrTPttEME1CvBL7jCdxL1eYqV8blg7HIACsMlxtrfkIodbngAqvz2Loxw6 uEFrd5FH6NtmhvcNNFYW9KRBchKclpW9vTIYI7D5omGU3CSviG40JY+/UWqCiK7aN1i7 P+6gpCSfHHBEQWiYfufSqyG64M1HJ9vfzRFYd0RQzkZwWJix/ys8STN3dlb+2PExUXnD jLrg== X-Gm-Message-State: APjAAAU3ARz0w1PRApdVnmPPBgm9uGFU9IELTkyOnaksxG7U9PZLWsy1 2NRXC3ExOI4e3evCaFvV7d+lAzo6g1g= X-Google-Smtp-Source: APXvYqw1/AdmKu+JwBmk0PBzvDEG0sBEgDhDiYOq5xsetpXvR5K3ep2kHJXVeVqxVeuzuypMybqrWg== X-Received: by 2002:a6b:7619:: with SMTP id g25mr45379824iom.92.1564322822984; Sun, 28 Jul 2019 07:07:02 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:52 -0600 Message-Id: <20190728140357.137295-36-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 35/39] env: Move TOTAL_MALLOC_LEN to environment.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This declaration is only used in three files. Although it relates to malloc() it is actually only used during malloc() init. It uses CONFIG options including CONFIG_ENV_ADDR which are defined only in environment.h so this header must be included anyway, for TOTAL_MALLOC_LEN to be correct. Nove it to environment.h to simplify the common file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/x86/cpu/qemu/e820.c | 1 + include/common.h | 10 ---------- include/environment.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c index 0a690fde68..7b3bc7db5e 100644 --- a/arch/x86/cpu/qemu/e820.c +++ b/arch/x86/cpu/qemu/e820.c @@ -4,6 +4,7 @@ */ #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/include/common.h b/include/common.h index 70f40daa9e..34ae514805 100644 --- a/include/common.h +++ b/include/common.h @@ -45,16 +45,6 @@ typedef void (interrupt_handler_t)(void *); #include /* boot information for Linux kernel */ #include /* global data used for startup functions */ -#if defined(CONFIG_ENV_IS_EMBEDDED) -#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN -#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ - (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \ - defined(CONFIG_ENV_IS_IN_NVRAM) -#define TOTAL_MALLOC_LEN (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) -#else -#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN -#endif - /* startup functions, used in: * common/board_f.c * common/init/board_init.c diff --git a/include/environment.h b/include/environment.h index 70ee0fdb19..cc8c0546c2 100644 --- a/include/environment.h +++ b/include/environment.h @@ -141,6 +141,20 @@ extern unsigned long nand_env_oob_offset; #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) +/* + * If the environment is in RAM, allocate extra space for it in the malloc + * region. + */ +#if defined(CONFIG_ENV_IS_EMBEDDED) +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#elif (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE < CONFIG_SYS_MONITOR_BASE) || \ + (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) || \ + defined(CONFIG_ENV_IS_IN_NVRAM) +#define TOTAL_MALLOC_LEN (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) +#else +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#endif + typedef struct environment_s { uint32_t crc; /* CRC32 over data bytes */ #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT From patchwork Sun Jul 28 14:03:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138008 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="latzfQrw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ7K2XGWz9s8m for ; Mon, 29 Jul 2019 00:24:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E33A7C21DCA; Sun, 28 Jul 2019 14:17:55 +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=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 2AC68C21E1A; Sun, 28 Jul 2019 14:12:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D2BC5C21DDC; Sun, 28 Jul 2019 14:07:10 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id D11D8C21DB3 for ; Sun, 28 Jul 2019 14:07:06 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id o9so10895960iom.3 for ; Sun, 28 Jul 2019 07:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8Pmbk//YJvUOE2pExsge1VACkzbSBkDJmKeeGJnp5V4=; b=latzfQrw7KCElzCkC2MVGUiW5d1gxSpJFJaDPxwWHC6d1dNu9QTnQdVNj4OFo8zCxr X5ij2LBeps64ztOEhHyD0JoJHYwOeBpSpZtCBYyfaIfCGeLA+tEfcUHpv/zfInFxbNaA M4YuI/1No30sP3pj+EMsL1aaTsJy72raOvF5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8Pmbk//YJvUOE2pExsge1VACkzbSBkDJmKeeGJnp5V4=; b=ppCZlPdDkHG659ycCRUX/NHYt0ukXsXHmmj48TDdQ2fkjco5DXoMnW4o2PIwQVofPf uQNGc07Yv703gdIVEfxROL/9O/sFqkdvHRy2v1o+u6F7zexh2g4i+o3PISWAKFoFjYL8 TNOwPGHFoG8sEko/E9+yzlCGjVntLUj0DqZZfLd9aI4PzuGy34W0OQlUIqvXK61wLCN8 /Nrjho3qvI5o85fM3ScSfioo1qYfB12DygX5UoEVEo58vr4qyS09oWLg5pOV27pMCxO6 FAgZ0FIY0KuBtvZHPS6xOWR2xsNJRMi6NiCy5UNJTSw7Ui0zOLsdpENg5LjFwtvSz/zA Wx+w== X-Gm-Message-State: APjAAAV2/gYUNJkpd1R2oapHmMjp2zk79C7WUqke1GGAkQ00Pv2DyyA0 xWykgRJ6l3G1nMFNNkI1X/XeOAG2pwo= X-Google-Smtp-Source: APXvYqxt4m0mHuDxZ21tZwIP8ALpOSC9xup15Z9Vmh+XrB/r/U7Mv8jZKBZqs4cseLgzLkD2XKecrg== X-Received: by 2002:a6b:691d:: with SMTP id e29mr47281208ioc.96.1564322824855; Sun, 28 Jul 2019 07:07:04 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:53 -0600 Message-Id: <20190728140357.137295-37-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 36/39] env: Drop environment.h header file where not needed 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/cpu/arm926ejs/spear/spr_misc.c | 1 - arch/arm/mach-davinci/misc.c | 1 - arch/arm/mach-imx/cmd_dek.c | 1 - arch/arm/mach-imx/mx6/opos6ul.c | 1 - arch/arm/mach-meson/board-common.c | 1 - arch/arm/mach-omap2/boot-common.c | 1 - arch/arm/mach-omap2/omap3/clock.c | 1 - arch/arm/mach-omap2/utils.c | 1 - arch/arm/mach-stm32mp/cpu.c | 1 - arch/arm/mach-tegra/cboot.c | 1 - arch/m68k/lib/bootm.c | 1 - arch/nds32/include/asm/u-boot.h | 1 - arch/powerpc/cpu/mpc85xx/fdt.c | 1 - arch/powerpc/lib/bootm.c | 1 - arch/riscv/include/asm/u-boot.h | 1 - board/Arcturus/ucp1020/cmd_arc.c | 1 - board/CZ.NIC/turris_mox/turris_mox.c | 1 - board/CZ.NIC/turris_omnia/turris_omnia.c | 1 - board/LaCie/net2big_v2/net2big_v2.c | 1 - board/LaCie/netspace_v2/netspace_v2.c | 1 - board/amlogic/p200/p200.c | 1 - board/amlogic/p201/p201.c | 1 - board/amlogic/p212/p212.c | 1 - board/amlogic/q200/q200.c | 1 - board/amlogic/s400/s400.c | 1 - board/amlogic/u200/u200.c | 1 - board/armadeus/apf27/apf27.c | 1 - board/atmel/common/mac_eeprom.c | 1 - board/birdland/bav335x/board.c | 1 - board/bosch/guardian/board.c | 1 - board/bosch/shc/board.c | 1 - board/compulab/cl-som-imx7/cl-som-imx7.c | 1 - board/compulab/cm_fx6/cm_fx6.c | 1 - board/compulab/cm_t335/cm_t335.c | 1 - board/compulab/cm_t35/cm_t35.c | 1 - board/compulab/cm_t54/cm_t54.c | 1 - board/davinci/da8xxevm/da850evm.c | 1 - board/dhelectronics/dh_imx6/dh_imx6.c | 1 - board/eets/pdu001/board.c | 1 - board/freescale/imx8qm_mek/imx8qm_mek.c | 1 - board/freescale/imx8qxp_mek/imx8qxp_mek.c | 1 - board/gateworks/gw_ventana/gw_ventana.c | 1 - board/gateworks/gw_ventana/gw_ventana_spl.c | 1 - board/ge/mx53ppd/mx53ppd.c | 1 - board/grinn/chiliboard/board.c | 1 - board/gumstix/pepper/board.c | 1 - board/imgtec/ci20/ci20.c | 1 - board/intel/edison/edison.c | 1 - board/isee/igep003x/board.c | 1 - board/k+p/kp_imx53/kp_id_rev.c | 1 - board/kosagi/novena/novena.c | 1 - board/liebherr/display5/display5.c | 1 - board/liebherr/display5/spl.c | 1 - board/logicpd/zoom1/zoom1.c | 1 - board/mscc/ocelot/ocelot.c | 1 - board/nvidia/p2371-2180/p2371-2180.c | 1 - board/nvidia/p2771-0000/p2771-0000.c | 1 - board/phytec/pcm051/board.c | 1 - board/phytec/pcm052/pcm052.c | 1 - board/phytec/phycore_rk3288/phycore-rk3288.c | 1 - board/qualcomm/dragonboard410c/dragonboard410c.c | 1 - board/raspberrypi/rpi/rpi.c | 1 - board/renesas/blanche/blanche.c | 1 - board/renesas/sh7752evb/sh7752evb.c | 1 - board/renesas/sh7753evb/sh7753evb.c | 1 - board/renesas/sh7757lcr/sh7757lcr.c | 1 - board/rockchip/tinker_rk3288/tinker-rk3288.c | 1 - board/samtec/vining_fpga/socfpga.c | 1 - board/siemens/common/factoryset.c | 1 - board/siemens/pxm2/board.c | 1 - board/siemens/taurus/taurus.c | 1 - board/silica/pengwyn/board.c | 1 - board/softing/vining_2000/vining_2000.c | 1 - board/tcl/sl50/board.c | 1 - board/technologic/ts4800/ts4800.c | 1 - board/theobroma-systems/puma_rk3399/puma-rk3399.c | 1 - board/ti/am335x/board.c | 1 - board/ti/am43xx/board.c | 1 - board/ti/am57xx/board.c | 1 - board/ti/dra7xx/evm.c | 1 - board/ti/ti814x/evm.c | 1 - board/ti/ti816x/evm.c | 1 - board/timll/devkit8000/devkit8000.c | 1 - board/toradex/apalis-imx8/apalis-imx8.c | 1 - board/toradex/apalis_imx6/apalis_imx6.c | 1 - board/toradex/colibri-imx8x/colibri-imx8x.c | 1 - board/toradex/colibri_imx6/colibri_imx6.c | 1 - board/toradex/common/tdx-common.c | 1 - board/vscom/baltos/board.c | 1 - cmd/aes.c | 1 - cmd/blob.c | 1 - cmd/bootm.c | 1 - cmd/efidebug.c | 1 - cmd/elf.c | 1 - cmd/ethsw.c | 1 - cmd/i2c.c | 1 - cmd/ini.c | 1 - cmd/tpm_test.c | 1 - common/image.c | 1 - common/spl/spl_dfu.c | 1 - drivers/bootcount/bootcount_env.c | 1 - drivers/mtd/jedec_flash.c | 1 - drivers/net/fec_mxc.c | 1 - drivers/net/fm/fm.c | 1 - drivers/net/fsl_mcdmafec.c | 1 - drivers/net/mcffec.c | 1 - drivers/net/ne2000_base.c | 1 - drivers/net/sh_eth.c | 1 - drivers/net/ti/cpsw-common.c | 1 - drivers/qe/qe.c | 1 - drivers/usb/gadget/ether.c | 1 - lib/efi_loader/efi_boottime.c | 1 - net/eth-uclass.c | 1 - net/eth_common.c | 1 - net/eth_legacy.c | 1 - net/wol.c | 1 - 116 files changed, 116 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index 533268513e..d36484c9d6 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index b310bc7293..80e964274e 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c index 463b869420..1b111ba26b 100644 --- a/arch/arm/mach-imx/cmd_dek.c +++ b/arch/arm/mach-imx/cmd_dek.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 183a0c961c..3ab9a3f022 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -14,7 +14,6 @@ #include #include #include -#include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index 08a7aae2b9..0843dca156 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index c8b8ac657f..eb8c5843fa 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-omap2/omap3/clock.c b/arch/arm/mach-omap2/omap3/clock.c index cb9e91ebc3..71f73492c6 100644 --- a/arch/arm/mach-omap2/omap3/clock.c +++ b/arch/arm/mach-omap2/omap3/clock.c @@ -17,7 +17,6 @@ #include #include #include -#include #include /****************************************************************************** diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index cf4f10a8f5..b6d019ab18 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -5,7 +5,6 @@ */ #include #include -#include #include #include #include diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index b06b84c315..a46e8438f7 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c index bd4f33686d..0433081c6c 100644 --- a/arch/arm/mach-tegra/cboot.c +++ b/arch/arm/mach-tegra/cboot.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index 5b7a68b250..19445b3fc7 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #ifdef CONFIG_SHOW_BOOT_PROGRESS # include diff --git a/arch/nds32/include/asm/u-boot.h b/arch/nds32/include/asm/u-boot.h index 68701d6da9..8c949e7fb7 100644 --- a/arch/nds32/include/asm/u-boot.h +++ b/arch/nds32/include/asm/u-boot.h @@ -21,7 +21,6 @@ #include -#include typedef struct bd_info { unsigned long bi_arch_number; /* unique id for this board */ diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index d17c382cc9..db12aefb29 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 52bcd4e6f1..84691b7554 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/riscv/include/asm/u-boot.h b/arch/riscv/include/asm/u-boot.h index 3186835e0a..5ba8e77812 100644 --- a/arch/riscv/include/asm/u-boot.h +++ b/arch/riscv/include/asm/u-boot.h @@ -20,7 +20,6 @@ #include -#include typedef struct bd_info { unsigned long bi_boot_params; /* where this board expects params */ diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index 755f569d13..2e8477ed3b 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static ulong fwenv_addr[MAX_FWENV_ADDR]; diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index f3c89d63d5..946e20ab49 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "mox_sp.h" diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 418657c2d5..1d8d08a847 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c index 1609089502..686608d25a 100644 --- a/board/LaCie/net2big_v2/net2big_v2.c +++ b/board/LaCie/net2big_v2/net2big_v2.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index ba667934e4..bd7ab22948 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c index 7f33ce0f0b..41d331dda2 100644 --- a/board/amlogic/p200/p200.c +++ b/board/amlogic/p200/p200.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c index 0a17fbedf1..e46fcaea6d 100644 --- a/board/amlogic/p201/p201.c +++ b/board/amlogic/p201/p201.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c index 4d6ac7264c..094ab5478d 100644 --- a/board/amlogic/p212/p212.c +++ b/board/amlogic/p212/p212.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c index 880945f143..f1faa7418e 100644 --- a/board/amlogic/q200/q200.c +++ b/board/amlogic/q200/q200.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c index 02a0e9286c..bdb4eca883 100644 --- a/board/amlogic/s400/s400.c +++ b/board/amlogic/s400/s400.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c index 94ee3ce6e4..69fd29d4fe 100644 --- a/board/amlogic/u200/u200.c +++ b/board/amlogic/u200/u200.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index bf2586d326..20be0c3bd4 100644 --- a/board/armadeus/apf27/apf27.c +++ b/board/armadeus/apf27/apf27.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c index f016ef7a6a..83a7778e99 100644 --- a/board/atmel/common/mac_eeprom.c +++ b/board/atmel/common/mac_eeprom.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index b0339ad8f0..9e64cbbc82 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "board.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index 86ab180f5c..bc3c6d229c 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index 29be3739f9..358118f757 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "mmc.h" #include "board.h" diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 6cc7554c1a..395d5dce17 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 57bbe41b8c..feb7a71f00 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c index fca7685ca7..6e38745191 100644 --- a/board/compulab/cm_t335/cm_t335.c +++ b/board/compulab/cm_t335/cm_t335.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index ead4700646..b52358baac 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c index d7c59d5a32..811bbb528a 100644 --- a/board/compulab/cm_t54/cm_t54.c +++ b/board/compulab/cm_t54/cm_t54.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 88a21ba433..af5559a370 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index a920e262db..b1b0cd9ec8 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 74a6684274..8a3d0ada27 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index b7caa31954..a6702073b3 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index f42a3aa908..118c7e7bf5 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 3c40a4a892..8a694a71c9 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index 6886ff9b33..b0891379a1 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index aadf4668d9..5448567298 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index 6b9e6e9a09..c6d53600fa 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c index 7ae4c5cd77..f5beb8c940 100644 --- a/board/gumstix/pepper/board.c +++ b/board/gumstix/pepper/board.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "board.h" diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c index f72a660581..5368b67b38 100644 --- a/board/imgtec/ci20/ci20.c +++ b/board/imgtec/ci20/ci20.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index 599e1e35bc..40d51df661 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index 398c945990..a8c2b121a4 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "board.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c index 642adf78d8..9dae54dda5 100644 --- a/board/k+p/kp_imx53/kp_id_rev.c +++ b/board/k+p/kp_imx53/kp_id_rev.c @@ -11,7 +11,6 @@ #include #include -#include #include #include "kp_id_rev.h" diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index e0f0d7c60c..b7b747d196 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 4dcd52625f..164eb6c3b3 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index d92760b487..354b63e431 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -18,7 +18,6 @@ #include "asm/arch/iomux.h" #include #include -#include #include #include #include diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 54716125f3..6bfa41737f 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c index bcae8fa50c..91d03951db 100644 --- a/board/mscc/ocelot/ocelot.c +++ b/board/mscc/ocelot/ocelot.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c index b1da5c9982..fa5288bf18 100644 --- a/board/nvidia/p2371-2180/p2371-2180.c +++ b/board/nvidia/p2371-2180/p2371-2180.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c index 8c91b75f96..63cdb3a604 100644 --- a/board/nvidia/p2771-0000/p2771-0000.c +++ b/board/nvidia/p2771-0000/p2771-0000.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c index 0cb85e940c..43f6c5afcb 100644 --- a/board/phytec/pcm051/board.c +++ b/board/phytec/pcm051/board.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index 2417111765..e1ebe8e75d 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -15,7 +15,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index 0a341e717f..81c5ab38ca 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index 06d3d7e0f8..d7f0f93fb1 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 104589bff1..7a6ca8f759 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c index 898abfbd85..08c5448609 100644 --- a/board/renesas/blanche/blanche.c +++ b/board/renesas/blanche/blanche.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index b14ce263f7..d0b850f35d 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index f643867806..e1bed7dcc3 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index 2d32440aeb..d2671202e9 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index de9f1e4a8c..19e278e210 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/board/samtec/vining_fpga/socfpga.c b/board/samtec/vining_fpga/socfpga.c index 63ce4a20b5..1e095a4e7d 100644 --- a/board/samtec/vining_fpga/socfpga.c +++ b/board/samtec/vining_fpga/socfpga.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index cd224a8e1c..049a65ff77 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c index 0a82a5ef5c..30f0902701 100644 --- a/board/siemens/pxm2/board.c +++ b/board/siemens/pxm2/board.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index d0efb67bbc..1cf1f9e1f7 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c index dc10b76160..345701fd52 100644 --- a/board/silica/pengwyn/board.c +++ b/board/silica/pengwyn/board.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index d1df8fc0cc..51985b91c2 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index 8ddbee5436..a9c9d377b4 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "board.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c index 38d3a3de26..82eb0c285c 100644 --- a/board/technologic/ts4800/ts4800.c +++ b/board/technologic/ts4800/ts4800.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 49d7979ec1..8d082b933c 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 58d09f7c20..54adcd510d 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "../common/board_detect.h" #include "board.h" diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 756b516aa6..2e09cc20e8 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 0dacfd4327..f78e6c2e1f 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 97eef65d51..74d04bb1e3 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c index a4c094b6dc..2b9385d14b 100644 --- a/board/ti/ti814x/evm.c +++ b/board/ti/ti814x/evm.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index de9e91a685..8f7b591b5c 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index f8970b0b6d..490d8cbcd0 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 135cf0c237..387f7299fc 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 89f1b728fd..6421a22c25 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index 366cfb53d7..ed1fdbc93c 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index f657db87d8..ad40b589c1 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 71642a13ea..e9441a7979 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -5,7 +5,6 @@ #include #include -#include #include #include diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index 5f5a51bfbf..f5540841c9 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "board.h" diff --git a/cmd/aes.c b/cmd/aes.c index 25efb9642a..7ff4a71709 100644 --- a/cmd/aes.c +++ b/cmd/aes.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/cmd/blob.c b/cmd/blob.c index d3b6e454bf..80478b8802 100644 --- a/cmd/blob.c +++ b/cmd/blob.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/cmd/bootm.c b/cmd/bootm.c index b326ac9b43..8279f2b7cc 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 02dc491a68..e610dd308c 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/cmd/elf.c b/cmd/elf.c index 5e5cf47cf8..538562fda5 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #ifdef CONFIG_X86 diff --git a/cmd/ethsw.c b/cmd/ethsw.c index 0b57a69f2f..8846805799 100644 --- a/cmd/ethsw.c +++ b/cmd/ethsw.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/cmd/i2c.c b/cmd/i2c.c index 09c4ba9a1c..e0f8ece597 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -71,7 +71,6 @@ #include #include #include -#include #include #include #include diff --git a/cmd/ini.c b/cmd/ini.c index f4faa7cae1..0c425262d0 100644 --- a/cmd/ini.c +++ b/cmd/ini.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index 56a5aa4aa5..c14dd75a26 100644 --- a/cmd/tpm_test.c +++ b/cmd/tpm_test.c @@ -5,7 +5,6 @@ #include #include -#include #include #include "tpm-user-utils.h" diff --git a/common/image.c b/common/image.c index eaff468b7b..ce0f616ad4 100644 --- a/common/image.c +++ b/common/image.c @@ -17,7 +17,6 @@ #include -#include #include #include diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c index 3f54ae0260..5728d43ad3 100644 --- a/common/spl/spl_dfu.c +++ b/common/spl/spl_dfu.c @@ -15,7 +15,6 @@ #include #include #include -#include static int run_dfu(int usb_index, char *interface, char *devstring) { diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c index 50e0857b3b..b75c9002b2 100644 --- a/drivers/bootcount/bootcount_env.c +++ b/drivers/bootcount/bootcount_env.c @@ -6,7 +6,6 @@ #include #include -#include void bootcount_store(ulong a) { diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index a3540c1115..f59b2bc62f 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -15,7 +15,6 @@ #include #include #include -#include #define P_ID_AMD_STD CFI_CMDSET_AMD_LEGACY diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 9fb3ac9ccd..ad7a43eb89 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index ce0f1678fd..4c9dce8dc5 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -15,7 +15,6 @@ #include #include #include -#include #ifdef CONFIG_ARM64 #include diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index 41752c0b6a..e66fb16de8 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index a8553cbbc2..fb93041256 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c index 3bc7a35086..819a246070 100644 --- a/drivers/net/ne2000_base.c +++ b/drivers/net/ne2000_base.c @@ -75,7 +75,6 @@ Add SNMP #include #include #include -#include #include #include #include diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index dfc41bcbc4..118a88183a 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c index ac12cfe9b8..21b8bbda3d 100644 --- a/drivers/net/ti/cpsw-common.c +++ b/drivers/net/ti/cpsw-common.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 505ae9b45f..6e4d732a07 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -14,7 +14,6 @@ #include #include #include -#include #ifdef CONFIG_ARCH_LS1021A #include diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index fa49d3126f..a118283984 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 4f6e8d1679..c59cdb268a 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 4e4f472431..1d5d2f03b7 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/net/eth_common.c b/net/eth_common.c index dcc59186d8..ed26b1b693 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include "eth_internal.h" diff --git a/net/eth_legacy.c b/net/eth_legacy.c index 0f558b23ce..850f362d87 100644 --- a/net/eth_legacy.c +++ b/net/eth_legacy.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/net/wol.c b/net/wol.c index 51543343e4..0a625668a9 100644 --- a/net/wol.c +++ b/net/wol.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "wol.h" static ulong wol_timeout = WOL_DEFAULT_TIMEOUT; From patchwork Sun Jul 28 14:03:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138014 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kENgLx/V"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQBY5wZbz9s4Y for ; Mon, 29 Jul 2019 00:27:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 72DD7C21E08; Sun, 28 Jul 2019 14:15:05 +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=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 4C1E7C21E73; Sun, 28 Jul 2019 14:10:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 06057C21DC1; Sun, 28 Jul 2019 14:07:11 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 2CF97C21DCA for ; Sun, 28 Jul 2019 14:07:08 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id g20so114471424ioc.12 for ; Sun, 28 Jul 2019 07:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xBMQS/QxZerUBm0uNfzuzJiqO190H1TrfWIOllVb9eo=; b=kENgLx/V/ny/emEwoSlWDcn758EgqSiWBwErbVmzoctl1QW8YznJ+jyLi2Y7L3DCk+ l4WB87yLuGXOpXtTegfOnja4Dk0WWG5nFUd17aqqh9cElc9x8vC506g08mwnGrn6Y4Wu od9GEvJXClcpwx1RtrNbgbYtkUtMwEQLIK830= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xBMQS/QxZerUBm0uNfzuzJiqO190H1TrfWIOllVb9eo=; b=udtu0MTAsloug7qeJVXSxdgapoJjnvGL3msTwvqEaO187zQLnVBbkTRgFnSxA/Ai+7 qfv2c2RSPDw0ZZCK4jQOkGn4ux6s6UB/eVghmZzmQcAoPGjNjJiZNQdRY8q8wARifHUK yeAX1lvVgVTg7vrEvIk92wq687oiO4eNixBsQETgG849s3/IPePZfzZ+EY6vRwYHS/d1 4v69v5Mv68doTyLu6qoo0apug/YlGnWyCgvtX8NQ8HDcIeVY4DAzzLiJcaKcfYkaNFom Ef3qHp2X/fE2c2adFEqQ56JjNLjnKicj5l79nY6b88C0gwCnoYRT2dCIj/JwtB8ETgsx VCTQ== X-Gm-Message-State: APjAAAVNvulQmMUCoWoor2LcqNz2fzWqFXA7cvN9mFTaJ4uLopgxf4yo wdFknEbUToCimlhzET+Ol1Q8jSwGMGg= X-Google-Smtp-Source: APXvYqwhqdSzf8/un/lYW7/krl/1ve3JN/rOO9C7Wn4em+zt+3qA9WtfE1RW72bhTGz4W0bAWftjDg== X-Received: by 2002:a02:300b:: with SMTP id q11mr110058801jaq.54.1564322826589; Sun, 28 Jul 2019 07:07:06 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:54 -0600 Message-Id: <20190728140357.137295-38-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 37/39] env: Rename environment.h to env_internal.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This file contains lots of internal details about the environment. Most code can include env.h instead, calling the functions there as needed. Rename this file and add a comment at the top to indicate its internal nature. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- api/api.c | 2 +- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- arch/arm/cpu/armv8/fsl-layerscape/soc.c | 2 +- arch/x86/cpu/qemu/e820.c | 2 +- board/Arcturus/ucp1020/spl.c | 2 +- board/birdland/bav335x/board.c | 2 +- board/bosch/guardian/board.c | 2 +- board/bosch/shc/board.c | 2 +- board/buffalo/lsxl/lsxl.c | 2 +- board/freescale/b4860qds/spl.c | 2 +- board/freescale/c29xpcie/spl.c | 2 +- board/freescale/ls1012afrdm/ls1012afrdm.c | 2 +- board/freescale/ls1012aqds/ls1012aqds.c | 2 +- board/freescale/ls1012ardb/ls1012ardb.c | 2 +- board/freescale/ls1028a/ls1028a.c | 2 +- board/freescale/ls1088a/ls1088a.c | 2 +- board/freescale/ls2080a/ls2080a.c | 2 +- board/freescale/ls2080aqds/ls2080aqds.c | 2 +- board/freescale/ls2080ardb/ls2080ardb.c | 2 +- board/freescale/lx2160a/lx2160a.c | 2 +- board/freescale/p1010rdb/spl.c | 2 +- board/freescale/p1022ds/spl.c | 2 +- board/freescale/p1_p2_rdb_pc/spl.c | 2 +- board/freescale/t102xqds/spl.c | 2 +- board/freescale/t102xrdb/spl.c | 2 +- board/freescale/t104xrdb/spl.c | 2 +- board/freescale/t208xqds/spl.c | 2 +- board/freescale/t208xrdb/spl.c | 2 +- board/freescale/t4qds/spl.c | 2 +- board/freescale/t4rdb/spl.c | 2 +- board/gardena/smart-gateway-mt7688/board.c | 2 +- board/renesas/alt/alt.c | 2 +- board/renesas/gose/gose.c | 2 +- board/renesas/koelsch/koelsch.c | 2 +- board/renesas/lager/lager.c | 2 +- board/renesas/porter/porter.c | 2 +- board/renesas/silk/silk.c | 2 +- board/renesas/stout/stout.c | 2 +- board/st/stm32mp1/stm32mp1.c | 2 +- board/sunxi/board.c | 2 +- board/tcl/sl50/board.c | 2 +- board/ti/am335x/board.c | 2 +- cmd/nvedit.c | 2 +- common/board_f.c | 2 +- common/board_r.c | 2 +- common/console.c | 2 +- drivers/mtd/cfi_flash.c | 2 +- drivers/serial/serial-uclass.c | 2 +- drivers/serial/serial.c | 2 +- env/callback.c | 2 +- env/common.c | 2 +- env/eeprom.c | 2 +- env/embedded.c | 2 +- env/env.c | 2 +- env/ext4.c | 2 +- env/fat.c | 2 +- env/flags.c | 2 +- env/flash.c | 2 +- env/mmc.c | 2 +- env/nand.c | 2 +- env/nowhere.c | 2 +- env/nvram.c | 2 +- env/onenand.c | 2 +- env/remote.c | 2 +- env/sata.c | 2 +- env/sf.c | 2 +- env/ubi.c | 2 +- include/common.h | 2 +- include/{environment.h => env_internal.h} | 14 +++++++++++--- lib/efi_loader/efi_variable.c | 2 +- net/net.c | 2 +- tools/envcrc.c | 2 +- 72 files changed, 82 insertions(+), 74 deletions(-) rename include/{environment.h => env_internal.h} (93%) diff --git a/api/api.c b/api/api.c index 5e7c8149bf..bcbd8ede81 100644 --- a/api/api.c +++ b/api/api.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 9577ada113..26f4fdacdb 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -33,7 +33,7 @@ #include #ifdef CONFIG_TFABOOT -#include +#include #ifdef CONFIG_CHAIN_OF_TRUST #include #endif diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 00c705f74e..ca8005992a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -27,7 +27,7 @@ #endif #include #ifdef CONFIG_TFABOOT -#include +#include DECLARE_GLOBAL_DATA_PTR; #endif diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c index 7b3bc7db5e..e682486547 100644 --- a/arch/x86/cpu/qemu/e820.c +++ b/arch/x86/cpu/qemu/e820.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index f3b7d99878..9314fabdf2 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index 9e64cbbc82..8811583ac6 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "board.h" diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index bc3c6d229c..ec0c4a17f6 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index 358118f757..a96fdef992 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "mmc.h" #include "board.h" diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index b2ccb83c8a..95d3a5e1f5 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c index d9aa57f41c..6dfc0c73ec 100644 --- a/board/freescale/b4860qds/spl.c +++ b/board/freescale/b4860qds/spl.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c index 5db60d8ed9..29040962cf 100644 --- a/board/freescale/c29xpcie/spl.c +++ b/board/freescale/c29xpcie/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index b4c611e19f..31e41ce169 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c index a862fe6a93..86c72ee357 100644 --- a/board/freescale/ls1012aqds/ls1012aqds.c +++ b/board/freescale/ls1012aqds/ls1012aqds.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index f648a9040b..e4527c19b8 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c index e5de4eb70c..4aa7cec9ce 100644 --- a/board/freescale/ls1028a/ls1028a.c +++ b/board/freescale/ls1028a/ls1028a.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index a1c9eb3f46..f0bea7327d 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c index cc1822d0f5..413a698511 100644 --- a/board/freescale/ls2080a/ls2080a.c +++ b/board/freescale/ls2080a/ls2080a.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index e9e0999a18..e9c055745f 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index a278e2fc11..2b2dbbb0ce 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 3b4cb86692..f3885fa8b7 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index 95f8b5837d..8f050b3947 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 92fd199876..06273f1d20 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 9d7b5eff6f..dbf9f739b2 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c index 1b58174ed1..3008f0919f 100644 --- a/board/freescale/t102xqds/spl.c +++ b/board/freescale/t102xqds/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index a226d4b5b5..029e3d212c 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index 58a7376e7f..7b0eb8edf5 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index 27f3c4c84f..9695dfc2e2 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index ecb1e0d73c..ca7d6a28e0 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c index 16cc29eaa6..7666fe7556 100644 --- a/board/freescale/t4qds/spl.c +++ b/board/freescale/t4qds/spl.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index cc2b2f9ffb..a19558bd6b 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index baa3e5726c..bd494c84fc 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 77979704be..10ef7f931b 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c index bffa85c232..f86c9f1a63 100644 --- a/board/renesas/gose/gose.c +++ b/board/renesas/gose/gose.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index 1bb3b492e2..841d337f4d 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index bda3295bad..3cb1a56142 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index d3afc2a400..86f79da7fd 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c index bda6a414e6..25221e3c55 100644 --- a/board/renesas/silk/silk.c +++ b/board/renesas/silk/silk.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c index 95b5711fdb..0a0ff5ff76 100644 --- a/board/renesas/stout/stout.c +++ b/board/renesas/stout/stout.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 1f9251d7a0..279c7b7797 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/sunxi/board.c b/board/sunxi/board.c index bb425cbf66..e3b2d13892 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index a9c9d377b4..c7eed31946 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "board.h" diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 54adcd510d..7eaa6cd96d 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include "../common/board_detect.h" #include "board.h" diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 3d244951b0..df58adee73 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 18937bf6f5..31181a9dc4 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index adaadb5f1c..4011a6f1ed 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/common/console.c b/common/console.c index 4c5f7d8f1f..f474388f37 100644 --- a/common/console.c +++ b/common/console.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 6c22f074b0..c59254c76e 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index d4488a2cc2..dcdaedefe7 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 09365ba6a1..b907508dbe 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/env/callback.c b/env/callback.c index 9bfa744921..bc3533d870 100644 --- a/env/callback.c +++ b/env/callback.c @@ -6,7 +6,7 @@ #include #include -#include +#include #if defined(CONFIG_NEEDS_MANUAL_RELOC) DECLARE_GLOBAL_DATA_PTR; diff --git a/env/common.c b/env/common.c index 474ea2280b..3fb60509dd 100644 --- a/env/common.c +++ b/env/common.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/env/eeprom.c b/env/eeprom.c index 0c30ca459c..2c0c600b32 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #if defined(CONFIG_I2C_ENV_EEPROM_BUS) #include diff --git a/env/embedded.c b/env/embedded.c index b1090e90e5..a38e169fe0 100644 --- a/env/embedded.c +++ b/env/embedded.c @@ -12,7 +12,7 @@ #define __ASM_STUB_PROCESSOR_H__ /* don't include asm/processor. */ #include #undef __ASSEMBLY__ -#include +#include #include /* Handle HOSTS that have prepended crap on symbol names, not TARGETS. */ diff --git a/env/env.c b/env/env.c index 9d421e8125..9237bb9c74 100644 --- a/env/env.c +++ b/env/env.c @@ -6,7 +6,7 @@ #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/ext4.c b/env/ext4.c index 6aa36867b6..1f6b1b5bd8 100644 --- a/env/ext4.c +++ b/env/ext4.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/env/fat.c b/env/fat.c index d23753c6ff..1836556f36 100644 --- a/env/fat.c +++ b/env/fat.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/env/flags.c b/env/flags.c index 388c2f184b..0eb558f8bc 100644 --- a/env/flags.c +++ b/env/flags.c @@ -19,7 +19,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else #include -#include +#include #endif #ifdef CONFIG_CMD_NET diff --git a/env/flash.c b/env/flash.c index 9566dd7f05..be2d683335 100644 --- a/env/flash.c +++ b/env/flash.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/env/mmc.c b/env/mmc.c index 4ca7c2b9ff..9f1878def1 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/env/nand.c b/env/nand.c index 3e2235f5f3..9f3dc635cf 100644 --- a/env/nand.c +++ b/env/nand.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/env/nowhere.c b/env/nowhere.c index 7db4eec845..f5b0a17652 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/nvram.c b/env/nvram.c index a5b1873aaf..79201bd788 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/env/onenand.c b/env/onenand.c index d371bd757c..dfd4e939f8 100644 --- a/env/onenand.c +++ b/env/onenand.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/env/remote.c b/env/remote.c index b1a7d1a4c1..02531f427b 100644 --- a/env/remote.c +++ b/env/remote.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #ifdef ENV_IS_EMBEDDED diff --git a/env/sata.c b/env/sata.c index a5364dda5d..9369710081 100644 --- a/env/sata.c +++ b/env/sata.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/env/sf.c b/env/sf.c index ae4136926b..405d2a3dae 100644 --- a/env/sf.c +++ b/env/sf.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/env/ubi.c b/env/ubi.c index a69db14afd..08aac47df2 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 34ae514805..f8afbc0d70 100644 --- a/include/common.h +++ b/include/common.h @@ -394,7 +394,7 @@ int cpu_release(u32 nr, int argc, char * const argv[]); /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY -# include +# include #endif #endif /* __COMMON_H_ */ diff --git a/include/environment.h b/include/env_internal.h similarity index 93% rename from include/environment.h rename to include/env_internal.h index cc8c0546c2..b1ddcb5adf 100644 --- a/include/environment.h +++ b/include/env_internal.h @@ -1,11 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* + * Internal environment header file. This includes direct access to environment + * information such as its size and offset, direct access to the default + * environment and embedded environment (if used). It also provides environment + * drivers with various declarations. + * + * It should not be included by board files, drivers and code other than that + * related to the environment implementation. + * * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#ifndef _ENVIRONMENT_H_ -#define _ENVIRONMENT_H_ +#ifndef _ENV_INTERNAL_H_ +#define _ENV_INTERNAL_H_ #include @@ -267,4 +275,4 @@ extern struct hsearch_data env_htab; #endif /* DO_DEPS_ONLY */ -#endif /* _ENVIRONMENT_H_ */ +#endif /* _ENV_INTERNAL_H_ */ diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 8a0e0db13e..6687b69a40 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/net/net.c b/net/net.c index 1a175c4597..0ae3808bcd 100644 --- a/net/net.c +++ b/net/net.c @@ -91,7 +91,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/envcrc.c b/tools/envcrc.c index 7eb7246d45..672ef4d675 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -59,7 +59,7 @@ #ifdef CONFIG_BUILD_ENVCRC -# include +# include extern unsigned int env_size; extern env_t embedded_environment; #endif /* CONFIG_BUILD_ENVCRC */ From patchwork Sun Jul 28 14:03:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138016 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="URSOt/mD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQBm4lgDz9s4Y for ; Mon, 29 Jul 2019 00:27:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 32E77C21E07; Sun, 28 Jul 2019 14:15:48 +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=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 ED2D5C21E77; Sun, 28 Jul 2019 14:10:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EE085C21D56; Sun, 28 Jul 2019 14:07:14 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 35363C21DEC for ; Sun, 28 Jul 2019 14:07:10 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id m24so114551744ioo.2 for ; Sun, 28 Jul 2019 07:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SoWniOPk0Q7A8WqiQM4fKNu/bPGUv9rC1OidKYsmSm4=; b=URSOt/mDK/dog1eAX/01TM3oT1NzN50cT/kEOsDl/9QHbbg0BhupCkS7Vsa02K24e4 qzgAmx5TV0QEcquPAqCJoiCwuh/ZxLNDHOInNAVlSQL/fAgIa4sg1wG6s/OZ9u4M4uHU yD2L8MQAkQgiYKx/RfP3hFYEGkzLkSh0rWGp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SoWniOPk0Q7A8WqiQM4fKNu/bPGUv9rC1OidKYsmSm4=; b=XKsUR1cy9cfYG6nRKU4x6ULXgnLukQQqFCpgRObKy3ofLXcHGEtYXUCuf4A05nULg4 NNUsx/xyoPW6l6MC1fy0KQyQ36qAyMFPgsG2XrD4hZ0wz0tB3nDLJeJ1MqtyAka060GZ leJD6hC1CITBNOmxSTPcfUTC8tJ94crkHAxfUvHFn+CctcmWvWhpO4IeiIZct8aShHzP NX/sBDboDpZNpPS9sHElvA1tp9UlnrC1Nb7WGM3dxiziNBxD2nMnWP5CvDgWRTl5ia+I DSnht6TVU998ighrILFcTqWQWLN7hHlLoMDggefxmJpELpNY6C//S0yhvfdvlJkHqBP/ SoBQ== X-Gm-Message-State: APjAAAWc3dfWgz/MMm2e1Ahvp2UZKbYDcCRtDuIXXDQ4694SS4etnsKO qI8L+HogWyC5JKyPSGLc/wpiyU046eA= X-Google-Smtp-Source: APXvYqz894+f/UI0f9skYicki3FaB43/GRuHl/e3jx/apMJ2XNrUzt+eGk/j+oeAYU5mwkwcDhlmFw== X-Received: by 2002:a6b:7311:: with SMTP id e17mr51292196ioh.112.1564322828396; Sun, 28 Jul 2019 07:07:08 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:55 -0600 Message-Id: <20190728140357.137295-39-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 38/39] Drop PCMCIA 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This is no-longer used in U-Boot and has not been converted to driver model. Drop it. Signed-off-by: Simon Glass --- README | 2 +- cmd/Kconfig | 8 - cmd/Makefile | 1 - cmd/ide.c | 4 - cmd/pcmcia.c | 341 -------------------------------- common/board_r.c | 12 -- doc/README.marubun-pcmcia | 65 ------ doc/README.ne2000 | 11 -- drivers/Kconfig | 2 - drivers/Makefile | 1 - drivers/net/ne2000_base.c | 10 - drivers/pcmcia/Kconfig | 0 drivers/pcmcia/Makefile | 6 - drivers/pcmcia/marubun_pcmcia.c | 99 ---------- include/common.h | 2 - include/pcmcia.h | 137 ------------- include/pcmcia/yenta.h | 156 --------------- scripts/config_whitelist.txt | 6 - 18 files changed, 1 insertion(+), 862 deletions(-) delete mode 100644 cmd/pcmcia.c delete mode 100644 doc/README.marubun-pcmcia delete mode 100644 drivers/pcmcia/Kconfig delete mode 100644 drivers/pcmcia/Makefile delete mode 100644 drivers/pcmcia/marubun_pcmcia.c delete mode 100644 include/pcmcia.h delete mode 100644 include/pcmcia/yenta.h diff --git a/README b/README index 8f816ad2af..3a862ba440 100644 --- a/README +++ b/README @@ -83,7 +83,7 @@ Where we come from: * Provide extended interface to Linux boot loader * S-Record download * network boot - * PCMCIA / CompactFlash / ATA disk / SCSI ... boot + * ATA disk / SCSI ... boot - create ARMBoot project (http://sourceforge.net/projects/armboot) - add other CPU families (starting with ARM) - create U-Boot project (http://sourceforge.net/projects/u-boot) diff --git a/cmd/Kconfig b/cmd/Kconfig index 9e66cc110d..0834ae0734 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1002,14 +1002,6 @@ config CMD_PCI peripherals. Sub-commands allow bus enumeration, displaying and changing configuration space and a few other features. -config CMD_PCMCIA - bool "pinit - Set up PCMCIA device" - help - Provides a means to initialise a PCMCIA (Personal Computer Memory - Card International Association) device. This is an old standard from - about 1990. These devices are typically removable memory or network - cards using a standard 68-pin connector. - config CMD_PINMUX bool "pinmux - show pins muxing" default y if PINCTRL diff --git a/cmd/Makefile b/cmd/Makefile index 43a6b0ee21..58827b5679 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -106,7 +106,6 @@ obj-$(CONFIG_CMD_PART) += part.o ifdef CONFIG_PCI obj-$(CONFIG_CMD_PCI) += pci.o endif -obj-$(CONFIG_CMD_PCMCIA) += pcmcia.o obj-$(CONFIG_CMD_PINMUX) += pinmux.o obj-$(CONFIG_CMD_PXE) += pxe.o obj-$(CONFIG_CMD_WOL) += wol.o diff --git a/cmd/ide.c b/cmd/ide.c index 1c58efc55a..2f93ba7904 100644 --- a/cmd/ide.c +++ b/cmd/ide.c @@ -17,10 +17,6 @@ #include #include -#if defined(CONFIG_IDE_PCMCIA) -# include -#endif - #include #include diff --git a/cmd/pcmcia.c b/cmd/pcmcia.c deleted file mode 100644 index 3b7537b105..0000000000 --- a/cmd/pcmcia.c +++ /dev/null @@ -1,341 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2000-2006 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - ******************************************************************** - * - * Lots of code copied from: - * - * m8xx_pcmcia.c - Linux PCMCIA socket driver for the mpc8xx series. - * (C) 1999-2000 Magnus Damm - * - * "The ExCA standard specifies that socket controllers should provide - * two IO and five memory windows per socket, which can be independently - * configured and positioned in the host address space and mapped to - * arbitrary segments of card address space. " - David A Hinds. 1999 - * - * This controller does _not_ meet the ExCA standard. - * - * m8xx pcmcia controller brief info: - * + 8 windows (attrib, mem, i/o) - * + up to two slots (SLOT_A and SLOT_B) - * + inputpins, outputpins, event and mask registers. - * - no offset register. sigh. - * - * Because of the lacking offset register we must map the whole card. - * We assign each memory window PCMCIA_MEM_WIN_SIZE address space. - * Make sure there is (PCMCIA_MEM_WIN_SIZE * PCMCIA_MEM_WIN_NO - * * PCMCIA_SOCKETS_NO) bytes at PCMCIA_MEM_WIN_BASE. - * The i/o windows are dynamically allocated at PCMCIA_IO_WIN_BASE. - * They are maximum 64KByte each... - */ - -/* #define DEBUG 1 */ - -/* - * PCMCIA support - */ -#include -#include -#include -#include -#include - -/* -------------------------------------------------------------------- */ - -#if defined(CONFIG_CMD_PCMCIA) - -extern int pcmcia_on (void); -extern int pcmcia_off (void); - -int do_pinit (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - int rcode = 0; - - if (argc != 2) { - printf ("Usage: pinit {on | off}\n"); - return 1; - } - if (strcmp(argv[1],"on") == 0) { - rcode = pcmcia_on (); - } else if (strcmp(argv[1],"off") == 0) { - rcode = pcmcia_off (); - } else { - printf ("Usage: pinit {on | off}\n"); - return 1; - } - - return rcode; -} - -U_BOOT_CMD( - pinit, 2, 0, do_pinit, - "PCMCIA sub-system", - "on - power on PCMCIA socket\n" - "pinit off - power off PCMCIA socket" -); - -#endif - -/* -------------------------------------------------------------------- */ - -#undef CHECK_IDE_DEVICE - -#if defined(CONFIG_PXA_PCMCIA) -#define CHECK_IDE_DEVICE -#endif - -#ifdef CHECK_IDE_DEVICE - -int ide_devices_found; -static uchar *known_cards[] = { - (uchar *)"ARGOSY PnPIDE D5", - NULL -}; - -#define MAX_TUPEL_SZ 512 -#define MAX_FEATURES 4 - -#define MAX_IDENT_CHARS 64 -#define MAX_IDENT_FIELDS 4 - -#define indent "\t " - -static void print_funcid (int func) -{ - puts (indent); - switch (func) { - case CISTPL_FUNCID_MULTI: - puts (" Multi-Function"); - break; - case CISTPL_FUNCID_MEMORY: - puts (" Memory"); - break; - case CISTPL_FUNCID_SERIAL: - puts (" Serial Port"); - break; - case CISTPL_FUNCID_PARALLEL: - puts (" Parallel Port"); - break; - case CISTPL_FUNCID_FIXED: - puts (" Fixed Disk"); - break; - case CISTPL_FUNCID_VIDEO: - puts (" Video Adapter"); - break; - case CISTPL_FUNCID_NETWORK: - puts (" Network Adapter"); - break; - case CISTPL_FUNCID_AIMS: - puts (" AIMS Card"); - break; - case CISTPL_FUNCID_SCSI: - puts (" SCSI Adapter"); - break; - default: - puts (" Unknown"); - break; - } - puts (" Card\n"); -} - -static void print_fixed (volatile uchar *p) -{ - if (p == NULL) - return; - - puts(indent); - - switch (*p) { - case CISTPL_FUNCE_IDE_IFACE: - { uchar iface = *(p+2); - - puts ((iface == CISTPL_IDE_INTERFACE) ? " IDE" : " unknown"); - puts (" interface "); - break; - } - case CISTPL_FUNCE_IDE_MASTER: - case CISTPL_FUNCE_IDE_SLAVE: - { uchar f1 = *(p+2); - uchar f2 = *(p+4); - - puts ((f1 & CISTPL_IDE_SILICON) ? " [silicon]" : " [rotating]"); - - if (f1 & CISTPL_IDE_UNIQUE) - puts (" [unique]"); - - puts ((f1 & CISTPL_IDE_DUAL) ? " [dual]" : " [single]"); - - if (f2 & CISTPL_IDE_HAS_SLEEP) - puts (" [sleep]"); - - if (f2 & CISTPL_IDE_HAS_STANDBY) - puts (" [standby]"); - - if (f2 & CISTPL_IDE_HAS_IDLE) - puts (" [idle]"); - - if (f2 & CISTPL_IDE_LOW_POWER) - puts (" [low power]"); - - if (f2 & CISTPL_IDE_REG_INHIBIT) - puts (" [reg inhibit]"); - - if (f2 & CISTPL_IDE_HAS_INDEX) - puts (" [index]"); - - if (f2 & CISTPL_IDE_IOIS16) - puts (" [IOis16]"); - - break; - } - } - putc ('\n'); -} - -static int identify (volatile uchar *p) -{ - uchar id_str[MAX_IDENT_CHARS]; - uchar data; - uchar *t; - uchar **card; - int i, done; - - if (p == NULL) - return (0); /* Don't know */ - - t = id_str; - done =0; - - for (i=0; i<=4 && !done; ++i, p+=2) { - while ((data = *p) != '\0') { - if (data == 0xFF) { - done = 1; - break; - } - *t++ = data; - if (t == &id_str[MAX_IDENT_CHARS-1]) { - done = 1; - break; - } - p += 2; - } - if (!done) - *t++ = ' '; - } - *t = '\0'; - while (--t > id_str) { - if (*t == ' ') - *t = '\0'; - else - break; - } - puts ((char *)id_str); - putc ('\n'); - - for (card=known_cards; *card; ++card) { - debug ("## Compare against \"%s\"\n", *card); - if (strcmp((char *)*card, (char *)id_str) == 0) { /* found! */ - debug ("## CARD FOUND ##\n"); - return (1); - } - } - - return (0); /* don't know */ -} - -int check_ide_device (int slot) -{ - volatile uchar *ident = NULL; - volatile uchar *feature_p[MAX_FEATURES]; - volatile uchar *p, *start, *addr; - int n_features = 0; - uchar func_id = ~0; - uchar code, len; - ushort config_base = 0; - int found = 0; - int i; - - addr = (volatile uchar *)(CONFIG_SYS_PCMCIA_MEM_ADDR + - CONFIG_SYS_PCMCIA_MEM_SIZE * (slot * 4)); - debug ("PCMCIA MEM: %08lX\n", (ulong)addr); - - start = p = (volatile uchar *) addr; - - while ((p - start) < MAX_TUPEL_SZ) { - - code = *p; p += 2; - - if (code == 0xFF) { /* End of chain */ - break; - } - - len = *p; p += 2; -#if defined(DEBUG) && (DEBUG > 1) - { volatile uchar *q = p; - printf ("\nTuple code %02x length %d\n\tData:", - code, len); - - for (i = 0; i < len; ++i) { - printf (" %02x", *q); - q+= 2; - } - } -#endif /* DEBUG */ - switch (code) { - case CISTPL_VERS_1: - ident = p + 4; - break; - case CISTPL_FUNCID: - /* Fix for broken SanDisk which may have 0x80 bit set */ - func_id = *p & 0x7F; - break; - case CISTPL_FUNCE: - if (n_features < MAX_FEATURES) - feature_p[n_features++] = p; - break; - case CISTPL_CONFIG: - config_base = (*(p+6) << 8) + (*(p+4)); - debug ("\n## Config_base = %04x ###\n", config_base); - default: - break; - } - p += 2 * len; - } - - found = identify (ident); - - if (func_id != ((uchar)~0)) { - print_funcid (func_id); - - if (func_id == CISTPL_FUNCID_FIXED) - found = 1; - else - return (1); /* no disk drive */ - } - - for (i=0; i only valid for ARGOSY D5!!! */ - *((uchar *)(addr + config_base)) = 1; -#if 0 - printf("\n## Config_base = %04x ###\n", config_base); - printf("Configuration Option Register: %02x @ %x\n", readb(addr + config_base), addr + config_base); - printf("Card Configuration and Status Register: %02x\n", readb(addr + config_base + 2)); - printf("Pin Replacement Register Register: %02x\n", readb(addr + config_base + 4)); - printf("Socket and Copy Register: %02x\n", readb(addr + config_base + 6)); -#endif - return (0); -} - -#endif /* CHECK_IDE_DEVICE */ diff --git a/common/board_r.c b/common/board_r.c index 4011a6f1ed..a8f2cd7275 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -583,15 +583,6 @@ static int initr_post(void) } #endif -#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE) -static int initr_pcmcia(void) -{ - puts("PCMCIA:"); - pcmcia_init(); - return 0; -} -#endif - #if defined(CONFIG_IDE) && !defined(CONFIG_BLK) static int initr_ide(void) { @@ -820,9 +811,6 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_POST initr_post, #endif -#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE) - initr_pcmcia, -#endif #if defined(CONFIG_IDE) && !defined(CONFIG_BLK) initr_ide, #endif diff --git a/doc/README.marubun-pcmcia b/doc/README.marubun-pcmcia deleted file mode 100644 index 0a363b2ada..0000000000 --- a/doc/README.marubun-pcmcia +++ /dev/null @@ -1,65 +0,0 @@ - -U-Boot MARUBUN MR-SHPC-01 PCMCIA controller driver - Last update 21/11/2007 by Nobuhiro Iwamatsu - -======================================================================================== - -0. What's this? - This driver supports MARUBUN MR-SHPC-01. - url: http://www.marubun.co.jp/product/semicon/devices/qgc18e0000002n2z.html - (Sorry Japanese only.) - - This chip is used with SuperH well, and adopted by the - reference board. - ex. * MS7750SE01 - * MS7722SE01 - * other - - This chip doesn't support CardBus. - -1. base source code - The code is based on sources from the Linux kernel - ( arch/sh/kernel/cf-enabler.c ). - -2. How to use - The options you have to specify in the config file are (with the - value for my board as an example): - - * CONFIG_MARUBUN_PCCARD - If you want to use this device driver, should define CONFIG_MARUBUN_PCCARD. - ex. #define CONFIG_MARUBUN_PCCARD - - * CONFIG_PCMCIA_SLOT_A - Most devices have only one slot. You should define CONFIG_PCMCIA_SLOT_A . - ex. #define CONFIG_PCMCIA_SLOT_A 1 - - * CONFIG_SYS_MARUBUN_MRSHPC - This is MR-SHPC-01 PCMCIA controller base address. - You should do the setting matched to your environment. - ex. #define CONFIG_SYS_MARUBUN_MRSHPC 0xb03fffe0 - ( for MS7722SE01 environment ) - - * CONFIG_SYS_MARUBUN_MW1 - This is MR-SHPC-01 memory window base address. - You should do the setting matched to your environment. - ex. #define CONFIG_SYS_MARUBUN_MW1 0xb0400000 - ( for MS7722SE01 environment ) - - * CONFIG_SYS_MARUBUN_MW1 - This is MR-SHPC-01 attribute window base address. - You should do the setting matched to your environment. - ex. #define CONFIG_SYS_MARUBUN_MW2 0xb0500000 - ( for MS7722SE01 environment ) - - * CONFIG_SYS_MARUBUN_MW1 - This is MR-SHPC-01 I/O window base address. - You should do the setting matched to your environment. - ex. #define CONFIG_SYS_MARUBUN_IO 0xb0600000 - ( for MS7722SE01 environment ) - -3. Other - * Check Compact Flash only. - * Maybe, NE2000 compatible NIC is sure to move. - -Copyright (c) 2007 - Nobuhiro Iwamatsu diff --git a/doc/README.ne2000 b/doc/README.ne2000 index d5ae9a9eb1..0f6a2e04ff 100644 --- a/doc/README.ne2000 +++ b/doc/README.ne2000 @@ -21,17 +21,6 @@ value for my board as an example): - Address where the board is mapped -#define CONFIG_DRIVER_NE2000_CCR (0x28000000+0x3f8) - -- Address of the CCR (card configuration register). It could be found -by enabling DEBUG in cmd_pcmcia.c. If this is not defined nothing is -done as far as PCMCIA support is concerned. - -#define CONFIG_DRIVER_NE2000_VAL (0x20) - -- The value to be written in the CCR. It selects among different I/O -spaces that could be used by the card. - Enjoy! diff --git a/drivers/Kconfig b/drivers/Kconfig index 5a9d01b508..350acf81f3 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -70,8 +70,6 @@ source "drivers/pci_endpoint/Kconfig" source "drivers/pch/Kconfig" -source "drivers/pcmcia/Kconfig" - source "drivers/phy/Kconfig" source "drivers/phy/allwinner/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index 603aa98590..aa682bb650 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -87,7 +87,6 @@ obj-y += misc/ obj-$(CONFIG_MMC) += mmc/ obj-$(CONFIG_NVME) += nvme/ obj-$(CONFIG_PCI_ENDPOINT) += pci_endpoint/ -obj-y += pcmcia/ obj-y += dfu/ obj-$(CONFIG_PCH) += pch/ obj-y += phy/allwinner/ diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c index 819a246070..a240d06ad4 100644 --- a/drivers/net/ne2000_base.c +++ b/drivers/net/ne2000_base.c @@ -693,16 +693,6 @@ static int ne2k_setup_driver(struct eth_device *dev) } } -#ifdef CONFIG_DRIVER_NE2000_CCR - { - vu_char *p = (vu_char *) CONFIG_DRIVER_NE2000_CCR; - - PRINTK("CCR before is %x\n", *p); - *p = CONFIG_DRIVER_NE2000_VAL; - PRINTK("CCR after is %x\n", *p); - } -#endif - nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE; nic.data = nic.base + DP_DATA; diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile deleted file mode 100644 index 8374a56c34..0000000000 --- a/drivers/pcmcia/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000-2007 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. - -obj-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o diff --git a/drivers/pcmcia/marubun_pcmcia.c b/drivers/pcmcia/marubun_pcmcia.c deleted file mode 100644 index b2eea6c601..0000000000 --- a/drivers/pcmcia/marubun_pcmcia.c +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Marubun MR-SHPC-01 PCMCIA controller device driver - * - * (c) 2007 Nobuhiro Iwamatsu - */ - -#include -#include -#include -#include - -#undef CONFIG_PCMCIA - -#if defined(CONFIG_CMD_PCMCIA) -#define CONFIG_PCMCIA -#endif - -#if defined(CONFIG_IDE) -#define CONFIG_PCMCIA -#endif - -#if defined(CONFIG_PCMCIA) - -/* MR-SHPC-01 register */ -#define MRSHPC_MODE (CONFIG_SYS_MARUBUN_MRSHPC + 4) -#define MRSHPC_OPTION (CONFIG_SYS_MARUBUN_MRSHPC + 6) -#define MRSHPC_CSR (CONFIG_SYS_MARUBUN_MRSHPC + 8) -#define MRSHPC_ISR (CONFIG_SYS_MARUBUN_MRSHPC + 10) -#define MRSHPC_ICR (CONFIG_SYS_MARUBUN_MRSHPC + 12) -#define MRSHPC_CPWCR (CONFIG_SYS_MARUBUN_MRSHPC + 14) -#define MRSHPC_MW0CR1 (CONFIG_SYS_MARUBUN_MRSHPC + 16) -#define MRSHPC_MW1CR1 (CONFIG_SYS_MARUBUN_MRSHPC + 18) -#define MRSHPC_IOWCR1 (CONFIG_SYS_MARUBUN_MRSHPC + 20) -#define MRSHPC_MW0CR2 (CONFIG_SYS_MARUBUN_MRSHPC + 22) -#define MRSHPC_MW1CR2 (CONFIG_SYS_MARUBUN_MRSHPC + 24) -#define MRSHPC_IOWCR2 (CONFIG_SYS_MARUBUN_MRSHPC + 26) -#define MRSHPC_CDCR (CONFIG_SYS_MARUBUN_MRSHPC + 28) -#define MRSHPC_PCIC_INFO (CONFIG_SYS_MARUBUN_MRSHPC + 30) - -int pcmcia_on (void) -{ - printf("Enable PCMCIA " PCMCIA_SLOT_MSG "\n"); - - /* Init */ - outw( 0x0000 , MRSHPC_MODE ); - - if ((inw(MRSHPC_CSR) & 0x000c) == 0){ /* if card detect is true */ - if ((inw(MRSHPC_CSR) & 0x0080) == 0){ - outw(0x0674 ,MRSHPC_CPWCR); /* Card Vcc is 3.3v? */ - }else{ - outw(0x0678 ,MRSHPC_CPWCR); /* Card Vcc is 5V */ - } - udelay( 100000 ); /* wait for power on */ - }else{ - return 1; - } - /* - * PC-Card window open - * flag == COMMON/ATTRIBUTE/IO - */ - /* common window open */ - outw(0x8a84,MRSHPC_MW0CR1); /* window 0xb8400000 */ - if ((inw(MRSHPC_CSR) & 0x4000) != 0) - outw(0x0b00,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 1 */ - else - outw(0x0300,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 0 */ - - /* attribute window open */ - outw(0x8a85,MRSHPC_MW1CR1); /* window 0xb8500000 */ - if ((inw(MRSHPC_CSR) & 0x4000) != 0) - outw(0x0a00,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 1 */ - else - outw(0x0200,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 0 */ - - /* I/O window open */ - outw(0x8a86,MRSHPC_IOWCR1); /* I/O window 0xb8600000 */ - outw(0x0008,MRSHPC_CDCR); /* I/O card mode */ - if ((inw(MRSHPC_CSR) & 0x4000) != 0) - outw(0x0a00,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 1 */ - else - outw(0x0200,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 0 */ - - outw(0x0000,MRSHPC_ISR); - outw(0x2000,MRSHPC_ICR); - outb(0x00,(CONFIG_SYS_MARUBUN_MW2 + 0x206)); - outb(0x42,(CONFIG_SYS_MARUBUN_MW2 + 0x200)); - - return 0; -} - -int pcmcia_off (void) -{ - printf ("Disable PCMCIA " PCMCIA_SLOT_MSG "\n"); - - return 0; -} - -#endif /* CONFIG_PCMCIA */ diff --git a/include/common.h b/include/common.h index f8afbc0d70..2645ac9615 100644 --- a/include/common.h +++ b/include/common.h @@ -339,8 +339,6 @@ static inline struct in_addr env_get_ip(char *var) return string_to_ip(env_get(var)); } -int pcmcia_init (void); - #ifdef CONFIG_LED_STATUS # include #endif diff --git a/include/pcmcia.h b/include/pcmcia.h deleted file mode 100644 index 89e528efb9..0000000000 --- a/include/pcmcia.h +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2000-2004 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ - -#ifndef _PCMCIA_H -#define _PCMCIA_H - -#include -#include - -/* - * Allow configuration to select PCMCIA slot, - * or try to generate a useful default - */ -#if defined(CONFIG_CMD_PCMCIA) - -#if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) -# error "PCMCIA Slot not configured" -#endif /* !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) */ - -/* Make sure exactly one slot is defined - we support only one for now */ -#if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) -#error Neither CONFIG_PCMCIA_SLOT_A nor CONFIG_PCMCIA_SLOT_B configured -#endif -#if defined(CONFIG_PCMCIA_SLOT_A) && defined(CONFIG_PCMCIA_SLOT_B) -#error Both CONFIG_PCMCIA_SLOT_A and CONFIG_PCMCIA_SLOT_B configured -#endif - -#ifndef PCMCIA_SOCKETS_NO -#define PCMCIA_SOCKETS_NO 1 -#endif -#ifndef PCMCIA_MEM_WIN_NO -#define PCMCIA_MEM_WIN_NO 4 -#endif -#define PCMCIA_IO_WIN_NO 2 - -/* define _slot_ to be able to optimize macros */ -#ifdef CONFIG_PCMCIA_SLOT_A -# define _slot_ 0 -# define PCMCIA_SLOT_MSG "slot A" -# define PCMCIA_SLOT_x PCMCIA_PSLOT_A -#else -# define _slot_ 1 -# define PCMCIA_SLOT_MSG "slot B" -# define PCMCIA_SLOT_x PCMCIA_PSLOT_B -#endif - -/* - * This structure is used to address each window in the PCMCIA controller. - * - * Keep in mind that we assume that pcmcia_win_t[n+1] is mapped directly - * after pcmcia_win_t[n]... - */ - -typedef struct { - ulong br; - ulong or; -} pcmcia_win_t; - -/**********************************************************************/ - -/* - * CIS Tupel codes - */ -#define CISTPL_NULL 0x00 -#define CISTPL_DEVICE 0x01 -#define CISTPL_LONGLINK_CB 0x02 -#define CISTPL_INDIRECT 0x03 -#define CISTPL_CONFIG_CB 0x04 -#define CISTPL_CFTABLE_ENTRY_CB 0x05 -#define CISTPL_LONGLINK_MFC 0x06 -#define CISTPL_BAR 0x07 -#define CISTPL_PWR_MGMNT 0x08 -#define CISTPL_EXTDEVICE 0x09 -#define CISTPL_CHECKSUM 0x10 -#define CISTPL_LONGLINK_A 0x11 -#define CISTPL_LONGLINK_C 0x12 -#define CISTPL_LINKTARGET 0x13 -#define CISTPL_NO_LINK 0x14 -#define CISTPL_VERS_1 0x15 -#define CISTPL_ALTSTR 0x16 -#define CISTPL_DEVICE_A 0x17 -#define CISTPL_JEDEC_C 0x18 -#define CISTPL_JEDEC_A 0x19 -#define CISTPL_CONFIG 0x1a -#define CISTPL_CFTABLE_ENTRY 0x1b -#define CISTPL_DEVICE_OC 0x1c -#define CISTPL_DEVICE_OA 0x1d -#define CISTPL_DEVICE_GEO 0x1e -#define CISTPL_DEVICE_GEO_A 0x1f -#define CISTPL_MANFID 0x20 -#define CISTPL_FUNCID 0x21 -#define CISTPL_FUNCE 0x22 -#define CISTPL_SWIL 0x23 -#define CISTPL_END 0xff - -/* - * CIS Function ID codes - */ -#define CISTPL_FUNCID_MULTI 0x00 -#define CISTPL_FUNCID_MEMORY 0x01 -#define CISTPL_FUNCID_SERIAL 0x02 -#define CISTPL_FUNCID_PARALLEL 0x03 -#define CISTPL_FUNCID_FIXED 0x04 -#define CISTPL_FUNCID_VIDEO 0x05 -#define CISTPL_FUNCID_NETWORK 0x06 -#define CISTPL_FUNCID_AIMS 0x07 -#define CISTPL_FUNCID_SCSI 0x08 - -/* - * Fixed Disk FUNCE codes - */ -#define CISTPL_IDE_INTERFACE 0x01 - -#define CISTPL_FUNCE_IDE_IFACE 0x01 -#define CISTPL_FUNCE_IDE_MASTER 0x02 -#define CISTPL_FUNCE_IDE_SLAVE 0x03 - -/* First feature byte */ -#define CISTPL_IDE_SILICON 0x04 -#define CISTPL_IDE_UNIQUE 0x08 -#define CISTPL_IDE_DUAL 0x10 - -/* Second feature byte */ -#define CISTPL_IDE_HAS_SLEEP 0x01 -#define CISTPL_IDE_HAS_STANDBY 0x02 -#define CISTPL_IDE_HAS_IDLE 0x04 -#define CISTPL_IDE_LOW_POWER 0x08 -#define CISTPL_IDE_REG_INHIBIT 0x10 -#define CISTPL_IDE_HAS_INDEX 0x20 -#define CISTPL_IDE_IOIS16 0x40 - -#endif - -#endif /* _PCMCIA_H */ diff --git a/include/pcmcia/yenta.h b/include/pcmcia/yenta.h deleted file mode 100644 index 5cd58a7da3..0000000000 --- a/include/pcmcia/yenta.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * yenta.h 1.20 2001/08/24 12:15:34 - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License - * at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and - * limitations under the License. - * - * The initial developer of the original code is David A. Hinds - * . Portions created by David A. Hinds - * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License version 2 (the "GPL"), in - * which case the provisions of the GPL are applicable instead of the - * above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use - * your version of this file under the MPL, indicate your decision by - * deleting the provisions above and replace them with the notice and - * other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file - * under either the MPL or the GPL. - */ - -#ifndef _LINUX_YENTA_H -#define _LINUX_YENTA_H - -/* PCI Configuration Registers */ - -#define PCI_STATUS_CAPLIST 0x10 -#define PCI_CB_CAPABILITY_POINTER 0x14 /* 8 bit */ -#define PCI_CAPABILITY_ID 0x00 /* 8 bit */ -#define PCI_CAPABILITY_PM 0x01 -#define PCI_NEXT_CAPABILITY 0x01 /* 8 bit */ -#define PCI_PM_CAPABILITIES 0x02 /* 16 bit */ -#define PCI_PMCAP_PME_D3COLD 0x8000 -#define PCI_PMCAP_PME_D3HOT 0x4000 -#define PCI_PMCAP_PME_D2 0x2000 -#define PCI_PMCAP_PME_D1 0x1000 -#define PCI_PMCAP_PME_D0 0x0800 -#define PCI_PMCAP_D2_CAP 0x0400 -#define PCI_PMCAP_D1_CAP 0x0200 -#define PCI_PMCAP_DYN_DATA 0x0100 -#define PCI_PMCAP_DSI 0x0020 -#define PCI_PMCAP_AUX_PWR 0x0010 -#define PCI_PMCAP_PMECLK 0x0008 -#define PCI_PMCAP_VERSION_MASK 0x0007 -#define PCI_PM_CONTROL_STATUS 0x04 /* 16 bit */ -#define PCI_PMCS_PME_STATUS 0x8000 -#define PCI_PMCS_DATASCALE_MASK 0x6000 -#define PCI_PMCS_DATASCALE_SHIFT 13 -#define PCI_PMCS_DATASEL_MASK 0x1e00 -#define PCI_PMCS_DATASEL_SHIFT 9 -#define PCI_PMCS_PME_ENABLE 0x0100 -#define PCI_PMCS_PWR_STATE_MASK 0x0003 -#define PCI_PMCS_PWR_STATE_D0 0x0000 -#define PCI_PMCS_PWR_STATE_D1 0x0001 -#define PCI_PMCS_PWR_STATE_D2 0x0002 -#define PCI_PMCS_PWR_STATE_D3 0x0003 -#define PCI_PM_BRIDGE_EXT 0x06 /* 8 bit */ -#define PCI_PM_DATA 0x07 /* 8 bit */ - -#define CB_PRIMARY_BUS 0x18 /* 8 bit */ -#define CB_CARDBUS_BUS 0x19 /* 8 bit */ -#define CB_SUBORD_BUS 0x1a /* 8 bit */ -#define CB_LATENCY_TIMER 0x1b /* 8 bit */ - -#define CB_MEM_BASE(m) (0x1c + 8*(m)) -#define CB_MEM_LIMIT(m) (0x20 + 8*(m)) -#define CB_IO_BASE(m) (0x2c + 8*(m)) -#define CB_IO_LIMIT(m) (0x30 + 8*(m)) - -#define CB_BRIDGE_CONTROL 0x3e /* 16 bit */ -#define CB_BCR_PARITY_ENA 0x0001 -#define CB_BCR_SERR_ENA 0x0002 -#define CB_BCR_ISA_ENA 0x0004 -#define CB_BCR_VGA_ENA 0x0008 -#define CB_BCR_MABORT 0x0020 -#define CB_BCR_CB_RESET 0x0040 -#define CB_BCR_ISA_IRQ 0x0080 -#define CB_BCR_PREFETCH(m) (0x0100 << (m)) -#define CB_BCR_WRITE_POST 0x0400 - -#define CB_LEGACY_MODE_BASE 0x44 - -/* Memory mapped registers */ - -#define CB_SOCKET_EVENT 0x0000 -#define CB_SE_CSTSCHG 0x00000001 -#define CB_SE_CCD 0x00000006 -#define CB_SE_CCD1 0x00000002 -#define CB_SE_CCD2 0x00000004 -#define CB_SE_PWRCYCLE 0x00000008 - -#define CB_SOCKET_MASK 0x0004 -#define CB_SM_CSTSCHG 0x00000001 -#define CB_SM_CCD 0x00000006 -#define CB_SM_PWRCYCLE 0x00000008 - -#define CB_SOCKET_STATE 0x0008 -#define CB_SS_CSTSCHG 0x00000001 -#define CB_SS_CCD 0x00000006 -#define CB_SS_CCD1 0x00000002 -#define CB_SS_CCD2 0x00000004 -#define CB_SS_PWRCYCLE 0x00000008 -#define CB_SS_16BIT 0x00000010 -#define CB_SS_32BIT 0x00000020 -#define CB_SS_CINT 0x00000040 -#define CB_SS_BADCARD 0x00000080 -#define CB_SS_DATALOST 0x00000100 -#define CB_SS_BADVCC 0x00000200 -#define CB_SS_5VCARD 0x00000400 -#define CB_SS_3VCARD 0x00000800 -#define CB_SS_XVCARD 0x00001000 -#define CB_SS_YVCARD 0x00002000 -#define CB_SS_VSENSE 0x00003c86 -#define CB_SS_5VSOCKET 0x10000000 -#define CB_SS_3VSOCKET 0x20000000 -#define CB_SS_XVSOCKET 0x40000000 -#define CB_SS_YVSOCKET 0x80000000 - -#define CB_SOCKET_FORCE 0x000c -#define CB_SF_CVSTEST 0x00004000 - -#define CB_SOCKET_CONTROL 0x0010 -#define CB_SC_VPP_MASK 0x00000007 -#define CB_SC_VPP_OFF 0x00000000 -#define CB_SC_VPP_12V 0x00000001 -#define CB_SC_VPP_5V 0x00000002 -#define CB_SC_VPP_3V 0x00000003 -#define CB_SC_VPP_XV 0x00000004 -#define CB_SC_VPP_YV 0x00000005 -#define CB_SC_VCC_MASK 0x00000070 -#define CB_SC_VCC_OFF 0x00000000 -#define CB_SC_VCC_5V 0x00000020 -#define CB_SC_VCC_3V 0x00000030 -#define CB_SC_VCC_XV 0x00000040 -#define CB_SC_VCC_YV 0x00000050 -#define CB_SC_CCLK_STOP 0x00000080 - -#define CB_SOCKET_POWER 0x0020 -#define CB_SP_CLK_CTRL 0x00000001 -#define CB_SP_CLK_CTRL_ENA 0x00010000 -#define CB_SP_CLK_MODE 0x01000000 -#define CB_SP_ACCESS 0x02000000 - -/* Address bits 31..24 for memory windows for 16-bit cards, - accessable only by memory mapping the 16-bit register set */ -#define CB_MEM_PAGE(map) (0x40 + (map)) - -#endif /* _LINUX_YENTA_H */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index e616f7229b..2637bf9348 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -362,8 +362,6 @@ CONFIG_DRIVER_DM9000 CONFIG_DRIVER_EP93XX_MAC CONFIG_DRIVER_NE2000 CONFIG_DRIVER_NE2000_BASE -CONFIG_DRIVER_NE2000_CCR -CONFIG_DRIVER_NE2000_VAL CONFIG_DRIVER_SMC911X_BASE CONFIG_DRIVER_TI_EMAC_USE_RMII CONFIG_DSP_CLUSTER_START @@ -1360,9 +1358,6 @@ CONFIG_PCI_SKIP_HOST_BRIDGE CONFIG_PCI_SYS_BUS CONFIG_PCI_SYS_PHYS CONFIG_PCI_SYS_SIZE -CONFIG_PCMCIA -CONFIG_PCMCIA_SLOT_A -CONFIG_PCMCIA_SLOT_B CONFIG_PCNET CONFIG_PCNET_79C973 CONFIG_PCNET_79C975 @@ -3710,7 +3705,6 @@ CONFIG_SYS_PCI_TBATR3 CONFIG_SYS_PCI_TBATR4 CONFIG_SYS_PCI_TBATR5 CONFIG_SYS_PCI_VIRT -CONFIG_SYS_PCMCIA_MEM_SIZE CONFIG_SYS_PDCNT CONFIG_SYS_PEHLPAR CONFIG_SYS_PEPAR From patchwork Sun Jul 28 14:03:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138002 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; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FF2oHMyi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ3j2Bssz9s4Y for ; Mon, 29 Jul 2019 00:21:21 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DBCAAC21C2C; Sun, 28 Jul 2019 14:14:29 +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=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 5569CC21E53; Sun, 28 Jul 2019 14:09:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 279EAC21DED; Sun, 28 Jul 2019 14:07:14 +0000 (UTC) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by lists.denx.de (Postfix) with ESMTPS id 24C49C21DB3 for ; Sun, 28 Jul 2019 14:07:11 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id o9so10896161iom.3 for ; Sun, 28 Jul 2019 07:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8jJmbCpmptyuGH8Gq/oaLx44oW1qlua6l0i3WDYH7zk=; b=FF2oHMyiX75pUYjZwsdXWQ6/E7Tfxefy4WQ5bfqJIz+IX0okUsuwBHFP+EuLw9eron 38NGSF96mJdhjVZaWSyhVOcadAJ1z2KMwxEmTfw2iDd6uIlC0ZccUY7dXK68nupRxd4V sA795lvgR22pqeXhmlWo/BIr2b7rVFTNv3e4o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8jJmbCpmptyuGH8Gq/oaLx44oW1qlua6l0i3WDYH7zk=; b=j6lGgNqHJ6efC23rFsnoXOvFyp9CVd7fXk4J430AVjMJ1YF4h8ucnKJkw/sY9qBnmM H09gUOiIiBNBVyyovaJqhXutc8RfbkpNQzZL6k+gRnJKXupVxcP522DgdjrWIVkSIbqY mxx6sv+RklUFITwLs6PoychDnhclnJ/arClc4kfF/gzI63ROrOU/bWrxYashRlbBH5W/ 8uoTaQWv2khMJggiq1rBF6Hnq50D8p0BYrTpvKtd66Y0XC6hvZoaDKku1sK4NPCU4+gt ziChuWSnQDtyl2pbO06l4gMra43ExsBzfVueS3s78XFgKDT2AMPHs0UpQ8A7PFXFLEc6 AFCQ== X-Gm-Message-State: APjAAAUY+5DMfyWmQ67G+f80Q/+5siWH5Z63VShX8Ba64UBmfbjEIRVL Ssiubw7S0xgYXPjz84FpDjHxFZE54PU= X-Google-Smtp-Source: APXvYqw/Nr7RMUBSXgQ07oeda4g0pb8SW28phlHtTjbxpxpJJo5813xNoGGl0ccRs2AuQsw50Ydf7Q== X-Received: by 2002:a5d:96cc:: with SMTP id r12mr77974824iol.99.1564322830043; Sun, 28 Jul 2019 07:07:10 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.07.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:07:09 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:56 -0600 Message-Id: <20190728140357.137295-40-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 39/39] common: Add a note about the effort to reduce common.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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This file has quite a lot of general definitions and include files. Add a note about our intent to remove more of this. The file should ultimately include the configuration and perhaps a very other very common things used by most U-Boot files. Signed-off-by: Simon Glass --- include/common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/common.h b/include/common.h index 2645ac9615..d8f302ea92 100644 --- a/include/common.h +++ b/include/common.h @@ -1,5 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* + * Common header file for U-Boot + * + * This file still includes quite a bit of stuff that should be in separate + * headers like command.h, cpu.h and timer.h. Please think before adding more + * things. Patches to remove things are welcome. + * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */