public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
@ 2015-08-04 17:28 Clemens Gruber
  2015-08-05  5:19 ` Stefan Roese
  0 siblings, 1 reply; 9+ messages in thread
From: Clemens Gruber @ 2015-08-04 17:28 UTC (permalink / raw)
  To: u-boot

This allows baseboards without SPI to compile.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Tom Rini <trini@konsulko.com>
---
 board/tqc/tqma6/tqma6.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 29db838..5c4d104 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -131,6 +131,8 @@ int board_mmc_init(bd_t *bis)
 	return 0;
 }
 
+#if defined(CONFIG_MXC_SPI)
+
 static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = {
 	/* SS1 */
 	NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL),
@@ -161,6 +163,8 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
 		(cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
 }
 
+#endif /* defined(CONFIG_MXC_SPI) */
+
 static struct i2c_pads_info tqma6_i2c3_pads = {
 	/* I2C3: on board LM75, M24C64,  */
 	.scl = {
@@ -201,7 +205,9 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+#if defined(CONFIG_MXC_SPI)
 	tqma6_iomuxc_spi();
+#endif
 	tqma6_setup_i2c();
 
 	tqma6_bb_board_init();
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-05  8:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 17:28 [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config Clemens Gruber
2015-08-05  5:19 ` Stefan Roese
2015-08-05  7:28   ` Clemens Gruber
2015-08-05  8:05     ` Stefan Roese
2015-08-05  8:16       ` Jagan Teki
2015-08-05  8:33         ` Clemens Gruber
2015-08-05  8:37           ` Stefan Roese
2015-08-05  8:17       ` Clemens Gruber
2015-08-05  8:36         ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox