Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:59

0001 /*
0002  * cp.c
0003  *
0004  * MPC8xx CPM RISC Communication Processor routines.
0005  *
0006  * Based on code (alloc860.c in eth_comm port) by
0007  * Jay Monkman (jmonkman@frasca.com),
0008  * which, in turn, is based on code by
0009  * W. Eric Norum (eric@norum.ca).
0010  *
0011  * Modifications by Darlene Stewart (Darlene.Stewart@iit.nrc.ca):
0012  * Copyright (c) 1999, National Research Council of Canada
0013  */
0014 
0015 #include <rtems.h>
0016 #include <mpc8xx.h>
0017 #include <mpc8xx/cpm.h>
0018 
0019 /*
0020  * Send a command to the CPM RISC processer
0021  */
0022 
0023 void m8xx_cp_execute_cmd( uint16_t   command )
0024 {
0025   rtems_interrupt_level lvl;
0026 
0027   rtems_interrupt_disable(lvl);
0028   while (m8xx.cpcr & M8xx_CR_FLG) {
0029     continue;
0030   }
0031 
0032   m8xx.cpcr = command | M8xx_CR_FLG;
0033   rtems_interrupt_enable (lvl);
0034 }