SAMA5: Fix a bug in SAMA5 HSMCI. The bitfield mask and shift values were reversed resulting in a trashed value for the number of blocks in the BLOCKR register. This was sufficient to prevent DMA writes from working.

This commit is contained in:
Gregory Nutt 2015-03-15 09:35:48 -06:00
parent 8783526a5f
commit 5fcdb09791
4 changed files with 10 additions and 2 deletions

View File

@ -3010,8 +3010,9 @@ static int sam_dmasendsetup(FAR struct sdio_dev_s *dev,
*/
regval = sam_getreg(priv, SAM_HSMCI_BLKR_OFFSET);
nblocks = ((regval & HSMCI_BLKR_BCNT_SHIFT) >> HSMCI_BLKR_BCNT_SHIFT);
nblocks = ((regval & HSMCI_BLKR_BCNT_MASK) >> HSMCI_BLKR_BCNT_SHIFT);
blocksize = ((regval & HSMCI_BLKR_BLKLEN_MASK) >> HSMCI_BLKR_BLKLEN_SHIFT);
DEBUGASSERT(nblocks > 0 && blocksize > 0 && (blocksize & 3) == 0);
/* Physical address of the HSCMI source register, either the TDR (for

View File

@ -2935,8 +2935,9 @@ static int sam_dmasendsetup(FAR struct sdio_dev_s *dev,
*/
regval = sam_getreg(priv, SAM_HSMCI_BLKR_OFFSET);
nblocks = ((regval & HSMCI_BLKR_BCNT_SHIFT) >> HSMCI_BLKR_BCNT_SHIFT);
nblocks = ((regval & HSMCI_BLKR_BCNT_MASK) >> HSMCI_BLKR_BCNT_SHIFT);
blocksize = ((regval & HSMCI_BLKR_BLKLEN_MASK) >> HSMCI_BLKR_BLKLEN_SHIFT);
DEBUGASSERT(nblocks > 0 && blocksize > 0 && (blocksize & 3) == 0);
/* Physical address of the HSCMI source register, either the TDR (for

View File

@ -3168,6 +3168,9 @@ To-Do List
the SAMA5D4 which has a different DMA subsystem). This is a bug that
needs to be resolved.
UPDATE: This problem may be fixed with a bug correct on 2015-03-15).
Ned to retest.
3) GMAC has only been tested on a 10/100Base-T network. I don't have a
1000Base-T network to support additional testing.

View File

@ -3825,6 +3825,9 @@ To-Do List
the SAMA5D4 which has a different DMA subsystem). This is a bug that
needs to be resolved.
UPDATE: This problem may be fixed with a bug correct on 2015-03-15).
Ned to retest.
4) I believe that there is an issue when the internal AT25 FLASH is
formatted by NuttX. That format works fine with Linux, but does not
appear to work with Windows. Reformatting on Windows can resolve this.