Changeset 8cf102dd in rtems


Ignore:
Timestamp:
Aug 24, 2016, 1:30:06 PM (3 years ago)
Author:
Alexander Krutwig <alexander.krutwig@…>
Branches:
master
Children:
8099e0a
Parents:
89a319a0
git-author:
Alexander Krutwig <alexander.krutwig@…> (08/24/16 13:30:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/24/16 14:08:16)
Message:

bsp/atsam: Fix data cache flush

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/atsam/network/if_atsam.c

    r89a319a0 r8cf102dd  
    649649                cur = &sc->tx_bd_base[sc->tx_ring.tx_bd_used];
    650650                /* Set the transfer data */
    651                 rtems_cache_flush_multiple_data_lines(mtod(m, const void *),
    652                     (size_t)m->m_len);
    653651                if (m->m_len) {
    654                         cur->addr = (uint32_t)(mtod(m, void *));
     652                        uintptr_t cache_adjustment = mtod(m, uintptr_t) % 32;
     653
     654                        rtems_cache_flush_multiple_data_lines(
     655                          mtod(m, const char *) - cache_adjustment,
     656                          (size_t)(m->m_len + cache_adjustment));
     657
     658                        cur->addr = mtod(m, uint32_t);
    655659                        tmp_val = (uint32_t)m->m_len | GMAC_TX_SET_USED;
    656660                        if (sc->tx_ring.tx_bd_used == (sc->tx_ring.length - 1)) {
Note: See TracChangeset for help on using the changeset viewer.