diff options
Diffstat (limited to 'bsps/powerpc/tqm8xx/start/cp.c')
-rw-r--r-- | bsps/powerpc/tqm8xx/start/cp.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bsps/powerpc/tqm8xx/start/cp.c b/bsps/powerpc/tqm8xx/start/cp.c new file mode 100644 index 0000000000..de38f0a5df --- /dev/null +++ b/bsps/powerpc/tqm8xx/start/cp.c @@ -0,0 +1,34 @@ +/* + * cp.c + * + * MPC8xx CPM RISC Communication Processor routines. + * + * Based on code (alloc860.c in eth_comm port) by + * Jay Monkman (jmonkman@frasca.com), + * which, in turn, is based on code by + * W. Eric Norum (eric@skatter.usask.ca). + * + * Modifications by Darlene Stewart (Darlene.Stewart@iit.nrc.ca): + * Copyright (c) 1999, National Research Council of Canada + */ + +#include <rtems.h> +#include <mpc8xx.h> +#include <mpc8xx/cpm.h> + +/* + * Send a command to the CPM RISC processer + */ + +void m8xx_cp_execute_cmd( uint16_t command ) +{ + rtems_interrupt_level lvl; + + rtems_interrupt_disable(lvl); + while (m8xx.cpcr & M8xx_CR_FLG) { + continue; + } + + m8xx.cpcr = command | M8xx_CR_FLG; + rtems_interrupt_enable (lvl); +} |