From aa4d33d056429be5fe66b4f8d78daec532244194 Mon Sep 17 00:00:00 2001 From: John Linn Date: Wed, 5 Dec 2012 12:17:46 -0800 Subject: [PATCH] spi: zynq_qspi: Remove command merge feature The command merge feature has been de-featured such that the driver should not be using it. It works fine without it but there may be a minor performance degrade. The command merge feature was in bit 26 of the linear configuration register before it was removed. Magic values are also removed for clarity. Signed-off-by: John Linn Acked-by: Michal Simek --- drivers/spi/zynq_qspi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 642241d0fc2..9146ee92985 100755 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -168,6 +168,19 @@ typedef enum irqreturn irqreturn_t; */ #define XQSPIPSS_ENABLE_ENABLE_MASK 0x00000001 /* QSPI Enable Bit Mask */ +/* + * QSPI Linear Configuration Register + * + * It is named Linear Configuration but it controls other modes when not in + * linear mode also. + */ +#define XQSPIPS_LCFG_TWO_MEM_MASK 0x40000000 /* QSPI Enable Bit Mask */ +#define XQSPIPS_LCFG_SEP_BUS_MASK 0x20000000 /* QSPI Enable Bit Mask */ + +#define XQSPIPS_LCFG_DUMMY_SHIFT 8 + +#define XQSPIPS_FAST_READ_QOUT_CODE 0x6B /* read instruction code */ + /* * The modebits configurable by the driver to make the SPI support different * data formats @@ -363,7 +376,10 @@ void xqspips_init_hw(void __iomem *regs_base, unsigned int is_dual) if (is_dual == 1) /* Enable two memories on seperate buses */ xqspips_write(regs_base + XQSPIPSS_LINEAR_CFG_OFFSET, - 0x6400016B); + (XQSPIPS_LCFG_TWO_MEM_MASK | + XQSPIPS_LCFG_SEP_BUS_MASK | + (1 << XQSPIPS_LCFG_DUMMY_SHIFT) | + XQSPIPS_FAST_READ_QOUT_CODE)); xqspips_write(regs_base + XQSPIPSS_ENABLE_OFFSET, XQSPIPSS_ENABLE_ENABLE_MASK); -- 2.47.3