|
|
|
@ -49,7 +49,7 @@ constexpr int SPI_ADDR_1_SHIFT = 8; |
|
|
|
|
constexpr int SPI_ADDR_0_MASK = 0x0000FF; |
|
|
|
|
|
|
|
|
|
constexpr int CMD_ADDRESS_SIZE = 4; |
|
|
|
|
constexpr int MAX_DMA_XFER_SIZE = 0x4000; |
|
|
|
|
constexpr int MAX_DMA_XFER_SIZE = 0x400; |
|
|
|
|
|
|
|
|
|
constexpr size_t MEM_ALIGNED_ALLOC = 32; // number of bytes to align DMA buffer to
|
|
|
|
|
|
|
|
|
@ -247,8 +247,9 @@ size_t BASpiMemory::m_bytesToXfer(size_t address, size_t numBytes) |
|
|
|
|
{ |
|
|
|
|
// Check if this burst will cross the die boundary
|
|
|
|
|
size_t bytesToXfer = numBytes; |
|
|
|
|
if (bytesToXfer > MAX_DMA_XFER_SIZE) { bytesToXfer = MAX_DMA_XFER_SIZE; } |
|
|
|
|
if (m_dieBoundary) { |
|
|
|
|
if ((address < m_dieBoundary) && (address+numBytes > m_dieBoundary)) { |
|
|
|
|
if ((address < m_dieBoundary) && (address+bytesToXfer > m_dieBoundary)) { |
|
|
|
|
// split into two xfers
|
|
|
|
|
bytesToXfer = m_dieBoundary-address; |
|
|
|
|
} |
|
|
|
|