diff mbox series

[6/7] board: tqc: tqma6: hw init code disabled for device model

Message ID 20200409132142.26491-7-michael.krummsdorf@ew.tq-group.com
State Accepted
Commit b7c1447910c63b128d129ba6251ef0cefd693b6e
Headers show
Series TQMa6x: upgrade board support to device model | expand

Commit Message

Michael Krummsdorf April 9, 2020, 1:21 p.m. UTC
Keep code for non-dm configuration of baseboard WRU4.
It cannot be upgraded to device model as
we have no suitable device tree for it.
These changes were not run-tested on WRU4,
only compile-tested.

Signed-off-by: Michael Krummsdorf <michael.krummsdorf at ew.tq-group.com>
---
 board/tqc/tqma6/tqma6.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Stefano Babic April 18, 2020, 10:51 a.m. UTC | #1
> Keep code for non-dm configuration of baseboard WRU4.
> It cannot be upgraded to device model as
> we have no suitable device tree for it.
> These changes were not run-tested on WRU4,
> only compile-tested.
> Signed-off-by: Michael Krummsdorf <michael.krummsdorf at ew.tq-group.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index c8ddc2c1f8..675341abdd 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -60,6 +60,7 @@  int dram_init(void)
 
 static const uint16_t tqma6_emmc_dsr = 0x0100;
 
+#ifndef CONFIG_DM_MMC
 /* eMMC on USDHCI3 always present */
 static iomux_v3_cfg_t const tqma6_usdhc3_pads[] = {
 	NEW_PAD_CTRL(MX6_PAD_SD3_CLK__SD3_CLK,		USDHC_PAD_CTRL),
@@ -132,7 +133,9 @@  int board_mmc_init(bd_t *bis)
 
 	return 0;
 }
+#endif
 
+#ifndef CONFIG_DM_SPI
 static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = {
 	/* SS1 */
 	NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL),
@@ -164,7 +167,9 @@  int board_spi_cs_gpio(unsigned bus, unsigned cs)
 		(cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
 }
 #endif
+#endif
 
+#ifdef CONFIG_SYS_I2C
 static struct i2c_pads_info tqma6_i2c3_pads = {
 	/* I2C3: on board LM75, M24C64,  */
 	.scl = {
@@ -194,6 +199,7 @@  static void tqma6_setup_i2c(void)
 	if (ret)
 		printf("setup I2C3 failed: %d\n", ret);
 }
+#endif
 
 int board_early_init_f(void)
 {
@@ -205,8 +211,12 @@  int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+#ifndef CONFIG_DM_SPI
 	tqma6_iomuxc_spi();
+#endif
+#ifdef CONFIG_SYS_I2C
 	tqma6_setup_i2c();
+#endif
 
 	tqma6_bb_board_init();
 
@@ -235,6 +245,7 @@  static const char *tqma6_get_boardname(void)
 	};
 }
 
+#ifdef CONFIG_POWER
 /* setup board specific PMIC */
 int power_init_board(void)
 {
@@ -251,6 +262,7 @@  int power_init_board(void)
 
 	return 0;
 }
+#endif
 
 int board_late_init(void)
 {