summaryrefslogtreecommitdiff
path: root/board/tqc/tqma6
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-02-27 15:20:35 +0100
committerTom Rini <trini@konsulko.com>2019-03-25 17:35:52 -0400
commit9309aad084bba4cb86f61d4108c4e6152ef6cf7d (patch)
tree34c5b2696a584e7025d648198b7df182c6ab71cb /board/tqc/tqma6
parentac31d0d87365efe7724afd75253af1ab54159656 (diff)
tqma6s_wru4_mmc: manage board_spi_cs_gpio correctly
Define the function board_spi_cs_gpio only when needed, only called in drivers/spi/mxc_spi.c. That avoid compilation issue for tqma6s_wru4_mmc_defconfig when CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS are not defined (CMD_SF not defined) after migration in KConfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'board/tqc/tqma6')
-rw-r--r--board/tqc/tqma6/tqma6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 816672edc6..372a17cd51 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -155,11 +155,13 @@ __weak void tqma6_iomuxc_spi(void)
ARRAY_SIZE(tqma6_ecspi1_pads));
}
+#if defined(CONFIG_SF_DEFAULT_BUS) && defined(CONFIG_SF_DEFAULT_CS)
int board_spi_cs_gpio(unsigned bus, unsigned cs)
{
return ((bus == CONFIG_SF_DEFAULT_BUS) &&
(cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
}
+#endif
static struct i2c_pads_info tqma6_i2c3_pads = {
/* I2C3: on board LM75, M24C64, */