summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 15:52:24 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 15:52:24 +0000
commit61bd030179f252d14f9639cf4921eb4eee07b5ef (patch)
treeeca78226b814ad9e50f0d73fbe00ffaf67ab61e0 /c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
parentMust now pull in cache management code from libcpu. (diff)
downloadrtems-61bd030179f252d14f9639cf4921eb4eee07b5ef.tar.bz2
Moved PowerPC cache management code to libcpu. Also compiled
mpc8xx libcpu support for the first time and remove includes of bsp.h, references to BSP_Configuration, and Cpu_table. All of these can be obtained directly from RTEMS now.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
index 92c504d92e..0f25b297b4 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
@@ -46,10 +46,11 @@
* $Id$
*/
-#include <bsp.h>
+#include <rtems.h>
#include <rtems/libio.h>
#include <mpc8xx.h>
#include <mpc8xx/console.h>
+#include <mpc8xx/cpm.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
@@ -399,7 +400,7 @@ m8xx_scc2_interrupt_handler (rtems_vector_number v)
/* Check that the buffer is ours */
if ((RxBd[SCC2_MINOR]->status & M8xx_BD_EMPTY) == 0) {
rtems_invalidate_multiple_data_cache_lines(
- RxBd[SCC2_MINOR]->buffer,
+ (const void *) RxBd[SCC2_MINOR]->buffer,
RxBd[SCC2_MINOR]->length );
nb_overflow = rtems_termios_enqueue_raw_characters(
(void *)ttyp[SCC2_MINOR],
@@ -442,7 +443,7 @@ m8xx_scc3_interrupt_handler (rtems_vector_number v)
/* Check that the buffer is ours */
if ((RxBd[SCC3_MINOR]->status & M8xx_BD_EMPTY) == 0) {
rtems_invalidate_multiple_data_cache_lines(
- RxBd[SCC3_MINOR]->buffer,
+ (const void *) RxBd[SCC3_MINOR]->buffer,
RxBd[SCC3_MINOR]->length );
nb_overflow = rtems_termios_enqueue_raw_characters(
(void *)ttyp[SCC3_MINOR],
@@ -484,7 +485,7 @@ m8xx_scc4_interrupt_handler (rtems_vector_number v)
/* Check that the buffer is ours */
if ((RxBd[SCC4_MINOR]->status & M8xx_BD_EMPTY) == 0) {
rtems_invalidate_multiple_data_cache_lines(
- RxBd[SCC4_MINOR]->buffer,
+ (const void *) RxBd[SCC4_MINOR]->buffer,
RxBd[SCC4_MINOR]->length );
nb_overflow = rtems_termios_enqueue_raw_characters(
(void *)ttyp[SCC4_MINOR],
@@ -526,7 +527,7 @@ m8xx_smc1_interrupt_handler (rtems_vector_number v)
/* Check that the buffer is ours */
if ((RxBd[SMC1_MINOR]->status & M8xx_BD_EMPTY) == 0) {
rtems_invalidate_multiple_data_cache_lines(
- RxBd[SMC1_MINOR]->buffer,
+ (const void *) RxBd[SMC1_MINOR]->buffer,
RxBd[SMC1_MINOR]->length );
nb_overflow = rtems_termios_enqueue_raw_characters(
(void *)ttyp[SMC1_MINOR],
@@ -568,7 +569,7 @@ m8xx_smc2_interrupt_handler (rtems_vector_number v)
/* Check that the buffer is ours */
if ((RxBd[SMC2_MINOR]->status & M8xx_BD_EMPTY) == 0) {
rtems_invalidate_multiple_data_cache_lines(
- RxBd[SMC2_MINOR]->buffer,
+ (const void *) RxBd[SMC2_MINOR]->buffer,
RxBd[SMC2_MINOR]->length );
nb_overflow = rtems_termios_enqueue_raw_characters(
(void *)ttyp[SMC2_MINOR],
@@ -983,7 +984,10 @@ m8xx_uart_pollRead(
if (RxBd[minor]->status & M8xx_BD_EMPTY) {
return -1;
}
- _CPU_Data_Cache_Block_Invalidate( RxBd[minor]->buffer );
+ rtems_invalidate_multiple_data_cache_lines(
+ (const void *) RxBd[minor]->buffer,
+ RxBd[minor]->length
+ );
c = ((char *)RxBd[minor]->buffer)[0];
RxBd[minor]->status = M8xx_BD_EMPTY | M8xx_BD_WRAP;
return c;
@@ -1019,7 +1023,10 @@ m8xx_uart_pollWrite(
while (TxBd[minor]->status & M8xx_BD_READY)
continue;
txBuf[minor] = *buf++;
- _CPU_Data_Cache_Block_Flush( &txBuf[minor] );
+ rtems_flush_multiple_data_cache_lines(
+ (const void *) TxBd[minor]->buffer,
+ TxBd[minor]->length
+ );
TxBd[minor]->buffer = &txBuf[minor];
TxBd[minor]->length = 1;
TxBd[minor]->status = M8xx_BD_READY | M8xx_BD_WRAP;