]> git.sur5r.net Git - u-boot/commitdiff
arm, imx, spi: detect spi flash again on aristainetos board
authorHeiko Schocher <hs@denx.de>
Thu, 30 Oct 2014 12:14:03 +0000 (13:14 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 3 Nov 2014 10:21:50 +0000 (11:21 +0100)
155fa9af95a "spi: mxc: fix sf probe when using mxc_spi" break
spi flash detection on the aristainetos board. Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
board/aristainetos/aristainetos.c
include/configs/aristainetos.h

index 3bfcf5b0da1d98b9b831fbc8bc755472da47ffcc..06922c0020601636f6d40a37a789c691a6ce596e 100644 (file)
@@ -230,6 +230,12 @@ static iomux_v3_cfg_t const backlight_pads[] = {
        MX6_PAD_GPIO_2__GPIO1_IO02 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
+int board_spi_cs_gpio(unsigned bus, unsigned cs)
+{
+       return (bus == CONFIG_SF_DEFAULT_BUS && cs == CONFIG_SF_DEFAULT_CS)
+               ? (IMX_GPIO_NR(3, 20)) : -1;
+}
+
 static void setup_spi(void)
 {
        int i;
index 20aea8572de12e985906d3a5fa4f729b731c4a27..e6a08df4ba7de13082e4df476120b3743a5a6a51 100644 (file)
@@ -77,7 +77,7 @@
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_MXC_SPI
 #define CONFIG_SF_DEFAULT_BUS          3
-#define CONFIG_SF_DEFAULT_CS           (0|(IMX_GPIO_NR(3, 20)<<8))
+#define CONFIG_SF_DEFAULT_CS           0
 #define CONFIG_SF_DEFAULT_SPEED                20000000
 #define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
 #define CONFIG_SYS_SPI_ST_ENABLE_WP_PIN