[PATCH v2 07/10] board: tqma6: use common TQ baseboard
Max Merchel
Max.Merchel at ew.tq-group.com
Mon Mar 23 14:47:37 CET 2026
From: Paul Gerber <Paul.Gerber at ew.tq-group.com>
Update functions to use the common baseboard header and
select TQ_COMMON_BB Kconfig option for MBa6 and WRU4.
While at it, remove empty implementations that are now covered by
board/tq/common.
Signed-off-by: Paul Gerber <Paul.Gerber at ew.tq-group.com>
Signed-off-by: Max Merchel <Max.Merchel at ew.tq-group.com>
---
board/tq/tqma6/Kconfig | 4 ++++
board/tq/tqma6/tqma6.c | 17 +++++++++--------
board/tq/tqma6/tqma6_bb.h | 28 ----------------------------
board/tq/tqma6/tqma6_mba6.c | 26 +++-----------------------
board/tq/tqma6/tqma6_wru4.c | 29 +++++++----------------------
5 files changed, 23 insertions(+), 81 deletions(-)
delete mode 100644 board/tq/tqma6/tqma6_bb.h
diff --git a/board/tq/tqma6/Kconfig b/board/tq/tqma6/Kconfig
index 9cb0c909aa9..1ef9f6732aa 100644
--- a/board/tq/tqma6/Kconfig
+++ b/board/tq/tqma6/Kconfig
@@ -72,6 +72,7 @@ choice
config MBA6
bool "TQMa6 on MBa6 Starterkit"
+ select TQ_COMMON_BB
select USB
select CMD_USB
select USB_STORAGE
@@ -92,6 +93,7 @@ config MBA6
config WRU4
bool "OHB WRU-IV"
+ select TQ_COMMON_BB
help
Select the
OHB Systems AG WRU-IV baseboard.
@@ -107,4 +109,6 @@ config IMX_CONFIG
default "board/tq/tqma6/tqma6dl.cfg" if TQMA6DL
default "board/tq/tqma6/tqma6s.cfg" if TQMA6S
+source "board/tq/common/Kconfig"
+
endif
diff --git a/board/tq/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c
index 75d36240a1e..a3a0a11c42b 100644
--- a/board/tq/tqma6/tqma6.c
+++ b/board/tq/tqma6/tqma6.c
@@ -26,7 +26,7 @@
#include <power/pfuze100_pmic.h>
#include <power/pmic.h>
-#include "tqma6_bb.h"
+#include "../common/tq_bb.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -41,7 +41,7 @@ static const uint16_t tqma6_emmc_dsr = 0x0100;
int board_early_init_f(void)
{
- return tqma6_bb_board_early_init_f();
+ return tq_bb_board_early_init_f();
}
int board_init(void)
@@ -49,7 +49,7 @@ int board_init(void)
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
- tqma6_bb_board_init();
+ tq_bb_board_init();
return 0;
}
@@ -96,11 +96,12 @@ int board_late_init(void)
{
env_set("board_name", tqma6_get_boardname());
- tqma6_bb_board_late_init();
+ tq_bb_board_late_init();
printf("Board: %s on a %s\n", tqma6_get_boardname(),
- tqma6_bb_get_boardname());
- return 0;
+ tq_bb_get_boardname());
+
+ return tq_bb_checkboard();
}
/*
@@ -113,14 +114,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
char modelstr[MODELSTRLEN];
snprintf(modelstr, MODELSTRLEN, "TQ %s on %s", tqma6_get_boardname(),
- tqma6_bb_get_boardname());
+ tq_bb_get_boardname());
do_fixup_by_path_string(blob, "/", "model", modelstr);
fdt_fixup_memory(blob, (u64)PHYS_SDRAM, (u64)gd->ram_size);
/* bring in eMMC dsr settings */
do_fixup_by_path_u32(blob,
"/soc/aips-bus at 02100000/usdhc at 02198000",
"dsr", tqma6_emmc_dsr, 2);
- tqma6_bb_ft_board_setup(blob, bd);
+ tq_bb_ft_board_setup(blob, bd);
return 0;
}
diff --git a/board/tq/tqma6/tqma6_bb.h b/board/tq/tqma6/tqma6_bb.h
deleted file mode 100644
index e17e6ad3f57..00000000000
--- a/board/tq/tqma6/tqma6_bb.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (c) 2013-2014 TQ-Systems GmbH <u-boot at ew.tq-group.com>,
- * D-82229 Seefeld, Germany.
- * Author: Markus Niebel
- */
-
-#ifndef __TQMA6_BB__
-#define __TQMA6_BB__
-
-int tqma6_bb_board_mmc_getwp(struct mmc *mmc);
-int tqma6_bb_board_mmc_getcd(struct mmc *mmc);
-int tqma6_bb_board_mmc_init(struct bd_info *bis);
-
-int tqma6_bb_board_early_init_f(void);
-int tqma6_bb_board_init(void);
-int tqma6_bb_board_late_init(void);
-int tqma6_bb_checkboard(void);
-
-const char *tqma6_bb_get_boardname(void);
-/*
- * Device Tree Support
- */
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-void tqma6_bb_ft_board_setup(void *blob, struct bd_info *bd);
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
-
-#endif
diff --git a/board/tq/tqma6/tqma6_mba6.c b/board/tq/tqma6/tqma6_mba6.c
index 46989102fec..d604d6d4f0a 100644
--- a/board/tq/tqma6/tqma6_mba6.c
+++ b/board/tq/tqma6/tqma6_mba6.c
@@ -31,7 +31,7 @@
#include <mmc.h>
#include <netdev.h>
-#include "tqma6_bb.h"
+#include "../common/tq_bb.h"
#if defined(CONFIG_TQMA6Q)
@@ -126,34 +126,14 @@ int board_phy_config(struct phy_device *phydev)
return 0;
}
-int tqma6_bb_board_early_init_f(void)
-{
- return 0;
-}
-
-int tqma6_bb_board_init(void)
+int tq_bb_board_init(void)
{
mba6_setup_iomuxc_enet();
return 0;
}
-int tqma6_bb_board_late_init(void)
-{
- return 0;
-}
-
-const char *tqma6_bb_get_boardname(void)
+const char *tq_bb_get_boardname(void)
{
return "MBa6x";
}
-
-/*
- * Device Tree Support
- */
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-void tqma6_bb_ft_board_setup(void *blob, struct bd_info *bd)
-{
- /* TBD */
-}
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
diff --git a/board/tq/tqma6/tqma6_wru4.c b/board/tq/tqma6/tqma6_wru4.c
index 7acefc7b064..a7dc8fca109 100644
--- a/board/tq/tqma6/tqma6_wru4.c
+++ b/board/tq/tqma6/tqma6_wru4.c
@@ -33,7 +33,7 @@
#include <mmc.h>
#include <netdev.h>
-#include "tqma6_bb.h"
+#include "../common/tq_bb.h"
/* UART */
#define UART4_PAD_CTRL ( \
@@ -95,7 +95,7 @@ static struct fsl_esdhc_cfg usdhc2_cfg = {
.max_bus_width = 4,
};
-int tqma6_bb_board_mmc_getcd(struct mmc *mmc)
+int tq_bb_board_mmc_getcd(struct mmc *mmc)
{
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
int ret = 0;
@@ -106,7 +106,7 @@ int tqma6_bb_board_mmc_getcd(struct mmc *mmc)
return ret;
}
-int tqma6_bb_board_mmc_getwp(struct mmc *mmc)
+int tq_bb_board_mmc_getwp(struct mmc *mmc)
{
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
int ret = 0;
@@ -117,7 +117,7 @@ int tqma6_bb_board_mmc_getwp(struct mmc *mmc)
return ret;
}
-int tqma6_bb_board_mmc_init(struct bd_info *bis)
+int tq_bb_board_mmc_init(struct bd_info *bis)
{
int ret;
@@ -256,14 +256,14 @@ static void gpio_init(void)
gpio_direction_output(GPIO_UART3_PWRON, 0);
}
-int tqma6_bb_board_early_init_f(void)
+int tq_bb_board_early_init_f(void)
{
setup_iomuxc_uart4();
return 0;
}
-int tqma6_bb_board_init(void)
+int tq_bb_board_init(void)
{
setup_iomuxc_enet();
@@ -279,12 +279,7 @@ int tqma6_bb_board_init(void)
return 0;
}
-int tqma6_bb_board_late_init(void)
-{
- return 0;
-}
-
-const char *tqma6_bb_get_boardname(void)
+const char *tq_bb_get_boardname(void)
{
return "WRU-IV";
}
@@ -331,13 +326,3 @@ int board_ehci_power(int port, int on)
return 0;
}
-
-/*
- * Device Tree Support
- */
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-void tqma6_bb_ft_board_setup(void *blob, struct bd_info *bd)
-{
- /* TBD */
-}
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
--
2.43.0
More information about the U-Boot
mailing list