wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 1 | /* |
Wolfgang Denk | 460a9ff | 2010-06-20 23:33:59 +0200 | [diff] [blame] | 2 | * (C) Copyright 2000-2010 |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | * | ||||
5 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> | ||||
6 | * Andreas Heppel <aheppel@sysgo.de> | ||||
7 | |||||
Wolfgang Denk | bd8ec7e | 2013-10-07 13:07:26 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 9 | */ |
10 | |||||
11 | #include <common.h> | ||||
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 12 | #include <command.h> |
13 | #include <environment.h> | ||||
14 | #include <linux/stddef.h> | ||||
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 15 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 16 | DECLARE_GLOBAL_DATA_PTR; |
17 | |||||
Igor Grinberg | 2bb87bf | 2011-11-07 01:14:00 +0000 | [diff] [blame] | 18 | env_t *env_ptr; |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 19 | |
Wolfgang Denk | 460a9ff | 2010-06-20 23:33:59 +0200 | [diff] [blame] | 20 | void env_relocate_spec(void) |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 21 | { |
22 | } | ||||
23 | |||||
Wolfgang Denk | 460a9ff | 2010-06-20 23:33:59 +0200 | [diff] [blame] | 24 | /* |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 25 | * Initialize Environment use |
26 | * | ||||
27 | * We are still running from ROM, so data use is limited | ||||
28 | */ | ||||
Wolfgang Denk | 460a9ff | 2010-06-20 23:33:59 +0200 | [diff] [blame] | 29 | int env_init(void) |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 30 | { |
Igor Grinberg | 2bb87bf | 2011-11-07 01:14:00 +0000 | [diff] [blame] | 31 | gd->env_addr = (ulong)&default_environment[0]; |
32 | gd->env_valid = 0; | ||||
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 33 | |
Igor Grinberg | 2bb87bf | 2011-11-07 01:14:00 +0000 | [diff] [blame] | 34 | return 0; |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 35 | } |
Simon Glass | c10a88e | 2017-08-03 12:21:58 -0600 | [diff] [blame^] | 36 | |
37 | U_BOOT_ENV_LOCATION(nowhere) = { | ||||
38 | .location = ENVL_NOWHERE, | ||||
39 | .load = env_relocate_spec, | ||||
40 | .init = env_init, | ||||
41 | }; |