Changeset 592 for trunk/modules/vci_spi
- Timestamp:
- Dec 5, 2013, 5:15:26 PM (11 years ago)
- Location:
- trunk/modules/vci_spi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_spi/caba/source/src/vci_spi.cpp
r579 r592 161 161 if (s_dma_bsy) 162 162 data |= SPI_CTRL_DMA_BSY; 163 if (r_dma_error) 164 data |= SPI_CTRL_DMA_ERR; 163 165 data |= (uint32_t)r_ctrl_char_len.read(); 164 166 r_rdata = data; … … 256 258 r_spi_clk_ignore = r_ctrl_cpha; 257 259 r_spi_bit_count = r_ctrl_char_len; 258 r_spi_out = (r_txrx[(r_ctrl_char_len -1)/ 64] >> ((r_ctrl_char_len - 1) % 64)) & (uint64_t)0x0000000000000001ULL;259 260 if (r_dma_count != 0) { 260 261 if (r_read.read()) … … 264 265 } else if (r_spi_bsy.read() && !r_spi_done.read()) { 265 266 r_spi_fsm = S_XMIT; 267 r_spi_out = (r_txrx[(r_ctrl_char_len -1)/ 64] >> ((r_ctrl_char_len - 1) % 64)) & (uint64_t)0x0000000000000001ULL; 266 268 } 267 269 break; … … 294 296 case S_DMA_SEND: 295 297 r_spi_out = 1; 296 r_txrx[0] = 0xffffffff;297 298 r_spi_clk_counter = r_divider.read(); 298 299 r_spi_clk = 0; … … 305 306 (typename vci_param::data_t)r_txrx[0]); 306 307 r_spi_word_count = r_spi_word_count - 1; 308 r_txrx[0] = 0xffffffff; 307 309 if ( r_spi_word_count == 0 ) { 308 310 r_spi_fsm = S_DMA_SEND_END; -
trunk/modules/vci_spi/include/soclib/vcispi.h
r579 r592 41 41 }; 42 42 43 #define SPI_CTRL_DMA_ERR (1 << 17) /* R DMA error */ 43 44 #define SPI_CTRL_DMA_BSY (1 << 16) /* R DMA in progress */ 44 45 #define SPI_CTRL_CPOL (1 << 15) /* R/W Clock polarity */
Note: See TracChangeset
for help on using the changeset viewer.