board: tqma6: use common TQ baseboard

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>
This commit is contained in:
Paul Gerber 2026-03-23 14:47:37 +01:00 committed by Fabio Estevam
parent b162ec2a08
commit c7626d61a5
5 changed files with 23 additions and 81 deletions

View 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

View 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;
}

View File

@ -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

View 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) */

View 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) */