Patchwork [v1,2/5] xilinx_spips: Fix bus setup conditional check

login
register
mail settings
Submitter Peter Crosthwaite
Date Feb. 20, 2013, 7:26 a.m.
Message ID <e2c23bf584cdc98e39542db938a655110bbea585.1361344859.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/221974/
State New
Headers show

Comments

Peter Crosthwaite - Feb. 20, 2013, 7:26 a.m.
From: Nathan Rossi <nathan.rossi@xilinx.com>

The R_LQPSI_CFG register has the LQSPI_CFG_SEP_BUS and LQSPI_CFG_TWO_MEM bits.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/xilinx_spips.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c
index 3eee828..03797c3 100644
--- a/hw/xilinx_spips.c
+++ b/hw/xilinx_spips.c
@@ -143,8 +143,8 @@  typedef struct {
 
 static inline int num_effective_busses(XilinxSPIPS *s)
 {
-    return (s->regs[R_LQSPI_STS] & LQSPI_CFG_SEP_BUS &&
-            s->regs[R_LQSPI_STS] & LQSPI_CFG_TWO_MEM) ? s->num_busses : 1;
+    return (s->regs[R_LQSPI_CFG] & LQSPI_CFG_SEP_BUS &&
+            s->regs[R_LQSPI_CFG] & LQSPI_CFG_TWO_MEM) ? s->num_busses : 1;
 }
 
 static void xilinx_spips_update_cs_lines(XilinxSPIPS *s)