[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH arm-devs v4 09/15] xilinx_spips: lqspi: Dont touch c
From: |
peter . crosthwaite |
Subject: |
[Qemu-devel] [PATCH arm-devs v4 09/15] xilinx_spips: lqspi: Dont touch config register |
Date: |
Tue, 21 May 2013 16:35:08 +1000 |
From: Peter Crosthwaite <address@hidden>
The LQSPI mode is supposed to work via the automatic CS mode feature
rather than manipulate CS lines itself. Now that auto CS is implemented
remove LQSPIs CS mode override logic. There is still a need to
manipulate the U_PAGE bit in LQSPI config register to implement
dual-stack mode however.
Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
---
This patch in new as of v2
hw/ssi/xilinx_spips.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c
index 631d010..ea8a593 100644
--- a/hw/ssi/xilinx_spips.c
+++ b/hw/ssi/xilinx_spips.c
@@ -511,16 +511,16 @@ lqspi_read(void *opaque, hwaddr addr, unsigned int size)
int flash_addr = (addr / num_effective_busses(s));
int slave = flash_addr >> LQSPI_ADDRESS_BITS;
int cache_entry = 0;
+ uint32_t u_page_save = s->regs[R_LQSPI_STS] & ~LQSPI_CFG_U_PAGE;
+
+ s->regs[R_LQSPI_STS] &= ~LQSPI_CFG_U_PAGE;
+ s->regs[R_LQSPI_STS] |= slave ? LQSPI_CFG_U_PAGE : 0;
DB_PRINT("config reg status: %08x\n", s->regs[R_LQSPI_CFG]);
fifo8_reset(&s->tx_fifo);
fifo8_reset(&s->rx_fifo);
- s->regs[R_CONFIG] &= ~CS;
- s->regs[R_CONFIG] |= ((~(1 << slave) << CS_SHIFT) & CS) | MANUAL_CS;
- xilinx_spips_update_cs_lines(s);
-
/* instruction */
DB_PRINT("pushing read instruction: %02x\n",
(uint8_t)(s->regs[R_LQSPI_CFG] & LQSPI_CFG_INST_CODE));
@@ -554,9 +554,9 @@ lqspi_read(void *opaque, hwaddr addr, unsigned int size)
rx_data_bytes(s, &q->lqspi_buf[cache_entry], 4);
cache_entry++;
}
- xilinx_spips_update_cs_lines(s);
- s->regs[R_CONFIG] |= CS;
+ s->regs[R_LQSPI_STS] &= ~LQSPI_CFG_U_PAGE;
+ s->regs[R_LQSPI_STS] |= u_page_save;
xilinx_spips_update_cs_lines(s);
q->lqspi_cached_addr = addr;
--
1.8.3.rc1.44.gb387c77.dirty
- [Qemu-devel] [PATCH arm-devs v4 00/15] Xilinx SPIPS fixes round 2, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 01/15] xilinx_spips: seperate SPI and QSPI as two classes, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 02/15] xilinx_spips: Make interrupts clear on read, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 03/15] xilinx_spips: Inhibit interrupts in LQSPI mode, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 04/15] xilinx_spips: Add verbose LQSPI debug output, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 05/15] xilinx_spips: Fix QSPI FIFO size, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 06/15] xilinx_spips: Trash LQ page cache on mode change, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 07/15] xilinx_spips: Add automatic start support, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 09/15] xilinx_spips: lqspi: Dont touch config register,
peter . crosthwaite <=
- [Qemu-devel] [PATCH arm-devs v4 10/15] xilinx_spips: Fix CTRL register RW bits, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 11/15] xilinx_spips: Fix striping behaviour, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 12/15] xilinx_spips: Debug msgs for Snoop state, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 13/15] xilinx_spips: Multiple debug verbosity levels, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 14/15] xilinx_spips: lqspi: Push more data to tx-fifo, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 15/15] xilinx_spips: lqspi: Fix byte/misaligned access, peter . crosthwaite, 2013/05/21
- [Qemu-devel] [PATCH arm-devs v4 08/15] xilinx_spips: Implement automatic CS, peter . crosthwaite, 2013/05/21
- Re: [Qemu-devel] [PATCH arm-devs v4 00/15] Xilinx SPIPS fixes round 2, Peter Maydell, 2013/05/24