From: Chao Fu Date: Tue, 1 Jul 2014 17:18:07 +0800 Subject: [U-Boot] [PATCH RFC 3/3] arm:vf610-twr:Add fsl-spi-interface config and board info In-Reply-To: <1404206287-9629-1-git-send-email-b44548@freescale.com> References: <1404206287-9629-1-git-send-email-b44548@freescale.com> Message-ID: <1404206287-9629-3-git-send-email-b44548@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Chao Fu 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 --- 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