mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 23:11:32 +02:00
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>
This commit is contained in:
committed by
Tom Rini
parent
ac31d0d873
commit
9309aad084
@@ -155,11 +155,13 @@ __weak void tqma6_iomuxc_spi(void)
|
|||||||
ARRAY_SIZE(tqma6_ecspi1_pads));
|
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)
|
int board_spi_cs_gpio(unsigned bus, unsigned cs)
|
||||||
{
|
{
|
||||||
return ((bus == CONFIG_SF_DEFAULT_BUS) &&
|
return ((bus == CONFIG_SF_DEFAULT_BUS) &&
|
||||||
(cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
|
(cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct i2c_pads_info tqma6_i2c3_pads = {
|
static struct i2c_pads_info tqma6_i2c3_pads = {
|
||||||
/* I2C3: on board LM75, M24C64, */
|
/* I2C3: on board LM75, M24C64, */
|
||||||
|
Reference in New Issue
Block a user