From: Chao Fu <[email protected]>

Add spi device info for vf610-twr board.
Enable fsl-spi-interface for compatibility of fsl-dspi and fsl-qspi.

Signed-off-by: Chao Fu <[email protected]>
---
 board/freescale/vf610twr/vf610twr.c | 24 ++++++++++++++++++++++++
 include/configs/vf610twr.h          |  2 ++
 2 files changed, 26 insertions(+)

diff --git a/board/freescale/vf610twr/vf610twr.c 
b/board/freescale/vf610twr/vf610twr.c
index 54a9f2c..356fcdc 100644
--- a/board/freescale/vf610twr/vf610twr.c
+++ b/board/freescale/vf610twr/vf610twr.c
@@ -402,6 +402,30 @@ int board_phy_config(struct phy_device *phydev)
        return 0;
 }
 
+int board_spi_find_bus(unsigned int bus, unsigned int cs)
+{
+       switch(bus) {
+               case SPI_BUS_FSL_QSPI0:
+                       break;
+               default:
+                       return -1;
+       }
+
+       switch(bus) {
+               case SPI_BUS_FSL_QSPI0:
+                       if(cs == 0)
+                               return 0;
+               default:
+                       return -1;
+       }
+}
+
+void board_print_spi_device(void)
+{
+       printf("VF610-TWR spi flash info:\n");
+       printf("S25FL128S is on spi bus 0 cs 0\n");
+}
+
 int board_early_init_f(void)
 {
        clock_init();
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 0342550..05e2dcc 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -68,6 +68,8 @@
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_MICREL
 
+#define CONFIG_FSL_SPI_INTERFACE
+
 /* QSPI Configs*/
 #define CONFIG_FSL_QSPI
 
-- 
1.8.4

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to