From d2f763162aa86e97ae65390b8a85e34ebb0d71bb Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Wed, 11 Mar 2015 14:52:42 +0530 Subject: sf: Correct the macros as per new array fast read command Correct the macros as per insertion of array fast read command CMD_READ_ARRAY_FAST in spi_read_cmds_array in file sf_probe.c Signed-off-by: Siva Durga Prasad Paladugu Reviewed-by: Jagannadha Sutradharudu Teki --- include/spi.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/spi.h b/include/spi.h index c58e4535596..78290633a18 100644 --- a/include/spi.h +++ b/include/spi.h @@ -38,11 +38,12 @@ /* SPI RX operation modes */ #define SPI_OPM_RX_AS (1 << 0) -#define SPI_OPM_RX_DOUT (1 << 1) -#define SPI_OPM_RX_DIO (1 << 2) -#define SPI_OPM_RX_QOF (1 << 3) -#define SPI_OPM_RX_QIOF (1 << 4) -#define SPI_OPM_RX_EXTN (SPI_OPM_RX_AS | SPI_OPM_RX_DOUT | \ +#define SPI_OPM_RX_AF (1 << 1) +#define SPI_OPM_RX_DOUT (1 << 2) +#define SPI_OPM_RX_DIO (1 << 3) +#define SPI_OPM_RX_QOF (1 << 4) +#define SPI_OPM_RX_QIOF (1 << 5) +#define SPI_OPM_RX_EXTN (SPI_OPM_RX_AS | SPI_OPM_RX_AF | SPI_OPM_RX_DOUT | \ SPI_OPM_RX_DIO | SPI_OPM_RX_QOF | \ SPI_OPM_RX_QIOF) -- cgit v1.2.3 From d15e74f16cc521da0e08060cda2c87307bd4363f Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Tue, 21 Apr 2015 10:37:45 +0200 Subject: spi flash: fix trivial problems Fix typos and too big #ifdef. Signed-off-by: Pavel Machek Reviewed-by: Marek Vasut Reviewed-by: Jagannadha Sutradharudu Teki --- include/spi_flash.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/spi_flash.h b/include/spi_flash.h index 218283fc987..4791b94281c 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -62,11 +62,9 @@ struct spi_slave; * return 0 - Success, 1 - Failure */ struct spi_flash { -#ifdef CONFIG_DM_SPI_FLASH struct spi_slave *spi; +#ifdef CONFIG_DM_SPI_FLASH struct udevice *dev; -#else - struct spi_slave *spi; #endif const char *name; u8 dual_flash; @@ -91,13 +89,13 @@ struct spi_flash { #ifndef CONFIG_DM_SPI_FLASH /* * These are not strictly needed for driver model, but keep them here - * whilt the transition is in progress. + * while the transition is in progress. * * Normally each driver would provide its own operations, but for * SPI flash most chips use the same algorithms. One approach is * to create a 'common' SPI flash device which knows how to talk * to most devices, and then allow other drivers to be used instead - * if requird, perhaps with a way of scanning through the list to + * if required, perhaps with a way of scanning through the list to * find the driver that matches the device. */ int (*read)(struct spi_flash *flash, u32 offset, size_t len, void *buf); -- cgit v1.2.3 From 9694b724421b88acf7d553a55e4a43fa4e25e7be Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Apr 2015 09:05:40 -0600 Subject: dm: spi: Correct SPI claim/release_bus() methods These methods should be passed a slave device, not a bus. This matches the old SPI interface. It is important to know which device is claiming the bus so passing a bus is not that useful. Reported-by: Haikun Wang Signed-off-by: Simon Glass Tested-by: Peng Fan Reviewed-by: Jagannadha Sutradharudu Teki --- include/spi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/spi.h b/include/spi.h index 78290633a18..9495ca53c9b 100644 --- a/include/spi.h +++ b/include/spi.h @@ -386,12 +386,12 @@ struct dm_spi_ops { * allowed to claim the same bus for several slaves without releasing * the bus in between. * - * @bus: The SPI slave + * @dev: The SPI slave * * Returns: 0 if the bus was claimed successfully, or a negative value * if it wasn't. */ - int (*claim_bus)(struct udevice *bus); + int (*claim_bus)(struct udevice *dev); /** * Release the SPI bus @@ -400,9 +400,9 @@ struct dm_spi_ops { * all transfers have finished. It may disable any SPI hardware as * appropriate. * - * @bus: The SPI slave + * @dev: The SPI slave */ - int (*release_bus)(struct udevice *bus); + int (*release_bus)(struct udevice *dev); /** * Set the word length for SPI transactions @@ -414,7 +414,7 @@ struct dm_spi_ops { * * Returns: 0 on success, -ve on failure. */ - int (*set_wordlen)(struct udevice *bus, unsigned int wordlen); + int (*set_wordlen)(struct udevice *dev, unsigned int wordlen); /** * SPI transfer -- cgit v1.2.3 From be7be78e10bfca6fc2d5e8fbc71da2db6a55c842 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Tue, 28 Apr 2015 13:29:54 +0530 Subject: dm: sf: Save flash flags to struct spi_flash Add a new member 'flags' in struct spi_flash to store the flash flags during spi_flash_validate_params(). Signed-off-by: Bin Meng Reviewed-by: Jagannadha Sutradharudu Teki --- include/spi_flash.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/spi_flash.h b/include/spi_flash.h index 4791b94281c..f2814ef41a0 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -65,6 +65,7 @@ struct spi_flash { struct spi_slave *spi; #ifdef CONFIG_DM_SPI_FLASH struct udevice *dev; + u16 flags; #endif const char *name; u8 dual_flash; -- cgit v1.2.3