summaryrefslogtreecommitdiffstats
path: root/board/tqc
diff options
context:
space:
mode:
authorMarkus Niebel <Markus.Niebel@tq-group.com>2014-10-23 15:47:05 +0200
committerStefano Babic <sbabic@denx.de>2014-10-30 10:43:12 +0100
commit1719d49c347f2faee387aacbf643d171461820a9 (patch)
tree66d79e079f92cc7b10cdb0019ea37907b513e0e0 /board/tqc
parentca9d817ab54077d5b8a814a7af9c8342a0641051 (diff)
downloadu-boot-1719d49c347f2faee387aacbf643d171461820a9.tar.gz
u-boot-1719d49c347f2faee387aacbf643d171461820a9.tar.xz
u-boot-1719d49c347f2faee387aacbf643d171461820a9.zip
tqma6: fix sf detection
Commit 155fa9af95ac5be857a7327e7a968a296e60d4c8 changed the way to define a GPIO line, which can be used to force CS high across multiple transactions. In order to fix sf detection change board code to make use of board_spi_cs_gpio(..). Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Diffstat (limited to 'board/tqc')
-rw-r--r--board/tqc/tqma6/tqma6.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index b552bb8d7e..fd1bd59c6c 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -138,8 +138,10 @@ static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = {
NEW_PAD_CTRL(MX6_PAD_EIM_D18__ECSPI1_MOSI, SPI_PAD_CTRL),
};
+#define TQMA6_SF_CS_GPIO IMX_GPIO_NR(3, 19)
+
static unsigned const tqma6_ecspi1_cs[] = {
- IMX_GPIO_NR(3, 19),
+ TQMA6_SF_CS_GPIO,
};
static void tqma6_iomuxc_spi(void)
@@ -152,6 +154,12 @@ static void tqma6_iomuxc_spi(void)
ARRAY_SIZE(tqma6_ecspi1_pads));
}
+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;
+}
+
static struct i2c_pads_info tqma6_i2c3_pads = {
/* I2C3: on board LM75, M24C64, */
.scl = {