Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 2 | /* |
Wolfgang Denk | ea882ba | 2010-06-20 23:33:59 +0200 | [diff] [blame] | 3 | * (C) Copyright 2000-2010 |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * |
| 6 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
| 7 | * Andreas Heppel <aheppel@sysgo.de> |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <common.h> |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 11 | #include <command.h> |
| 12 | #include <environment.h> |
| 13 | #include <linux/stddef.h> |
wdenk | 0bc4a1a | 2002-09-18 11:09:59 +0000 | [diff] [blame] | 14 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 15 | DECLARE_GLOBAL_DATA_PTR; |
| 16 | |
Tom Rini | eeba55c | 2017-08-19 22:27:57 -0400 | [diff] [blame] | 17 | /* |
| 18 | * Because we only ever have the default environment available we must mark |
| 19 | * it as invalid. |
| 20 | */ |
| 21 | static int env_nowhere_init(void) |
| 22 | { |
| 23 | gd->env_addr = (ulong)&default_environment[0]; |
| 24 | gd->env_valid = ENV_INVALID; |
| 25 | |
| 26 | return 0; |
| 27 | } |
| 28 | |
Simon Glass | 4415f1d | 2017-08-03 12:21:58 -0600 | [diff] [blame] | 29 | U_BOOT_ENV_LOCATION(nowhere) = { |
| 30 | .location = ENVL_NOWHERE, |
Tom Rini | eeba55c | 2017-08-19 22:27:57 -0400 | [diff] [blame] | 31 | .init = env_nowhere_init, |
Simon Glass | ac358be | 2017-08-03 12:22:03 -0600 | [diff] [blame] | 32 | ENV_NAME("nowhere") |
Simon Glass | 4415f1d | 2017-08-03 12:21:58 -0600 | [diff] [blame] | 33 | }; |