mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 14:00:19 +00:00 
			
		
		
		
	env: Move env_set_hex() to env.h
Move env_set_hex() over to the new header file along with env_set_addr() which uses it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
		
							parent
							
								
									b9ca02c2d5
								
							
						
					
					
						commit
						c7694dd483
					
				@ -8,6 +8,7 @@
 | 
				
			|||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <environment.h>
 | 
					#include <environment.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <environment.h>
 | 
					#include <environment.h>
 | 
				
			||||||
#include <fdt_support.h>
 | 
					#include <fdt_support.h>
 | 
				
			||||||
#include <fdtdec.h>
 | 
					#include <fdtdec.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <spl.h>
 | 
					#include <spl.h>
 | 
				
			||||||
#include <linux/libfdt.h>
 | 
					#include <linux/libfdt.h>
 | 
				
			||||||
#include <nand.h>
 | 
					#include <nand.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <version.h>
 | 
					#include <version.h>
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <fdtdec.h>
 | 
					#include <fdtdec.h>
 | 
				
			||||||
#include <i2c.h>
 | 
					#include <i2c.h>
 | 
				
			||||||
#include <lcd.h>
 | 
					#include <lcd.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
#include <asm/arch/clock.h>
 | 
					#include <asm/arch/clock.h>
 | 
				
			||||||
#include <asm/arch/imx-regs.h>
 | 
					#include <asm/arch/imx-regs.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -8,6 +8,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
#include <asm/bootm.h>
 | 
					#include <asm/bootm.h>
 | 
				
			||||||
#include <mach/timer.h>
 | 
					#include <mach/timer.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <dm.h>
 | 
					#include <dm.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <fdtdec.h>
 | 
					#include <fdtdec.h>
 | 
				
			||||||
#include <virtio_types.h>
 | 
					#include <virtio_types.h>
 | 
				
			||||||
#include <virtio.h>
 | 
					#include <virtio.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <pci.h>
 | 
					#include <pci.h>
 | 
				
			||||||
#include <asm/processor.h>
 | 
					#include <asm/processor.h>
 | 
				
			||||||
#include <asm/mmu.h>
 | 
					#include <asm/mmu.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <dm.h>
 | 
					#include <dm.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <environment.h>
 | 
					#include <environment.h>
 | 
				
			||||||
#include <efi_loader.h>
 | 
					#include <efi_loader.h>
 | 
				
			||||||
#include <fdt_support.h>
 | 
					#include <fdt_support.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <dm.h>
 | 
					#include <dm.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <mmc.h>
 | 
					#include <mmc.h>
 | 
				
			||||||
#include <axp_pmic.h>
 | 
					#include <axp_pmic.h>
 | 
				
			||||||
#include <generic-phy.h>
 | 
					#include <generic-phy.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <asm/arch/hardware.h>
 | 
					#include <asm/arch/hardware.h>
 | 
				
			||||||
#include <asm/arch/sys_proto.h>
 | 
					#include <asm/arch/sys_proto.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -8,6 +8,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <cbfs.h>
 | 
					#include <cbfs.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
 | 
					static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
#include <linux/list.h>
 | 
					#include <linux/list.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -9,6 +9,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <linux/ctype.h>
 | 
					#include <linux/ctype.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <asm/global_data.h>
 | 
					#include <asm/global_data.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -72,6 +72,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <jffs2/jffs2.h>
 | 
					#include <jffs2/jffs2.h>
 | 
				
			||||||
#include <linux/list.h>
 | 
					#include <linux/list.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
#include <console.h>
 | 
					#include <console.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <s_record.h>
 | 
					#include <s_record.h>
 | 
				
			||||||
#include <net.h>
 | 
					#include <net.h>
 | 
				
			||||||
#include <exports.h>
 | 
					#include <exports.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -23,6 +23,7 @@
 | 
				
			|||||||
#include <linux/mtd/mtd.h>
 | 
					#include <linux/mtd/mtd.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
#include <console.h>
 | 
					#include <console.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <watchdog.h>
 | 
					#include <watchdog.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					#include <asm/byteorder.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <image.h>
 | 
					#include <image.h>
 | 
				
			||||||
#include <linux/ctype.h>
 | 
					#include <linux/ctype.h>
 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					#include <asm/byteorder.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static ulong get_arg(char *s, int w)
 | 
					static ulong get_arg(char *s, int w)
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
#include <cmd_spl.h>
 | 
					#include <cmd_spl.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <linux/libfdt.h>
 | 
					#include <linux/libfdt.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DECLARE_GLOBAL_DATA_PTR;
 | 
					DECLARE_GLOBAL_DATA_PTR;
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <asm/unaligned.h>
 | 
					#include <asm/unaligned.h>
 | 
				
			||||||
#include <tpm-common.h>
 | 
					#include <tpm-common.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -5,6 +5,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
#include <trace.h>
 | 
					#include <trace.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <exports.h>
 | 
					#include <exports.h>
 | 
				
			||||||
#include <memalign.h>
 | 
					#include <memalign.h>
 | 
				
			||||||
#include <mtd.h>
 | 
					#include <mtd.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <gzip.h>
 | 
					#include <gzip.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 | 
					static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <gzip.h>
 | 
					#include <gzip.h>
 | 
				
			||||||
#include <image.h>
 | 
					#include <image.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@
 | 
				
			|||||||
#include <part.h>
 | 
					#include <part.h>
 | 
				
			||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <image.h>
 | 
					#include <image.h>
 | 
				
			||||||
#include <linux/ctype.h>
 | 
					#include <linux/ctype.h>
 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					#include <asm/byteorder.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 | 
					static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -9,6 +9,7 @@
 | 
				
			|||||||
#include <bootretry.h>
 | 
					#include <bootretry.h>
 | 
				
			||||||
#include <cli.h>
 | 
					#include <cli.h>
 | 
				
			||||||
#include <console.h>
 | 
					#include <console.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <fdtdec.h>
 | 
					#include <fdtdec.h>
 | 
				
			||||||
#include <hash.h>
 | 
					#include <hash.h>
 | 
				
			||||||
#include <memalign.h>
 | 
					#include <memalign.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@
 | 
				
			|||||||
#ifndef USE_HOSTCC
 | 
					#ifndef USE_HOSTCC
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <bootstage.h>
 | 
					#include <bootstage.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <fdt_support.h>
 | 
					#include <fdt_support.h>
 | 
				
			||||||
#include <lmb.h>
 | 
					#include <lmb.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <bootm.h>
 | 
					#include <bootm.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <fdt_support.h>
 | 
					#include <fdt_support.h>
 | 
				
			||||||
#include <linux/libfdt.h>
 | 
					#include <linux/libfdt.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <fastboot.h>
 | 
					#include <fastboot.h>
 | 
				
			||||||
#include <fastboot-internal.h>
 | 
					#include <fastboot-internal.h>
 | 
				
			||||||
#include <fb_mmc.h>
 | 
					#include <fb_mmc.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@
 | 
				
			|||||||
 *	Dave Liu <daveliu@freescale.com>
 | 
					 *	Dave Liu <daveliu@freescale.com>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@
 | 
				
			|||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <console.h>
 | 
					#include <console.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <malloc.h>
 | 
					#include <malloc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/usb/ch9.h>
 | 
					#include <linux/usb/ch9.h>
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								fs/fs.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								fs/fs.c
									
									
									
									
									
								
							@ -6,6 +6,7 @@
 | 
				
			|||||||
#include <config.h>
 | 
					#include <config.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <mapmem.h>
 | 
					#include <mapmem.h>
 | 
				
			||||||
#include <part.h>
 | 
					#include <part.h>
 | 
				
			||||||
#include <ext4fs.h>
 | 
					#include <ext4fs.h>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,6 +12,7 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <gzip.h>
 | 
					#include <gzip.h>
 | 
				
			||||||
#include <memalign.h>
 | 
					#include <memalign.h>
 | 
				
			||||||
#include "ubifs.h"
 | 
					#include "ubifs.h"
 | 
				
			||||||
 | 
				
			|||||||
@ -209,27 +209,6 @@ int env_set(const char *varname, const char *value);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
int env_set_ulong(const char *varname, ulong 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);
 | 
					void	pci_init_board(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* common/exports.c */
 | 
					/* common/exports.c */
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
#define __ENV_H
 | 
					#define __ENV_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdbool.h>
 | 
					#include <stdbool.h>
 | 
				
			||||||
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * env_get_id() - Gets a sequence number for the environment
 | 
					 * 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);
 | 
					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
 | 
					 * env_complete() - return an auto-complete for environment variables
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 | 
				
			|||||||
@ -90,6 +90,7 @@
 | 
				
			|||||||
#include <common.h>
 | 
					#include <common.h>
 | 
				
			||||||
#include <command.h>
 | 
					#include <command.h>
 | 
				
			||||||
#include <console.h>
 | 
					#include <console.h>
 | 
				
			||||||
 | 
					#include <env.h>
 | 
				
			||||||
#include <environment.h>
 | 
					#include <environment.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <net.h>
 | 
					#include <net.h>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user