]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: tqma6: use common TQ baseboard
authorPaul Gerber <Paul.Gerber@ew.tq-group.com>
Mon, 23 Mar 2026 13:47:37 +0000 (14:47 +0100)
committerFabio Estevam <festevam@nabladev.com>
Thu, 2 Apr 2026 12:05:46 +0000 (09:05 -0300)
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@ew.tq-group.com>
Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
board/tq/tqma6/Kconfig
board/tq/tqma6/tqma6.c
board/tq/tqma6/tqma6_bb.h [deleted file]
board/tq/tqma6/tqma6_mba6.c
board/tq/tqma6/tqma6_wru4.c

index 9cb0c909aa9adfada6ff234fb8a202915c517097..1ef9f6732aa6d333dff1ae7b36b908c85d8815eb 100644 (file)
@@ -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
index 75d36240a1e62bbab80de44d463f0e0d88180673..a3a0a11c42b332caffd53d2a0bcd14018a93c6f7 100644 (file)
@@ -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@02100000/usdhc@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 (file)
index e17e6ad..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (c) 2013-2014 TQ-Systems GmbH <u-boot@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
index 46989102fec953c74a35166fd4a3d716f07d7858..d604d6d4f0add96b05b7f67697726d0075afba07 100644 (file)
@@ -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) */
index 7acefc7b064beb5444506a80f1ba709b99ac5e55..a7dc8fca109be2af1650d2bd6524055418fa3c9b 100644 (file)
@@ -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) */