Changeset 4ac7e272 in rtems


Ignore:
Timestamp:
Jul 30, 2009, 3:56:38 PM (10 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, master
Children:
7e260d6
Parents:
b1b6beb0
Message:

Enable data cache.

Location:
c/src/lib/libbsp/m68k/uC5282
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/ChangeLog

    rb1b6beb0 r4ac7e272  
     12009-07-30  Eric Norum <norume@aps.anl.gov>
     2
     3        * include/bsp.h, network/network.c, startup/bspstart.c:  Try enabling
     4    the data cache.
     5
    162009-07-28  Eric Norum <norume@aps.anl.gov>
    27
  • c/src/lib/libbsp/m68k/uC5282/include/bsp.h

    rb1b6beb0 r4ac7e272  
    3232 * Leave commented to use instruction-only cache
    3333 */
    34 /* #define RTEMS_MCF5282_BSP_ENABLE_DATA_CACHE */
     34#define RTEMS_MCF5282_BSP_ENABLE_DATA_CACHE
    3535
    3636/***************************************************************************/
  • c/src/lib/libbsp/m68k/uC5282/network/network.c

    rb1b6beb0 r4ac7e272  
    493493            /*
    494494             * Invalidate the cache.  The cache is so small that it's
    495              * more efficient to just invalidate the whole thing unless
    496              * the packet is very small.
     495             * reasonable to simply invalidate the whole thing.
    497496             */
    498             if (len < 128)
    499                 rtems_cache_invalidate_multiple_data_lines(m->m_data, len);
    500             else
    501                 rtems_cache_invalidate_entire_data();
     497            rtems_cache_invalidate_entire_data();
    502498#endif
    503499            m->m_len = m->m_pkthdr.len = len - sizeof(struct ether_header);
  • c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c

    rb1b6beb0 r4ac7e272  
    115115    rtems_interrupt_disable(level);
    116116    mcf5282_cacr_mode &= ~MCF5XXX_CACR_DIDI;
    117     m68k_set_cacr(mcf5282_cacr_mode);
     117    m68k_set_cacr_nop(mcf5282_cacr_mode | MCF5XXX_CACR_CINV | MCF5XXX_CACR_INVI);
    118118    rtems_interrupt_enable(level);
    119119}
     
    149149
    150150    rtems_interrupt_disable(level);
    151     mcf5282_cacr_mode &= ~MCF5XXX_CACR_CENB;
    152     m68k_set_cacr(mcf5282_cacr_mode);
     151    mcf5282_cacr_mode &= ~MCF5XXX_CACR_DISD;
     152    m68k_set_cacr_nop(mcf5282_cacr_mode | MCF5XXX_CACR_CINV | MCF5XXX_CACR_INVD);
    153153    rtems_interrupt_enable(level);
    154154#endif
     
    161161
    162162    rtems_interrupt_disable(level);
    163     rtems_interrupt_disable(level);
    164     mcf5282_cacr_mode |= MCF5XXX_CACR_CENB;
     163    mcf5282_cacr_mode |= MCF5XXX_CACR_DISD;
    165164    m68k_set_cacr(mcf5282_cacr_mode);
    166165    rtems_interrupt_enable(level);
Note: See TracChangeset for help on using the changeset viewer.