Ignore:
Timestamp:
May 1, 1996, 3:25:33 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
bf6661e
Parents:
dce1c1a1
Message:

Updates from Eric Norum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/gen68360/startup/init68360.c

    rdce1c1a1 r996a9cb4  
    11/*
    2  * Initialize 68360 hardware
     2 * MC68360 support routines
    33 *
    44 * W. Eric Norum
     
    1313#include <rtems.h>
    1414#include <bsp.h>
    15 #include "m68360.h"
     15#include <m68360.h>
    1616
    17 void
    18 _Init68360 (void)
     17/*
     18 * Send a command to the CPM RISC processer
     19 */
     20
     21void M360ExecuteRISC(rtems_unsigned16 command)
     22{
     23        rtems_unsigned16 sr;
     24
     25        m68k_disable_interrupts (sr);
     26        while (m360.cr & M360_CR_FLG)
     27                continue;
     28        m360.cr = command | M360_CR_FLG;
     29        m68k_enable_interrupts (sr);
     30}
     31
     32/*
     33 * Initialize MC68360
     34 */
     35
     36void _Init68360 (void)
    1937{
    2038        int i;
    2139        extern void *_RomBase, *_RamBase;
    2240        m68k_isr_entry *vbr;
    23         extern void _ClearBSSAndStart (void);
     41        extern void _CopyDataClearBSSAndStart (void);
    2442
    2543        /*
     
    6583                *((long *)((char *)&m360 + 0xF00 + i)) = 0;
    6684        }
    67         m360.cr = M360_CR_RST | M360_CR_FLG;
     85        M360ExecuteRISC (M360_CR_RST);
    6886
    6987        /*
     
    130148         * Step 13: Copy  the exception vector table to system RAM
    131149         */
    132  
    133   m68k_get_vbr( vbr );
     150        m68k_get_vbr (vbr);
    134151        for (i = 0; i < 256; ++i)
    135152                M68Kvec[i] = vbr[i];
    136   m68k_set_vbr( M68Kvec );
     153        m68k_set_vbr (M68Kvec);
    137154       
    138155        /*
     
    168185
    169186        /*
    170          * Clear BSS, switch stacks and call main()
     187         * Copy data, clear BSS, switch stacks and call main()
    171188         */
    172         _ClearBSSAndStart ();
     189        _CopyDataClearBSSAndStart ();
    173190}
Note: See TracChangeset for help on using the changeset viewer.