aboutsummaryrefslogtreecommitdiff
path: root/board/phytec
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-05-20 10:16:33 -0600
committerTom Rini <trini@konsulko.com>2024-05-20 10:16:33 -0600
commitd4781422d1268aa6deca3e49d2fb227e79c160b4 (patch)
tree420073c8a29a401a3908803000df6f54673e1731 /board/phytec
parent85854bc3324edd0c81047780ee60033d056fd490 (diff)
parenta7f0154c412859323396111dd0c09dbafbc153cb (diff)
downloadu-boot-d4781422d1268aa6deca3e49d2fb227e79c160b4.zip
u-boot-d4781422d1268aa6deca3e49d2fb227e79c160b4.tar.gz
u-boot-d4781422d1268aa6deca3e49d2fb227e79c160b4.tar.bz2
Merge tag 'v2024.07-rc3' into next
Prepare v2024.07-rc3
Diffstat (limited to 'board/phytec')
-rw-r--r--board/phytec/common/Makefile2
-rw-r--r--board/phytec/common/imx8m_som_detection.c1
-rw-r--r--board/phytec/common/k3/Makefile2
-rw-r--r--board/phytec/common/k3/board.c73
-rw-r--r--board/phytec/common/phytec_som_detection.c1
-rw-r--r--board/phytec/pcl063/spl.c2
-rw-r--r--board/phytec/pcm052/pcm052.c1
-rw-r--r--board/phytec/pcm058/pcm058.c1
-rw-r--r--board/phytec/phycore_am335x_r2/board.c2
-rw-r--r--board/phytec/phycore_am335x_r2/mux.c1
-rw-r--r--board/phytec/phycore_am62x/phycore-am62x.c67
-rw-r--r--board/phytec/phycore_imx8mm/phycore-imx8mm.c1
-rw-r--r--board/phytec/phycore_imx8mm/spl.c1
-rw-r--r--board/phytec/phycore_imx8mp/phycore-imx8mp.c1
-rw-r--r--board/phytec/phycore_imx8mp/spl.c1
-rw-r--r--board/phytec/phycore_rk3288/phycore-rk3288.c2
16 files changed, 80 insertions, 79 deletions
diff --git a/board/phytec/common/Makefile b/board/phytec/common/Makefile
index c34fc50..3feb00f 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 bfd60ff..ee34a5b 100644
--- a/board/phytec/common/imx8m_som_detection.c
+++ b/board/phytec/common/imx8m_som_detection.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 bcca1a9..0000000
--- 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 9cb168c..0000000
--- 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 <w.egorov@phytec.de>
- */
-
-#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 b14bb3d..78c173d 100644
--- a/board/phytec/common/phytec_som_detection.c
+++ b/board/phytec/common/phytec_som_detection.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 b98c46d..b6d459f 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -6,7 +6,7 @@
* Copyright (C) 2015-2016 Stefan Roese <sr@denx.de>
*/
-#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 20f2aac..0f72359 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 ecc5b75..b37c6fe 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 2022525..5700eff 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 bb1c48d..7091c98 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 a082b88..618b4c3 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 06cffbc..ef64729 100644
--- a/board/phytec/phycore_imx8mm/phycore-imx8mm.c
+++ b/board/phytec/phycore_imx8mm/phycore-imx8mm.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 8d85859..690a51f 100644
--- a/board/phytec/phycore_imx8mm/spl.c
+++ b/board/phytec/phycore_imx8mm/spl.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 3568359..dbdd6bb 100644
--- a/board/phytec/phycore_imx8mp/phycore-imx8mp.c
+++ b/board/phytec/phycore_imx8mp/phycore-imx8mp.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 352f803..df15802 100644
--- a/board/phytec/phycore_imx8mp/spl.c
+++ b/board/phytec/phycore_imx8mp/spl.c
@@ -4,6 +4,7 @@
* Author: Teresa Remmet <t.remmet@phytec.de>
*/
+#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 a970634..3f49f39 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -4,11 +4,13 @@
* Author: Wadim Egorov <w.egorov@phytec.de>
*/
+#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>