summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/sf_internal.h
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>2014-12-12 19:36:11 +0530
committerSimon Glass <sjg@chromium.org>2014-12-13 15:08:04 -0700
commit6dd6e90e13acc4014634d78fc469e7e82eefc255 (patch)
tree183eb7d1375c584563ad99d54b2a95a79afc5611 /drivers/mtd/spi/sf_internal.h
parentf46f3f356f684a20d1ccb50c943536591a7697f3 (diff)
downloadu-boot-imx-6dd6e90e13acc4014634d78fc469e7e82eefc255.zip
u-boot-imx-6dd6e90e13acc4014634d78fc469e7e82eefc255.tar.gz
u-boot-imx-6dd6e90e13acc4014634d78fc469e7e82eefc255.tar.bz2
sf: Fix look for the fastest read command
Few of the spi controllers are only supports array slow read which is quite different behaviour compared to others. So this fix on sf will correctly handle the slow read supported controllers. Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/mtd/spi/sf_internal.h')
-rw-r--r--drivers/mtd/spi/sf_internal.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 5b7670c..e159f04 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -23,13 +23,16 @@ enum spi_dual_flash {
/* Enum list - Full read commands */
enum spi_read_cmds {
ARRAY_SLOW = 1 << 0,
- DUAL_OUTPUT_FAST = 1 << 1,
- DUAL_IO_FAST = 1 << 2,
- QUAD_OUTPUT_FAST = 1 << 3,
- QUAD_IO_FAST = 1 << 4,
+ ARRAY_FAST = 1 << 1,
+ DUAL_OUTPUT_FAST = 1 << 2,
+ DUAL_IO_FAST = 1 << 3,
+ QUAD_OUTPUT_FAST = 1 << 4,
+ QUAD_IO_FAST = 1 << 5,
};
-#define RD_EXTN (ARRAY_SLOW | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
+/* Normal - Extended - Full command set */
+#define RD_NORM (ARRAY_SLOW | ARRAY_FAST)
+#define RD_EXTN (RD_NORM | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
#define RD_FULL (RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
/* sf param flags */