diff options
| author | Tom Rini <[email protected]> | 2024-05-18 20:20:43 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-05-19 08:16:36 -0600 |
| commit | d678a59d2d719da9e807495b4b021501f2836ca5 (patch) | |
| tree | 313e5c32e3d02d3cf1904875b1655140973126e9 /board/phytec | |
| parent | 3be9f399e911cfc437a37ac826441f1d96da1c9b (diff) | |
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'board/phytec')
| -rw-r--r-- | board/phytec/common/Makefile | 2 | ||||
| -rw-r--r-- | board/phytec/common/imx8m_som_detection.c | 1 | ||||
| -rw-r--r-- | board/phytec/common/k3/Makefile | 2 | ||||
| -rw-r--r-- | board/phytec/common/k3/board.c | 73 | ||||
| -rw-r--r-- | board/phytec/common/phytec_som_detection.c | 1 | ||||
| -rw-r--r-- | board/phytec/pcl063/spl.c | 2 | ||||
| -rw-r--r-- | board/phytec/pcm052/pcm052.c | 1 | ||||
| -rw-r--r-- | board/phytec/pcm058/pcm058.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_am335x_r2/board.c | 2 | ||||
| -rw-r--r-- | board/phytec/phycore_am335x_r2/mux.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_am62x/phycore-am62x.c | 67 | ||||
| -rw-r--r-- | board/phytec/phycore_imx8mm/phycore-imx8mm.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_imx8mm/spl.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_imx8mp/phycore-imx8mp.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_imx8mp/spl.c | 1 | ||||
| -rw-r--r-- | board/phytec/phycore_rk3288/phycore-rk3288.c | 2 |
16 files changed, 80 insertions, 79 deletions
diff --git a/board/phytec/common/Makefile b/board/phytec/common/Makefile index c34fc503059..3feb00fd1ec 100644 --- a/board/phytec/common/Makefile +++ b/board/phytec/common/Makefile @@ -5,8 +5,6 @@ ifdef CONFIG_SPL_BUILD # necessary to create built-in.o obj- := __dummy__.o -else -obj-$(CONFIG_ARCH_K3) += k3/ endif obj-y += phytec_som_detection.o diff --git a/board/phytec/common/imx8m_som_detection.c b/board/phytec/common/imx8m_som_detection.c index bfd60ffb777..ee34a5b9579 100644 --- a/board/phytec/common/imx8m_som_detection.c +++ b/board/phytec/common/imx8m_som_detection.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <asm/arch/sys_proto.h> #include <dm/device.h> #include <dm/uclass.h> diff --git a/board/phytec/common/k3/Makefile b/board/phytec/common/k3/Makefile deleted file mode 100644 index bcca1a9f846..00000000000 --- a/board/phytec/common/k3/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -obj-y += board.o diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c deleted file mode 100644 index 9cb168c36cb..00000000000 --- a/board/phytec/common/k3/board.c +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (C) 2024 PHYTEC Messtechnik GmbH - * Author: Wadim Egorov <[email protected]> - */ - -#include <env_internal.h> -#include <spl.h> -#include <asm/arch/hardware.h> - -#if IS_ENABLED(CONFIG_ENV_IS_IN_FAT) || IS_ENABLED(CONFIG_ENV_IS_IN_MMC) -int mmc_get_env_dev(void) -{ - u32 boot_device = get_boot_device(); - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - return 0; - case BOOT_DEVICE_MMC2: - return 1; - }; - - return CONFIG_SYS_MMC_ENV_DEV; -} -#endif - -enum env_location env_get_location(enum env_operation op, int prio) -{ - u32 boot_device = get_boot_device(); - - if (prio) - return ENVL_UNKNOWN; - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - case BOOT_DEVICE_MMC2: - if (CONFIG_IS_ENABLED(ENV_IS_IN_FAT)) - return ENVL_FAT; - if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) - return ENVL_MMC; - case BOOT_DEVICE_SPI: - if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) - return ENVL_SPI_FLASH; - default: - return ENVL_NOWHERE; - }; -} - -#if IS_ENABLED(CONFIG_BOARD_LATE_INIT) -int board_late_init(void) -{ - u32 boot_device = get_boot_device(); - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - env_set_ulong("mmcdev", 0); - env_set("boot", "mmc"); - break; - case BOOT_DEVICE_MMC2: - env_set_ulong("mmcdev", 1); - env_set("boot", "mmc"); - break; - case BOOT_DEVICE_SPI: - env_set("boot", "spi"); - break; - case BOOT_DEVICE_ETHERNET: - env_set("boot", "net"); - break; - }; - - return 0; -} -#endif diff --git a/board/phytec/common/phytec_som_detection.c b/board/phytec/common/phytec_som_detection.c index b14bb3dbb7f..78c173df20d 100644 --- a/board/phytec/common/phytec_som_detection.c +++ b/board/phytec/common/phytec_som_detection.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <dm/device.h> #include <dm/uclass.h> #include <i2c.h> diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c index b98c46dbcbd..b6d459fdfce 100644 --- a/board/phytec/pcl063/spl.c +++ b/board/phytec/pcl063/spl.c @@ -6,7 +6,7 @@ * Copyright (C) 2015-2016 Stefan Roese <[email protected]> */ -#include <config.h> +#include <common.h> #include <init.h> #include <spl.h> #include <asm/arch/clock.h> diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index 20f2aac332d..0f7235979b0 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -6,6 +6,7 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ +#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index ecc5b75d8d4..b37c6fe218d 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -9,6 +9,7 @@ * Both NAND and eMMC cannot be set because they share the * same pins (SD4) */ +#include <common.h> #include <init.h> #include <net.h> #include <asm/arch/crm_regs.h> diff --git a/board/phytec/phycore_am335x_r2/board.c b/board/phytec/phycore_am335x_r2/board.c index 2022525651d..5700effbd3f 100644 --- a/board/phytec/phycore_am335x_r2/board.c +++ b/board/phytec/phycore_am335x_r2/board.c @@ -10,7 +10,7 @@ * Copyright (C) 2019 DENX Software Engineering GmbH */ -#include <config.h> +#include <common.h> #include <init.h> #include <spl.h> #include <asm/arch/cpu.h> diff --git a/board/phytec/phycore_am335x_r2/mux.c b/board/phytec/phycore_am335x_r2/mux.c index bb1c48da0fe..7091c985ba1 100644 --- a/board/phytec/phycore_am335x_r2/mux.c +++ b/board/phytec/phycore_am335x_r2/mux.c @@ -6,6 +6,7 @@ * Copyright (C) 2019 DENX Software Engineering GmbH */ +#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/phytec/phycore_am62x/phycore-am62x.c b/board/phytec/phycore_am62x/phycore-am62x.c index a082b886bda..618b4c370d1 100644 --- a/board/phytec/phycore_am62x/phycore-am62x.c +++ b/board/phytec/phycore_am62x/phycore-am62x.c @@ -5,8 +5,11 @@ */ #include <asm/io.h> +#include <env.h> +#include <env_internal.h> #include <spl.h> #include <fdt_support.h> +#include <asm/arch/hardware.h> DECLARE_GLOBAL_DATA_PTR; @@ -54,3 +57,67 @@ void spl_board_init(void) MCU_CTRL_DEVICE_CLKOUT_32K_CTRL); } #endif + +#if IS_ENABLED(CONFIG_ENV_IS_IN_FAT) || IS_ENABLED(CONFIG_ENV_IS_IN_MMC) +int mmc_get_env_dev(void) +{ + u32 boot_device = get_boot_device(); + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + return 0; + case BOOT_DEVICE_MMC2: + return 1; + }; + + return CONFIG_SYS_MMC_ENV_DEV; +} +#endif + +enum env_location env_get_location(enum env_operation op, int prio) +{ + u32 boot_device = get_boot_device(); + + if (prio) + return ENVL_UNKNOWN; + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + case BOOT_DEVICE_MMC2: + if (CONFIG_IS_ENABLED(ENV_IS_IN_FAT)) + return ENVL_FAT; + if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) + return ENVL_MMC; + case BOOT_DEVICE_SPI: + if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + return ENVL_SPI_FLASH; + default: + return ENVL_NOWHERE; + }; +} + +#if IS_ENABLED(CONFIG_BOARD_LATE_INIT) +int board_late_init(void) +{ + u32 boot_device = get_boot_device(); + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + env_set_ulong("mmcdev", 0); + env_set("boot", "mmc"); + break; + case BOOT_DEVICE_MMC2: + env_set_ulong("mmcdev", 1); + env_set("boot", "mmc"); + break; + case BOOT_DEVICE_SPI: + env_set("boot", "spi"); + break; + case BOOT_DEVICE_ETHERNET: + env_set("boot", "net"); + break; + }; + + return 0; +} +#endif diff --git a/board/phytec/phycore_imx8mm/phycore-imx8mm.c b/board/phytec/phycore_imx8mm/phycore-imx8mm.c index 06cffbca3a6..ef647291690 100644 --- a/board/phytec/phycore_imx8mm/phycore-imx8mm.c +++ b/board/phytec/phycore_imx8mm/phycore-imx8mm.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/phytec/phycore_imx8mm/spl.c b/board/phytec/phycore_imx8mm/spl.c index 8d858590a39..690a51f7a72 100644 --- a/board/phytec/phycore_imx8mm/spl.c +++ b/board/phytec/phycore_imx8mm/spl.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/ddr.h> #include <asm/arch/imx8mm_pins.h> diff --git a/board/phytec/phycore_imx8mp/phycore-imx8mp.c b/board/phytec/phycore_imx8mp/phycore-imx8mp.c index 35683591433..dbdd6bb7937 100644 --- a/board/phytec/phycore_imx8mp/phycore-imx8mp.c +++ b/board/phytec/phycore_imx8mp/phycore-imx8mp.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c index 352f803e454..df158024654 100644 --- a/board/phytec/phycore_imx8mp/spl.c +++ b/board/phytec/phycore_imx8mp/spl.c @@ -4,6 +4,7 @@ * Author: Teresa Remmet <[email protected]> */ +#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/ddr.h> #include <asm/arch/imx8mp_pins.h> diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index a970634b4c3..3f49f39e3d5 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -4,11 +4,13 @@ * Author: Wadim Egorov <[email protected]> */ +#include <eeprom.h> #include <init.h> #include <log.h> #include <net.h> #include <asm/global_data.h> #include <asm/io.h> +#include <common.h> #include <dm.h> #include <env.h> #include <env_internal.h> |
