diff options
Diffstat (limited to 'arch')
70 files changed, 391 insertions, 164 deletions
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 5798149046..a498ce5b29 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -85,7 +85,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) r2 = (unsigned int)images->ft_addr; } else { r0 = 1; - r2 = (unsigned int)getenv("bootargs"); + r2 = (unsigned int)env_get("bootargs"); } smp_set_core_boot_addr((unsigned long)kernel_entry, -1); diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 39b001fd53..da9324b43c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -97,6 +97,9 @@ config ARM_ERRATA_833069 config ARM_ERRATA_833471 bool +config ARM_ERRATA_845369 + bool + config ARM_ERRATA_852421 bool @@ -493,7 +496,6 @@ config ARCH_BCM283X select DM_GPIO select OF_CONTROL imply FAT_WRITE - imply ENV_IS_IN_FAT config TARGET_VEXPRESS_CA15_TC2 bool "Support vexpress_ca15_tc2" @@ -1039,7 +1041,6 @@ config ARCH_UNIPHIER select SPL_PINCTRL if SPL select SUPPORT_SPL imply FAT_WRITE - imply ENV_IS_IN_MMC help Support for UniPhier SoC family developed by Socionext Inc. (formerly, System LSI Business Division of Panasonic Corporation) diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index f06fd28940..7b84a7a0f1 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -187,6 +187,12 @@ ENTRY(cpu_init_cp15) mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register #endif +#ifdef CONFIG_ARM_ERRATA_845369 + mrc p15, 0, r0, c15, c0, 1 @ read diagnostic register + orr r0, r0, #1 << 22 @ set bit #22 + mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register +#endif + mov r5, lr @ Store my Caller mrc p15, 0, r1, c0, c0, 0 @ r1 has Read Main ID Register (MIDR) mov r3, r1, lsr #20 @ get variant field diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index ac2d8d1a3f..88f3f4dd16 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -329,7 +329,7 @@ int arch_misc_init(void) strcpy(soc, "vf"); strcat(soc, soc_type); - setenv("soc", soc); + env_set("soc", soc); return 0; } diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index aee1ffa7d4..639e9d2ddc 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -95,7 +95,7 @@ static void erratum_a008514(void) static unsigned long get_internval_val_mhz(void) { - char *interval = getenv(PLATFORM_CYCLE_ENV_VAR); + char *interval = env_get(PLATFORM_CYCLE_ENV_VAR); /* * interval is the number of platform cycles(MHz) between * wake up events generated by EPU. diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2cbdb17ca5..f94c2471b4 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -336,6 +336,8 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ sun50i-h5-orangepi-zero-plus2.dtb dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-bananapi-m64.dtb \ + sun50i-a64-nanopi-a64.dtb \ + sun50i-a64-olinuxino.dtb \ sun50i-a64-orangepi-win.dtb \ sun50i-a64-pine64-plus.dtb \ sun50i-a64-pine64.dtb diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts new file mode 100644 index 0000000000..778636c73a --- /dev/null +++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "sun50i-a64.dtsi" + +#include <dt-bindings/gpio/gpio.h> + +/ { + model = "FriendlyARM NanoPi A64"; + compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +/* i2c1 connected with gpio headers like pine64, bananapi */ +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + status = "disabled"; +}; + +&i2c1_pins { + bias-pull-up; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_vcc3v3>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-inverted; + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts new file mode 100644 index 0000000000..7bd4730c93 --- /dev/null +++ b/arch/arm/dts/sun50i-a64-olinuxino.dts @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; + +#include "sun50i-a64.dtsi" + +#include <dt-bindings/gpio/gpio.h> + +/ { + model = "Olimex A64-Olinuxino"; + compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_vcc3v3>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-inverted; + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi index c7f669f588..65a344d9ce 100644 --- a/arch/arm/dts/sun50i-a64.dtsi +++ b/arch/arm/dts/sun50i-a64.dtsi @@ -204,6 +204,28 @@ #phy-cells = <1>; }; + ehci0: usb@01c1a000 { + compatible = "allwinner,sun50i-a64-ehci", "generic-ehci"; + reg = <0x01c1a000 0x100>; + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_OHCI0>, + <&ccu CLK_BUS_EHCI0>, + <&ccu CLK_USB_OHCI0>; + resets = <&ccu RST_BUS_OHCI0>, + <&ccu RST_BUS_EHCI0>; + status = "disabled"; + }; + + ohci0: usb@01c1a400 { + compatible = "allwinner,sun50i-a64-ohci", "generic-ohci"; + reg = <0x01c1a400 0x100>; + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_OHCI0>, + <&ccu CLK_USB_OHCI0>; + resets = <&ccu RST_BUS_OHCI0>; + status = "disabled"; + }; + ehci1: usb@01c1b000 { compatible = "allwinner,sun50i-a64-ehci", "generic-ehci"; reg = <0x01c1b000 0x100>; diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts index 5ea4915f6d..10d307408f 100644 --- a/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts +++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts @@ -56,7 +56,7 @@ }; &pio { - mmc2_pins_nrst: mmc2@0 { + mmc2_pins_nrst: mmc2-rst-pin { allwinner,pins = "PC16"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; diff --git a/arch/arm/include/asm/arch-mx6/mx6q_pins.h b/arch/arm/include/asm/arch-mx6/mx6q_pins.h index a8456a284a..41f7240a35 100644 --- a/arch/arm/include/asm/arch-mx6/mx6q_pins.h +++ b/arch/arm/include/asm/arch-mx6/mx6q_pins.h @@ -863,7 +863,7 @@ MX6_PAD_DECL(SD3_DAT4__SD3_DATA4, 0x069C, 0x02B4, 0, 0x0000, 0, 0) MX6_PAD_DECL(SD3_DAT4__UART2_TX_DATA, 0x069C, 0x02B4, 1, 0x0000, 0, 0) MX6_PAD_DECL(SD3_DAT4__UART2_RX_DATA, 0x069C, 0x02B4, 1, 0x0928, 5, 0) MX6_PAD_DECL(SD3_DAT4__GPIO7_IO01, 0x069C, 0x02B4, 5, 0x0000, 0, 0) -MX6_PAD_DECL(SD3_CMD__SD3_CMD, 0x06A0, 0x02B8, 16, 0x0000, 0, 0) +MX6_PAD_DECL(SD3_CMD__SD3_CMD, 0x06A0, 0x02B8, 0 | IOMUX_CONFIG_SION, 0x0000, 0, 0) MX6_PAD_DECL(SD3_CMD__UART2_CTS_B, 0x06A0, 0x02B8, 1, 0x0000, 0, 0) MX6_PAD_DECL(SD3_CMD__UART2_RTS_B, 0x06A0, 0x02B8, 1, 0x0924, 2, 0) MX6_PAD_DECL(SD3_CMD__FLEXCAN1_TX, 0x06A0, 0x02B8, 2, 0x0000, 0, 0) @@ -924,7 +924,7 @@ MX6_PAD_DECL(NANDF_CS3__ESAI_TX1, 0x06D8, 0x02F0, 2, 0x0878, 1, 0) MX6_PAD_DECL(NANDF_CS3__EIM_ADDR26, 0x06D8, 0x02F0, 3, 0x0000, 0, 0) MX6_PAD_DECL(NANDF_CS3__GPIO6_IO16, 0x06D8, 0x02F0, 5, 0x0000, 0, 0) MX6_PAD_DECL(NANDF_CS3__IPU2_SISG1, 0x06D8, 0x02F0, 6, 0x0000, 0, 0) -MX6_PAD_DECL(SD4_CMD__SD4_CMD, 0x06DC, 0x02F4, 16, 0x0000, 0, 0) +MX6_PAD_DECL(SD4_CMD__SD4_CMD, 0x06DC, 0x02F4, 0 | IOMUX_CONFIG_SION, 0x0000, 0, 0) MX6_PAD_DECL(SD4_CMD__NAND_RE_B, 0x06DC, 0x02F4, 1, 0x0000, 0, 0) MX6_PAD_DECL(SD4_CMD__UART3_TX_DATA, 0x06DC, 0x02F4, 2, 0x0000, 0, 0) MX6_PAD_DECL(SD4_CMD__UART3_RX_DATA, 0x06DC, 0x02F4, 2, 0x0930, 2, 0) @@ -1001,7 +1001,7 @@ MX6_PAD_DECL(SD1_DAT3__PWM1_OUT, 0x072C, 0x0344, 3, 0x0000, 0, 0) MX6_PAD_DECL(SD1_DAT3__WDOG2_B, 0x072C, 0x0344, 4, 0x0000, 0, 0) MX6_PAD_DECL(SD1_DAT3__GPIO1_IO21, 0x072C, 0x0344, 5, 0x0000, 0, 0) MX6_PAD_DECL(SD1_DAT3__WDOG2_RESET_B_DEB, 0x072C, 0x0344, 6, 0x0000, 0, 0) -MX6_PAD_DECL(SD1_CMD__SD1_CMD, 0x0730, 0x0348, 16, 0x0000, 0, 0) +MX6_PAD_DECL(SD1_CMD__SD1_CMD, 0x0730, 0x0348, 0 | IOMUX_CONFIG_SION, 0x0000, 0, 0) MX6_PAD_DECL(SD1_CMD__ECSPI5_MOSI, 0x0730, 0x0348, 1, 0x0830, 0, 0) MX6_PAD_DECL(SD1_CMD__PWM4_OUT, 0x0730, 0x0348, 2, 0x0000, 0, 0) MX6_PAD_DECL(SD1_CMD__GPT_COMPARE1, 0x0730, 0x0348, 3, 0x0000, 0, 0) @@ -1022,7 +1022,7 @@ MX6_PAD_DECL(SD2_CLK__ECSPI5_SCLK, 0x073C, 0x0354, 1, 0x0828, 1, 0) MX6_PAD_DECL(SD2_CLK__KEY_COL5, 0x073C, 0x0354, 2, 0x08E8, 3, 0) MX6_PAD_DECL(SD2_CLK__AUD4_RXFS, 0x073C, 0x0354, 3, 0x07C0, 1, 0) MX6_PAD_DECL(SD2_CLK__GPIO1_IO10, 0x073C, 0x0354, 5, 0x0000, 0, 0) -MX6_PAD_DECL(SD2_CMD__SD2_CMD, 0x0740, 0x0358, 16, 0x0000, 0, 0) +MX6_PAD_DECL(SD2_CMD__SD2_CMD, 0x0740, 0x0358, 0 | IOMUX_CONFIG_SION, 0x0000, 0, 0) MX6_PAD_DECL(SD2_CMD__ECSPI5_MOSI, 0x0740, 0x0358, 1, 0x0830, 1, 0) MX6_PAD_DECL(SD2_CMD__KEY_ROW5, 0x0740, 0x0358, 2, 0x08F4, 2, 0) MX6_PAD_DECL(SD2_CMD__AUD4_RXC, 0x0740, 0x0358, 3, 0x07BC, 1, 0) diff --git a/arch/arm/include/asm/arch-sunxi/prcm.h b/arch/arm/include/asm/arch-sunxi/prcm.h index ae3880b13b..ba4427c925 100644 --- a/arch/arm/include/asm/arch-sunxi/prcm.h +++ b/arch/arm/include/asm/arch-sunxi/prcm.h @@ -196,6 +196,10 @@ #define PRCM_CPU3_PWR_CLAMP(n) (((n) & 0xff) << 0) #define PRCM_CPU3_PWR_CLAMP_MASK PRCM_CPU3_PWR_CLAMP(0xff) +#define PRCM_SEC_SWITCH_APB0_CLK_NONSEC (0x1 << 0) +#define PRCM_SEC_SWITCH_PLL_CFG_NONSEC (0x1 << 1) +#define PRCM_SEC_SWITCH_PWR_GATE_NONSEC (0x1 << 2) + #ifndef __ASSEMBLY__ #include <linux/compiler.h> @@ -233,6 +237,8 @@ struct __packed sunxi_prcm_reg { u32 dram_pwr; /* 0x180 */ u8 res12[0xc]; /* 0x184 */ u32 dram_tst; /* 0x190 */ + u8 res13[0x3c]; /* 0x194 */ + u32 prcm_sec_switch; /* 0x1d0 */ }; void prcm_apb0_enable(u32 flags); diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 704849bd0c..5c62d9c144 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -216,7 +216,7 @@ static void do_nonsec_virt_switch(void) /* Subcommand: PREP */ static void boot_prep_linux(bootm_headers_t *images) { - char *commandline = getenv("bootargs"); + char *commandline = env_get("bootargs"); if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { #ifdef CONFIG_OF_LIBFDT @@ -273,7 +273,7 @@ __weak bool armv7_boot_nonsec_default(void) #ifdef CONFIG_ARMV7_NONSEC bool armv7_boot_nonsec(void) { - char *s = getenv("bootm_boot_mode"); + char *s = env_get("bootm_boot_mode"); bool nonsec = armv7_boot_nonsec_default(); if (s && !strcmp(s, "sec")) @@ -361,7 +361,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) ulong addr = (ulong)kernel_entry | 1; kernel_entry = (void *)addr; #endif - s = getenv("machid"); + s = env_get("machid"); if (s) { if (strict_strtoul(s, 16, &machid) < 0) { debug("strict_strtoul failed!\n"); diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index 415ac89de9..bcd16ee591 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -200,7 +200,7 @@ static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* Optionally save returned end to the environment */ if (argc == 4) { sprintf(end_str, "0x%08lx", end_addr); - setenv(argv[3], end_str); + env_set(argv[3], end_str); } } else { return CMD_RET_USAGE; diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index ec331ba6bb..461ff778c2 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -90,7 +90,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) uint8_t env_enetaddr[6]; int ret; - ret = eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr); + ret = eth_env_get_enetaddr_by_index("eth", 0, env_enetaddr); if (!ret) { /* * There is no MAC address in the environment, so we @@ -99,7 +99,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) debug("### Setting environment from EEPROM MAC address = " "\"%pM\"\n", env_enetaddr); - ret = !eth_setenv_enetaddr("ethaddr", rom_enetaddr); + ret = !eth_env_set_enetaddr("ethaddr", rom_enetaddr); } if (!ret) printf("Failed to set mac address from EEPROM: %d\n", ret); diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 8b1389f30f..2fb84f9453 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -8,7 +8,6 @@ config ARCH_EXYNOS4 bool "Exynos4 SoC family" select CPU_V7 select BOARD_EARLY_INIT_F - imply ENV_IS_IN_MMC help Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There are multiple SoCs in this family including Exynos4210, Exynos4412, diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 9bae748c67..a1aa36bc22 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -1,24 +1,32 @@ if ARCH_MX6 +config MX6_SMP + select ARM_ERRATA_751472 + select ARM_ERRATA_761320 + select ARM_ERRATA_794072 + select ARM_ERRATA_845369 + bool + config MX6 + select ARM_ERRATA_743622 if !MX6UL bool default y - select ARM_ERRATA_743622 if !MX6UL - select ARM_ERRATA_751472 if !MX6UL - select ARM_ERRATA_761320 if !MX6UL - select ARM_ERRATA_794072 if !MX6UL imply CMD_FUSE config MX6D + select MX6_SMP bool config MX6DL + select MX6_SMP bool config MX6Q + select MX6_SMP bool config MX6QDL + select MX6_SMP bool config MX6S @@ -30,7 +38,6 @@ config MX6SL config MX6SX select ROM_UNIFIED_SECTIONS bool - imply ENV_IS_IN_MMC config MX6SLL select ROM_UNIFIED_SECTIONS @@ -332,6 +339,11 @@ config TARGET_PCM058 select BOARD_LATE_INIT select SUPPORT_SPL +config TARGET_PFLA02 + bool "Phytec PFLA02 (PhyFlex) i.MX6 Quad" + select BOARD_LATE_INIT + select SUPPORT_SPL + config TARGET_SECOMX6 bool "secomx6 boards" @@ -429,6 +441,7 @@ source "board/freescale/mx6ul_14x14_evk/Kconfig" source "board/freescale/mx6ullevk/Kconfig" source "board/grinn/liteboard/Kconfig" source "board/phytec/pcm058/Kconfig" +source "board/phytec/pfla02/Kconfig" source "board/gateworks/gw_ventana/Kconfig" source "board/kosagi/novena/Kconfig" source "board/samtec/vining_2000/Kconfig" diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c index 1f2739e864..0e019c4262 100644 --- a/arch/arm/mach-imx/mx6/clock.c +++ b/arch/arm/mach-imx/mx6/clock.c @@ -19,7 +19,7 @@ enum pll_clocks { PLL_USBOTG, /* OTG USB PLL */ PLL_ENET, /* ENET PLL */ PLL_AUDIO, /* AUDIO PLL */ - PLL_VIDEO, /* AUDIO PLL */ + PLL_VIDEO, /* VIDEO PLL */ }; struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 22b244079b..f8d7e8ee68 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -132,7 +132,7 @@ int board_late_init(void) /* In bootstrap don't use the env vars */ if (((reg & 0x3000000) >> 24) == 0x1) { set_default_env(NULL); - setenv("preboot", ""); + env_set("preboot", ""); } return opos6ul_board_late_init(); diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index af316735ee..9ede1f5435 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -114,6 +114,12 @@ u32 get_cpu_rev(void) #define OCOTP_CFG3_SPEED_528MHZ 1 #define OCOTP_CFG3_SPEED_696MHZ 2 +/* + * For i.MX6ULL + */ +#define OCOTP_CFG3_SPEED_792MHZ 2 +#define OCOTP_CFG3_SPEED_900MHZ 3 + u32 get_cpu_speed_grade_hz(void) { struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; @@ -126,11 +132,22 @@ u32 get_cpu_speed_grade_hz(void) val >>= OCOTP_CFG3_SPEED_SHIFT; val &= 0x3; - if (is_mx6ul() || is_mx6ull()) { + if (is_mx6ul()) { if (val == OCOTP_CFG3_SPEED_528MHZ) return 528000000; else if (val == OCOTP_CFG3_SPEED_696MHZ) - return 69600000; + return 696000000; + else + return 0; + } + + if (is_mx6ull()) { + if (val == OCOTP_CFG3_SPEED_528MHZ) + return 528000000; + else if (val == OCOTP_CFG3_SPEED_792MHZ) + return 792000000; + else if (val == OCOTP_CFG3_SPEED_900MHZ) + return 900000000; else return 0; } @@ -234,6 +251,10 @@ static int set_ldo_voltage(enum ldo_reg ldo, u32 mv) u32 val, step, old, reg = readl(&anatop->reg_core); u8 shift; + /* No LDO_SOC/PU/ARM */ + if (is_mx6sll()) + return 0; + if (mv < 725) val = 0x00; /* Power gated off */ else if (mv > 1450) @@ -293,7 +314,7 @@ static void clear_mmdc_ch_mask(void) reg = readl(&mxc_ccm->ccdr); /* Clear MMDC channel mask */ - if (is_mx6sx() || is_mx6ul() || is_mx6ull() || is_mx6sl()) + if (is_mx6sx() || is_mx6ul() || is_mx6ull() || is_mx6sl() || is_mx6sll()) reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK); else reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK | MXC_CCM_CCDR_MMDC_CH0_HS_MASK); @@ -344,20 +365,10 @@ static void init_bandgap(void) } } -#ifdef CONFIG_MX6SL -static void set_preclk_from_osc(void) -{ - struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; - u32 reg; - - reg = readl(&mxc_ccm->cscmr1); - reg |= MXC_CCM_CSCMR1_PER_CLK_SEL_MASK; - writel(reg, &mxc_ccm->cscmr1); -} -#endif - int arch_cpu_init(void) { + struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + init_aips(); /* Need to clear MMDC_CHx_MASK to make warm reset work. */ @@ -421,12 +432,14 @@ int arch_cpu_init(void) } /* Set perclk to source from OSC 24MHz */ -#if defined(CONFIG_MX6SL) - set_preclk_from_osc(); -#endif + if (is_mx6sl()) + setbits_le32(&ccm->cscmr1, MXC_CCM_CSCMR1_PER_CLK_SEL_MASK); imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */ + if (is_mx6sx()) + setbits_le32(&ccm->cscdr1, MXC_CCM_CSCDR1_UART_CLK_SEL); + init_src(); return 0; @@ -495,6 +508,10 @@ uint mmc_get_env_part(struct mmc *mmc) int board_postclk_init(void) { + /* NO LDO SOC on i.MX6SLL */ + if (is_mx6sll()) + return 0; + set_ldo_voltage(LDO_SOC, 1175); /* Set VDDSOC to 1.175V */ return 0; @@ -576,7 +593,7 @@ void s_init(void) u32 mask528; u32 reg, periph1, periph2; - if (is_mx6sx() || is_mx6ul() || is_mx6ull()) + if (is_mx6sx() || is_mx6ul() || is_mx6ull() || is_mx6sll()) return; /* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig index 7053697f9b..aea85265ef 100644 --- a/arch/arm/mach-imx/mx7/Kconfig +++ b/arch/arm/mach-imx/mx7/Kconfig @@ -13,7 +13,6 @@ config MX7D select ROM_UNIFIED_SECTIONS imply CMD_FUSE bool - imply ENV_IS_IN_MMC choice prompt "MX7 board select" diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 4cf977e20a..87bf105f38 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -31,7 +31,7 @@ U_BOOT_DEVICE(imx7_thermal) = { }; #endif -#ifdef CONFIG_IMX_RDC +#if CONFIG_IS_ENABLED(IMX_RDC) /* * In current design, if any peripheral was assigned to both A7 and M4, * it will receive ipg_stop or ipg_wait when any of the 2 platforms enter @@ -245,8 +245,9 @@ int arch_cpu_init(void) mxs_dma_init(); #endif - if (IS_ENABLED(CONFIG_IMX_RDC)) - isolate_resource(); +#if CONFIG_IS_ENABLED(IMX_RDC) + isolate_resource(); +#endif return 0; } @@ -256,9 +257,9 @@ int arch_misc_init(void) { #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG if (is_mx7d()) - setenv("soc", "imx7d"); + env_set("soc", "imx7d"); else - setenv("soc", "imx7s"); + env_set("soc", "imx7s"); #endif return 0; diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c index 55242f0eaa..c670c5dfc9 100644 --- a/arch/arm/mach-imx/video.c +++ b/arch/arm/mach-imx/video.c @@ -10,7 +10,7 @@ int board_video_skip(void) { int i; int ret; - char const *panel = getenv("panel"); + char const *panel = env_get("panel"); if (!panel) { for (i = 0; i < display_count; i++) { diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index 5146e51f9c..d506ee5b39 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig @@ -11,13 +11,11 @@ config ARCH_INTEGRATOR_AP config ARCH_INTEGRATOR_CP bool "Support Integrator/CP platform" select ARCH_CINTEGRATOR - imply ENV_IS_IN_FLASH endchoice config ARCH_CINTEGRATOR bool - imply ENV_IS_IN_FLASH choice prompt "Integrator core module select" diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c index 4cad6a2d81..b2f5414a5c 100644 --- a/arch/arm/mach-keystone/ddr3.c +++ b/arch/arm/mach-keystone/ddr3.c @@ -331,7 +331,7 @@ void ddr3_check_ecc_int(u32 base) int ecc_test = 0; u32 value = __raw_readl(base + KS2_DDR3_ECC_INT_STATUS_OFFSET); - env = getenv("ecc_test"); + env = env_get("ecc_test"); if (env) ecc_test = simple_strtol(env, NULL, 0); diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index beb8a767c4..fcabfbd5c3 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -46,7 +46,7 @@ int misc_init_r(void) char *env; long ks2_debug = 0; - env = getenv("ks2_debug"); + env = env_get("ks2_debug"); if (env) ks2_debug = simple_strtol(env, NULL, 0); diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 4c9d3fde47..db2ff0311c 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -129,7 +129,7 @@ int kw_config_adr_windows(void) static void kw_sysrst_action(void) { int ret; - char *s = getenv("sysrstcmd"); + char *s = env_get("sysrstcmd"); if (!s) { debug("Error.. %s failed, check sysrstcmd\n", @@ -153,7 +153,7 @@ static void kw_sysrst_check(void) /* * no action if sysrstdelay environment variable is not defined */ - s = getenv("sysrstdelay"); + s = env_get("sysrstdelay"); if (s == NULL) return; diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 1b12b33060..01d700bf2e 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -32,7 +32,6 @@ config ARMADA_38X config ARMADA_XP bool select ARMADA_32BIT - imply ENV_IS_IN_SPI_FLASH # ARMv8 SoCs... config ARMADA_3700 diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 700e6c2f79..26245aa169 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -10,6 +10,7 @@ #include <common.h> #include <ahci.h> +#include <environment.h> #include <spl.h> #include <asm/omap_common.h> #include <asm/arch/omap.h> @@ -240,8 +241,8 @@ void arch_preboot_os(void) int fb_set_reboot_flag(void) { printf("Setting reboot to fastboot flag ...\n"); - setenv("dofastboot", "1"); - saveenv(); + env_set("dofastboot", "1"); + env_save(); return 0; } #endif diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index 1946641eb9..0b0bf1837c 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -40,7 +40,7 @@ static void omap_set_fastboot_cpu(void) printf("Warning: fastboot.cpu: unknown CPU rev: %u\n", cpu_rev); } - setenv("fastboot.cpu", cpu); + env_set("fastboot.cpu", cpu); } static void omap_set_fastboot_secure(void) @@ -63,18 +63,18 @@ static void omap_set_fastboot_secure(void) printf("Warning: fastboot.secure: unknown CPU sec: %u\n", dev); } - setenv("fastboot.secure", secure); + env_set("fastboot.secure", secure); } static void omap_set_fastboot_board_rev(void) { const char *board_rev; - board_rev = getenv("board_rev"); + board_rev = env_get("board_rev"); if (board_rev == NULL) printf("Warning: fastboot.board_rev: unknown board revision\n"); - setenv("fastboot.board_rev", board_rev); + env_set("fastboot.board_rev", board_rev); } #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV @@ -118,7 +118,7 @@ static void omap_set_fastboot_userdata_size(void) sprintf(buf, "%u", sz_kb); } - setenv("fastboot.userdata_size", buf); + env_set("fastboot.userdata_size", buf); } #else static inline void omap_set_fastboot_userdata_size(void) @@ -169,11 +169,11 @@ void omap_die_id_serial(void) omap_die_id((unsigned int *)&die_id); - if (!getenv("serial#")) { + if (!env_get("serial#")) { snprintf(serial_string, sizeof(serial_string), "%08x%08x", die_id[0], die_id[3]); - setenv("serial#", serial_string); + env_set("serial#", serial_string); } } @@ -182,7 +182,7 @@ void omap_die_id_get_board_serial(struct tag_serialnr *serialnr) char *serial_string; unsigned long long serial; - serial_string = getenv("serial#"); + serial_string = env_get("serial#"); if (serial_string) { serial = simple_strtoull(serial_string, NULL, 16); @@ -202,7 +202,7 @@ void omap_die_id_usbethaddr(void) omap_die_id((unsigned int *)&die_id); - if (!getenv("usbethaddr")) { + if (!env_get("usbethaddr")) { /* * Create a fake MAC address from the processor ID code. * First byte is 0x02 to signify locally administered. @@ -214,7 +214,7 @@ void omap_die_id_usbethaddr(void) mac[4] = die_id[0] & 0xff; mac[5] = (die_id[0] >> 8) & 0xff; - eth_setenv_enetaddr("usbethaddr", mac); + eth_env_set_enetaddr("usbethaddr", mac); } } diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c index 26ea23b014..a3457f3914 100644 --- a/arch/arm/mach-rockchip/rk3036-board.c +++ b/arch/arm/mach-rockchip/rk3036-board.c @@ -34,11 +34,11 @@ static void setup_boot_mode(void) switch (boot_mode) { case BOOT_FASTBOOT: printf("enter fastboot!\n"); - setenv("preboot", "setenv preboot; fastboot usb0"); + env_set("preboot", "setenv preboot; fastboot usb0"); break; case BOOT_UMS: printf("enter UMS!\n"); - setenv("preboot", "setenv preboot; ums mmc 0"); + env_set("preboot", "setenv preboot; ums mmc 0"); break; } } diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c index b6543a5108..1e79c19309 100644 --- a/arch/arm/mach-rockchip/rk322x-board.c +++ b/arch/arm/mach-rockchip/rk322x-board.c @@ -30,11 +30,11 @@ static void setup_boot_mode(void) switch (boot_mode) { case BOOT_FASTBOOT: printf("enter fastboot!\n"); - setenv("preboot", "setenv preboot; fastboot usb0"); + env_set("preboot", "setenv preboot; fastboot usb0"); break; case BOOT_UMS: printf("enter UMS!\n"); - setenv("preboot", "setenv preboot; ums mmc 0"); + env_set("preboot", "setenv preboot; ums mmc 0"); break; } } diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index d5f568c793..74c6cc14a1 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -37,11 +37,11 @@ static void setup_boot_mode(void) switch (boot_mode) { case BOOT_FASTBOOT: printf("enter fastboot!\n"); - setenv("preboot", "setenv preboot; fastboot usb0"); + env_set("preboot", "setenv preboot; fastboot usb0"); break; case BOOT_UMS: printf("enter UMS!\n"); - setenv("preboot", "setenv preboot; if mmc dev 0;" + env_set("preboot", "setenv preboot; if mmc dev 0;" "then ums mmc 0; else ums mmc 1;fi"); break; } diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c index 49b26b3570..2f1da740fb 100644 --- a/arch/arm/mach-socfpga/misc_gen5.c +++ b/arch/arm/mach-socfpga/misc_gen5.c @@ -219,9 +219,9 @@ int arch_misc_init(void) { const u32 bsel = readl(&sysmgr_regs->bootinfo) & 0x7; const int fpga_id = socfpga_fpga_id(0); - setenv("bootmode", bsel_str[bsel].mode); + env_set("bootmode", bsel_str[bsel].mode); if (fpga_id >= 0) - setenv("fpgatype", socfpga_fpga_model[fpga_id].var); + env_set("fpgatype", socfpga_fpga_model[fpga_id].var); return socfpga_eth_reset(); } #endif diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 386befb4e7..2cd7bae078 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -62,7 +62,6 @@ config MACH_SUNXI_H3_H5 select SUNXI_DRAM_DW_32BIT select SUNXI_GEN_SUN6I select SUPPORT_SPL - imply ENV_IS_IN_MMC choice prompt "Sunxi SoC Variant" @@ -74,7 +73,6 @@ config MACH_SUN4I select ARM_CORTEX_CPU_IS_UP select SUNXI_GEN_SUN4I select SUPPORT_SPL - imply ENV_IS_IN_MMC config MACH_SUN5I bool "sun5i (Allwinner A13)" @@ -92,7 +90,6 @@ config MACH_SUN6I select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT - imply ENV_IS_IN_MMC config MACH_SUN7I bool "sun7i (Allwinner A20)" @@ -103,7 +100,6 @@ config MACH_SUN7I select SUNXI_GEN_SUN4I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT - imply ENV_IS_IN_MMC config MACH_SUN8I_A23 bool "sun8i (Allwinner A23)" @@ -114,7 +110,6 @@ config MACH_SUN8I_A23 select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT - imply ENV_IS_IN_MMC config MACH_SUN8I_A33 bool "sun8i (Allwinner A33)" @@ -140,7 +135,6 @@ config MACH_SUN8I_H3 select ARCH_SUPPORT_PSCI select MACH_SUNXI_H3_H5 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT - imply ENV_IS_IN_MMC config MACH_SUN8I_R40 bool "sun8i (Allwinner R40)" diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c index ec5b026ef5..870ff5b1e0 100644 --- a/arch/arm/mach-sunxi/clock_sun6i.c +++ b/arch/arm/mach-sunxi/clock_sun6i.c @@ -66,11 +66,17 @@ void clock_init_sec(void) #ifdef CONFIG_MACH_SUNXI_H3_H5 struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; + struct sunxi_prcm_reg * const prcm = + (struct sunxi_prcm_reg *)SUNXI_PRCM_BASE; setbits_le32(&ccm->ccu_sec_switch, CCM_SEC_SWITCH_MBUS_NONSEC | CCM_SEC_SWITCH_BUS_NONSEC | CCM_SEC_SWITCH_PLL_NONSEC); + setbits_le32(&prcm->prcm_sec_switch, + PRCM_SEC_SWITCH_APB0_CLK_NONSEC | + PRCM_SEC_SWITCH_PLL_CFG_NONSEC | + PRCM_SEC_SWITCH_PWR_GATE_NONSEC); #endif } diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 58085dc0a3..51e50907d2 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -60,7 +60,6 @@ config TEGRA_ARMV8_COMMON bool "Tegra 64-bit common options" select ARM64 select TEGRA_COMMON - imply ENV_IS_IN_MMC choice prompt "Tegra SoC select" @@ -78,7 +77,6 @@ config TEGRA30 select ARM_ERRATA_743622 select ARM_ERRATA_751472 select TEGRA_ARMV7_COMMON - imply ENV_IS_IN_MMC config TEGRA114 bool "Tegra114 family" @@ -87,7 +85,6 @@ config TEGRA114 config TEGRA124 bool "Tegra124 family" select TEGRA_ARMV7_COMMON - imply ENV_IS_IN_MMC imply REGMAP imply SYSCON diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index bd137969f0..0426b7a95a 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -214,9 +214,9 @@ int board_late_init(void) #if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE) if (tegra_cpu_is_non_secure()) { printf("CPU is in NS mode\n"); - setenv("cpu_ns_mode", "1"); + env_set("cpu_ns_mode", "1"); } else { - setenv("cpu_ns_mode", ""); + env_set("cpu_ns_mode", ""); } #endif start_cpu_fan(); diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_board.c b/arch/arm/mach-tegra/tegra186/nvtboot_board.c index feb935f0d9..b94eb424aa 100644 --- a/arch/arm/mach-tegra/tegra186/nvtboot_board.c +++ b/arch/arm/mach-tegra/tegra186/nvtboot_board.c @@ -15,7 +15,7 @@ static int set_fdt_addr(void) { int ret; - ret = setenv_hex("fdt_addr", nvtboot_boot_x0); + ret = env_set_hex("fdt_addr", nvtboot_boot_x0); if (ret) { printf("Failed to set fdt_addr to point at DTB: %d\n", ret); return ret; @@ -35,7 +35,7 @@ static int set_ethaddr_from_nvtboot(void) const u32 *prop; /* Already a valid address in the environment? If so, keep it */ - if (getenv("ethaddr")) + if (env_get("ethaddr")) return 0; node = fdt_path_offset(nvtboot_blob, "/chosen"); @@ -49,7 +49,7 @@ static int set_ethaddr_from_nvtboot(void) return -ENOENT; } - ret = setenv("ethaddr", (void *)prop); + ret = env_set("ethaddr", (void *)prop); if (ret) { printf("Failed to set ethaddr from nvtboot DTB: %d\n", ret); return ret; diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 4bfa10b374..b9a2cbe148 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -37,7 +37,7 @@ static int uniphier_set_fdt_file(void) char dtb_name[256]; int buf_len = sizeof(dtb_name); - if (getenv("fdt_file")) + if (env_get("fdt_file")) return 0; /* do nothing if it is already set */ compat = fdt_stringlist_get(gd->fdt_blob, 0, "compatible", 0, NULL); @@ -55,7 +55,7 @@ static int uniphier_set_fdt_file(void) strncat(dtb_name, ".dtb", buf_len); - return setenv("fdt_file", dtb_name); + return env_set("fdt_file", dtb_name); } int board_late_init(void) @@ -65,20 +65,20 @@ int board_late_init(void) switch (uniphier_boot_device_raw()) { case BOOT_DEVICE_MMC1: printf("eMMC Boot"); - setenv("bootmode", "emmcboot"); + env_set("bootmode", "emmcboot"); break; case BOOT_DEVICE_NAND: printf("NAND Boot"); - setenv("bootmode", "nandboot"); + env_set("bootmode", "nandboot"); nand_denali_wp_disable(); break; case BOOT_DEVICE_NOR: printf("NOR Boot"); - setenv("bootmode", "norboot"); + env_set("bootmode", "norboot"); break; case BOOT_DEVICE_USB: printf("USB Boot"); - setenv("bootmode", "usbboot"); + env_set("bootmode", "usbboot"); break; default: printf("Unknown"); diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c index 8c45229a89..acc859a6c3 100644 --- a/arch/arm/mach-uniphier/mmc-first-dev.c +++ b/arch/arm/mach-uniphier/mmc-first-dev.c @@ -35,7 +35,7 @@ static int do_mmcsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (dev < 0) return CMD_RET_FAILURE; - setenv_ulong("mmc_first_dev", dev); + env_set_ulong("mmc_first_dev", dev); return CMD_RET_SUCCESS; } diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 88e7d6a7b6..26509b73c6 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -10,7 +10,6 @@ config MCF520x config MCF52x2 bool - imply ENV_IS_IN_FLASH config MCF523x bool @@ -23,7 +22,6 @@ config MCF5301x config MCF532x bool - imply ENV_IS_IN_FLASH config MCF537x bool @@ -39,7 +37,6 @@ config MCF5227x config MCF547x_8x bool - imply ENV_IS_IN_FLASH # processor type config M5208 @@ -73,7 +70,6 @@ config M5275 config M5282 bool select MCF52x2 - imply ENV_IS_IN_FLASH config M5307 bool @@ -111,12 +107,10 @@ config M52277 config M547x bool select MCF547x_8x - imply ENV_IS_IN_FLASH config M548x bool select MCF547x_8x - imply ENV_IS_IN_FLASH choice prompt "Target select" @@ -197,12 +191,10 @@ config TARGET_M54455EVB config TARGET_M5475EVB bool "Support M5475EVB" select M547x - imply ENV_IS_IN_FLASH config TARGET_M5485EVB bool "Support M5485EVB" select M548x - imply ENV_IS_IN_FLASH config TARGET_AMCORE bool "Support AMCORE" diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index fa9c493081..c976904fa9 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -113,7 +113,8 @@ static void set_clocks_in_mhz (bd_t *kbd) { char *s; - if ((s = getenv("clocks_in_mhz")) != NULL) { + s = env_get("clocks_in_mhz"); + if (s) { /* convert all clock information to MHz */ kbd->bi_intfreq /= 1000000L; kbd->bi_busfreq /= 1000000L; diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 2732203b93..0a286e82c2 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -27,7 +27,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], { /* First parameter is mapped to $r5 for kernel boot args */ void (*thekernel) (char *, ulong, ulong); - char *commandline = getenv("bootargs"); + char *commandline = env_get("bootargs"); ulong rd_data_start, rd_data_end; /* diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b53206bf8e..d07b92d1b4 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -21,7 +21,6 @@ config TARGET_QEMU_MIPS select SUPPORTS_CPU_MIPS64_R1 select SUPPORTS_CPU_MIPS64_R2 select ROM_EXCEPTION_VECTORS - imply ENV_IS_IN_FLASH config TARGET_MALTA bool "Support malta" @@ -43,7 +42,6 @@ config TARGET_MALTA select SWAP_IO_SPACE select MIPS_L1_CACHE_SHIFT_6 select ROM_EXCEPTION_VECTORS - imply ENV_IS_IN_FLASH config TARGET_VCT bool "Support vct" @@ -85,7 +83,6 @@ config ARCH_BMIPS select CPU select RAM select SYSRESET - imply ENV_IS_NOWHERE config MACH_PIC32 bool "Support Microchip PIC32" @@ -110,7 +107,6 @@ config TARGET_BOSTON select SUPPORTS_CPU_MIPS64_R2 select SUPPORTS_CPU_MIPS64_R6 select ROM_EXCEPTION_VECTORS - imply ENV_IS_IN_FLASH config TARGET_XILFPGA bool "Support Imagination Xilfpga" @@ -200,7 +196,6 @@ config CPU_MIPS64_R2 bool "MIPS64 Release 2" depends on SUPPORTS_CPU_MIPS64_R2 select 64BIT - imply ENV_IS_IN_FLASH help Choose this option to build a kernel for release 2 through 5 of the MIPS64 architecture. diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 2b6790524c..5a9a2811ff 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -80,7 +80,7 @@ static void linux_cmdline_legacy(bootm_headers_t *images) linux_cmdline_init(); - bootargs = getenv("bootargs"); + bootargs = env_get("bootargs"); if (!bootargs) return; @@ -202,11 +202,11 @@ static void linux_env_legacy(bootm_headers_t *images) sprintf(env_buf, "0x%X", (uint) (gd->bd->bi_flashsize)); linux_env_set("flash_size", env_buf); - cp = getenv("ethaddr"); + cp = env_get("ethaddr"); if (cp) linux_env_set("ethaddr", cp); - cp = getenv("eth1addr"); + cp = env_get("eth1addr"); if (cp) linux_env_set("eth1addr", cp); diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index 21aadf284f..e834329e0b 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -50,7 +50,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) void (*theKernel)(int zero, int arch, uint params); #ifdef CONFIG_CMDLINE_TAG - char *commandline = getenv("bootargs"); + char *commandline = env_get("bootargs"); #endif /* @@ -64,7 +64,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) theKernel = (void (*)(int, int, uint))images->ep; - s = getenv("machid"); + s = env_get("machid"); if (s) { machid = simple_strtoul(s, NULL, 16); printf("Using machid 0x%x from environment\n", machid); diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index 4e5c269193..00ade2c573 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -12,7 +12,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { void (*kernel)(int, int, int, char *) = (void *)images->ep; - char *commandline = getenv("bootargs"); + char *commandline = env_get("bootargs"); ulong initrd_start = images->rd_start; ulong initrd_end = images->rd_end; char *of_flat_tree = NULL; diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 7ac5cbfca6..e4b3043fa2 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -28,7 +28,6 @@ config MPC86xx bool "MPC86xx" select SYS_FSL_DDR select SYS_FSL_DDR_BE - imply ENV_IS_IN_FLASH imply CMD_REGINFO config 8xx diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig index c66d6616a4..a3779734c1 100644 --- a/arch/powerpc/cpu/mpc83xx/Kconfig +++ b/arch/powerpc/cpu/mpc83xx/Kconfig @@ -13,7 +13,6 @@ config TARGET_MPC8308_P1M config TARGET_SBC8349 bool "Support sbc8349" - imply ENV_IS_IN_FLASH config TARGET_VE8313 bool "Support ve8313" @@ -40,7 +39,6 @@ config TARGET_MPC8323ERDB config TARGET_MPC832XEMDS bool "Support MPC832XEMDS" select BOARD_EARLY_INIT_F - imply ENV_IS_IN_FLASH config TARGET_MPC8349EMDS bool "Support MPC8349EMDS" @@ -52,7 +50,6 @@ config TARGET_MPC8349EMDS config TARGET_MPC8349ITX bool "Support MPC8349ITX" imply CMD_IRQ - imply ENV_IS_IN_FLASH config TARGET_MPC837XEMDS bool "Support MPC837XEMDS" @@ -77,13 +74,11 @@ config TARGET_SUVD3 bool "Support suvd3" imply CMD_CRAMFS imply FS_CRAMFS - imply ENV_IS_IN_FLASH config TARGET_TUXX1 bool "Support tuxx1" imply CMD_CRAMFS imply FS_CRAMFS - imply ENV_IS_IN_FLASH config TARGET_TQM834X bool "Support TQM834x" @@ -95,7 +90,6 @@ config TARGET_HRCON config TARGET_STRIDER bool "Support strider" select SYS_FSL_ERRATUM_ESDHC111 - imply ENV_IS_IN_FLASH imply CMD_PCA953X endchoice diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index ccdf103624..92187d371b 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -19,7 +19,6 @@ choice config TARGET_SBC8548 bool "Support sbc8548" select ARCH_MPC8548 - imply ENV_IS_IN_FLASH config TARGET_SOCRATES bool "Support socrates" @@ -105,7 +104,6 @@ config TARGET_MPC8544DS config TARGET_MPC8548CDS bool "Support MPC8548CDS" select ARCH_MPC8548 - imply ENV_IS_IN_FLASH config TARGET_MPC8555CDS bool "Support MPC8555CDS" @@ -565,7 +563,6 @@ config ARCH_MPC8548 select SYS_FSL_SEC_BE select SYS_FSL_SEC_COMPAT_2 select SYS_PPC_E500_USE_DEBUG_TLB - imply ENV_IS_IN_FLASH imply CMD_REGINFO config ARCH_MPC8555 @@ -616,7 +613,6 @@ config ARCH_MPC8572 select SYS_PPC_E500_USE_DEBUG_TLB select FSL_ELBC imply CMD_NAND - imply ENV_IS_IN_FLASH config ARCH_P1010 bool diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index a3076d8d71..ea46e49853 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -256,7 +256,7 @@ static void enable_tdm_law(void) * is not setup properly yet. Search for tdm entry in * hwconfig. */ - ret = getenv_f("hwconfig", buffer, sizeof(buffer)); + ret = env_get_f("hwconfig", buffer, sizeof(buffer)); if (ret > 0) { tdm_hwconfig_enabled = hwconfig_f("tdm", buffer); /* If tdm is defined in hwconfig, set law for tdm workaround */ @@ -280,7 +280,7 @@ void enable_cpc(void) cpc_corenet_t *cpc = (cpc_corenet_t *)CONFIG_SYS_FSL_CPC_ADDR; /* Extract hwconfig from environment */ - ret = getenv_f("hwconfig", buffer, sizeof(buffer)); + ret = env_get_f("hwconfig", buffer, sizeof(buffer)); if (ret > 0) { /* * If "en_cpc" is not defined in hwconfig then by default all @@ -754,7 +754,7 @@ int cpu_init_r(void) char *buf = NULL; int n, res; - n = getenv_f("hwconfig", buffer, sizeof(buffer)); + n = env_get_f("hwconfig", buffer, sizeof(buffer)); if (n > 0) buf = buffer; @@ -794,7 +794,7 @@ int cpu_init_r(void) #endif #if defined(CONFIG_PPC_SPINTABLE_COMPATIBLE) && defined(CONFIG_MP) - spin = getenv("spin_table_compat"); + spin = env_get("spin_table_compat"); if (spin && (*spin == 'n')) spin_table_compat = 0; else @@ -845,7 +845,7 @@ int cpu_init_r(void) #ifdef CONFIG_SYS_SRIO srio_init(); #ifdef CONFIG_SRIO_PCIE_BOOT_MASTER - char *s = getenv("bootmaster"); + char *s = env_get("bootmaster"); if (s) { if (!strcmp(s, "SRIO1")) { srio_boot_master(1); diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index caa0bf9bdc..297dc4af48 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -92,7 +92,7 @@ void ft_fixup_cpu(void *blob, u64 memory_limit) * Extract hwconfig from environment. * Search for tdm entry in hwconfig. */ - ret = getenv_f("hwconfig", buffer, sizeof(buffer)); + ret = env_get_f("hwconfig", buffer, sizeof(buffer)); if (ret > 0) tdm_hwconfig_enabled = hwconfig_f("tdm", buffer); @@ -580,7 +580,7 @@ static void fdt_fixup_l2_switch(void *blob) return; /* Get MAC address for the l2switch from "l2switchaddr"*/ - if (!eth_getenv_enetaddr("l2switchaddr", l2swaddr)) { + if (!eth_env_get_enetaddr("l2switchaddr", l2swaddr)) { printf("Warning: MAC address for l2switch not found\n"); memset(l2swaddr, 0, sizeof(l2swaddr)); } diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index 1bc0c64cfc..79d6544a09 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -514,7 +514,7 @@ void fsl_serdes_init(void) * Extract hwconfig from environment since we have not properly setup * the environment but need it for ddr config params */ - if (getenv_f("hwconfig", buffer, sizeof(buffer)) > 0) + if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0) buf = buffer; #endif if (serdes_prtcl_map & (1 << NONE)) diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 0addf8493c..2ea9f5c7be 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -31,7 +31,7 @@ u32 get_my_id() int hold_cores_in_reset(int verbose) { /* Default to no, overridden by 'y', 'yes', 'Y', 'Yes', or '1' */ - if (getenv_yesno("mp_holdoff") == 1) { + if (env_get_yesno("mp_holdoff") == 1) { if (verbose) { puts("Secondary cores are being held in reset.\n"); puts("See 'mp_holdoff' environment variable\n"); diff --git a/arch/powerpc/cpu/mpc86xx/Kconfig b/arch/powerpc/cpu/mpc86xx/Kconfig index fe56efdf55..2cc180da38 100644 --- a/arch/powerpc/cpu/mpc86xx/Kconfig +++ b/arch/powerpc/cpu/mpc86xx/Kconfig @@ -40,7 +40,6 @@ config ARCH_MPC8641 select FSL_LAW select SYS_FSL_HAS_DDR1 select SYS_FSL_HAS_DDR2 - imply ENV_IS_IN_FLASH config FSL_LAW bool diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 0e204027af..b9ae24dc98 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -86,7 +86,7 @@ static void boot_jump_linux(bootm_headers_t *images) debug (" Booting using OF flat tree...\n"); WATCHDOG_RESET (); (*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC, - getenv_bootm_mapsize(), 0, 0); + env_get_bootm_mapsize(), 0, 0); /* does not return */ } else #endif @@ -121,8 +121,8 @@ void arch_lmb_reserve(struct lmb *lmb) phys_size_t bootm_size; ulong size, sp, bootmap_base; - bootmap_base = getenv_bootm_low(); - bootm_size = getenv_bootm_size(); + bootmap_base = env_get_bootm_low(); + bootm_size = env_get_bootm_size(); #ifdef DEBUG if (((u64)bootmap_base + bootm_size) > @@ -275,7 +275,8 @@ static void set_clocks_in_mhz (bd_t *kbd) { char *s; - if ((s = getenv ("clocks_in_mhz")) != NULL) { + s = env_get("clocks_in_mhz"); + if (s) { /* convert all clock information to MHz */ kbd->bi_intfreq /= 1000000L; kbd->bi_busfreq /= 1000000L; @@ -339,6 +340,6 @@ void boot_jump_vxworks(bootm_headers_t *images) ((void (*)(void *, ulong, ulong, ulong, ulong, ulong, ulong))images->ep)(images->ft_addr, - 0, 0, EPAPR_MAGIC, getenv_bootm_mapsize(), 0, 0); + 0, 0, EPAPR_MAGIC, env_get_bootm_mapsize(), 0, 0); } #endif diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index fa32df02fc..d20761e66c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -3,16 +3,13 @@ menu "SuperH architecture" config CPU_SH2 bool - imply ENV_IS_IN_FLASH config CPU_SH2A bool select CPU_SH2 - imply ENV_IS_IN_FLASH config CPU_SH3 bool - imply ENV_IS_IN_FLASH config CPU_SH4 bool diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds index bbf9ff485f..7fc91bc4aa 100644 --- a/arch/sh/cpu/u-boot.lds +++ b/arch/sh/cpu/u-boot.lds @@ -33,9 +33,9 @@ SECTIONS KEEP(CONFIG_BOARDDIR/lowlevel_init.o (.text .spiboot1.text)) KEEP(*(.spiboot2.text)) . = ALIGN(8192); - common/env_embedded.o (.ppcenv) + env/embedded.o (.ppcenv) . = ALIGN(8192); - common/env_embedded.o (.ppcenvr) + env/embedded.o (.ppcenvr) . = ALIGN(8192); *(.text) . = ALIGN(4); diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c index 8a0010be23..09fbd5e5df 100644 --- a/arch/sh/lib/bootm.c +++ b/arch/sh/lib/bootm.c @@ -61,7 +61,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima char *cmdline = (char *)param + COMMAND_LINE; /* PAGE_SIZE */ unsigned long size = images->ep - (unsigned long)param; - char *bootargs = getenv("bootargs"); + char *bootargs = env_get("bootargs"); /* * allow the PREP bootm subcommand, it is required for bootm to work diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c index 3fea5f5b53..cd4abba10a 100644 --- a/arch/sh/lib/zimageboot.c +++ b/arch/sh/lib/zimageboot.c @@ -42,7 +42,7 @@ int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* Linux kernel command line */ cmdline = (char *)param + COMMAND_LINE; - bootargs = getenv("bootargs"); + bootargs = env_get("bootargs"); /* Clear zero page */ /* cppcheck-suppress nullPointer */ diff --git a/arch/x86/cpu/baytrail/Kconfig b/arch/x86/cpu/baytrail/Kconfig index 9374c121f9..75dbbc27f1 100644 --- a/arch/x86/cpu/baytrail/Kconfig +++ b/arch/x86/cpu/baytrail/Kconfig @@ -10,7 +10,6 @@ config INTEL_BAYTRAIL select ARCH_MISC_INIT if !EFI imply HAVE_INTEL_ME if !EFI imply ENABLE_MRC_CACHE - imply ENV_IS_IN_SPI_FLASH imply AHCI_PCI imply ICH_SPI imply INTEL_ICH6_GPIO diff --git a/arch/x86/cpu/broadwell/Kconfig b/arch/x86/cpu/broadwell/Kconfig index b421f18202..bc2dba2bd7 100644 --- a/arch/x86/cpu/broadwell/Kconfig +++ b/arch/x86/cpu/broadwell/Kconfig @@ -9,7 +9,6 @@ config INTEL_BROADWELL select ARCH_EARLY_INIT_R imply HAVE_INTEL_ME imply ENABLE_MRC_CACHE - imply ENV_IS_IN_SPI_FLASH imply AHCI_PCI imply ICH_SPI imply INTEL_BROADWELL_GPIO diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig index d4e0587fc5..60eb45f9d0 100644 --- a/arch/x86/cpu/coreboot/Kconfig +++ b/arch/x86/cpu/coreboot/Kconfig @@ -3,7 +3,6 @@ if TARGET_COREBOOT config SYS_COREBOOT bool default y - imply ENV_IS_NOWHERE imply AHCI_PCI imply E1000 imply ICH_SPI diff --git a/arch/x86/cpu/ivybridge/Kconfig b/arch/x86/cpu/ivybridge/Kconfig index 00f99d6b11..c214ea0efe 100644 --- a/arch/x86/cpu/ivybridge/Kconfig +++ b/arch/x86/cpu/ivybridge/Kconfig @@ -10,7 +10,6 @@ config NORTHBRIDGE_INTEL_IVYBRIDGE select CACHE_MRC_BIN if HAVE_MRC imply HAVE_INTEL_ME imply ENABLE_MRC_CACHE - imply ENV_IS_IN_SPI_FLASH imply AHCI_PCI imply ICH_SPI imply INTEL_ICH6_GPIO diff --git a/arch/x86/cpu/qemu/Kconfig b/arch/x86/cpu/qemu/Kconfig index fdf5ae338e..da378128fe 100644 --- a/arch/x86/cpu/qemu/Kconfig +++ b/arch/x86/cpu/qemu/Kconfig @@ -7,7 +7,6 @@ config QEMU bool select ARCH_EARLY_INIT_R - imply ENV_IS_NOWHERE imply AHCI_PCI imply E1000 imply SYS_NS16550 diff --git a/arch/x86/cpu/quark/Kconfig b/arch/x86/cpu/quark/Kconfig index 7ec46e95ef..0ed724813d 100644 --- a/arch/x86/cpu/quark/Kconfig +++ b/arch/x86/cpu/quark/Kconfig @@ -10,7 +10,6 @@ config INTEL_QUARK select ARCH_EARLY_INIT_R select ARCH_MISC_INIT imply ENABLE_MRC_CACHE - imply ENV_IS_IN_SPI_FLASH imply ETH_DESIGNWARE imply ICH_SPI imply INTEL_ICH6_GPIO diff --git a/arch/x86/cpu/queensbay/Kconfig b/arch/x86/cpu/queensbay/Kconfig index d1b04c952a..835de85268 100644 --- a/arch/x86/cpu/queensbay/Kconfig +++ b/arch/x86/cpu/queensbay/Kconfig @@ -9,7 +9,6 @@ config INTEL_QUEENSBAY select HAVE_FSP select HAVE_CMC select ARCH_EARLY_INIT_R - imply ENV_IS_IN_SPI_FLASH imply AHCI_PCI imply ICH_SPI imply INTEL_ICH6_GPIO diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index aafbeb01f9..00172dc7c1 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -48,15 +48,15 @@ static void build_command_line(char *command_line, int auto_boot) command_line[0] = '\0'; - env_command_line = getenv("bootargs"); + env_command_line = env_get("bootargs"); /* set console= argument if we use a serial console */ if (!strstr(env_command_line, "console=")) { - if (!strcmp(getenv("stdout"), "serial")) { + if (!strcmp(env_get("stdout"), "serial")) { /* We seem to use serial console */ sprintf(command_line, "console=ttyS0,%s ", - getenv("baudrate")); + env_get("baudrate")); } } @@ -285,7 +285,7 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) /* argv[1] holds the address of the bzImage */ s = argv[1]; } else { - s = getenv("fileaddr"); + s = env_get("fileaddr"); } if (s) diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index 1604bb9536..16961acba5 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -136,7 +136,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) { struct bp_tag *params, *params_start; ulong initrd_start, initrd_end; - char *commandline = getenv("bootargs"); + char *commandline = env_get("bootargs"); if (!(flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO))) return 0; |