diff options
Diffstat (limited to 'bsps/powerpc/include/mpc8xx')
-rw-r--r-- | bsps/powerpc/include/mpc8xx/console.h | 32 | ||||
-rw-r--r-- | bsps/powerpc/include/mpc8xx/cpm.h | 36 | ||||
-rw-r--r-- | bsps/powerpc/include/mpc8xx/mmu.h | 47 |
3 files changed, 115 insertions, 0 deletions
diff --git a/bsps/powerpc/include/mpc8xx/console.h b/bsps/powerpc/include/mpc8xx/console.h new file mode 100644 index 0000000000..eea561e7eb --- /dev/null +++ b/bsps/powerpc/include/mpc8xx/console.h @@ -0,0 +1,32 @@ +#ifndef _MPC8XX_CONSOLE_H +#define _MPC8XX_CONSOLE_H + +#include <rtems/libio.h> + +void m8xx_uart_initialize(void); +void m8xx_uart_interrupts_initialize(void); +void m8xx_uart_scc_initialize (int minor); +void m8xx_uart_smc_initialize (int minor); + +/* Termios callbacks */ +int m8xx_uart_pollRead(int minor); +ssize_t m8xx_uart_pollWrite(int minor, const char* buf, size_t len); +ssize_t m8xx_uart_write(int minor, const char *buf, size_t len); +int m8xx_uart_setAttributes(int, const struct termios* t); + + +#ifdef mpc860 +#define NUM_PORTS 6 /* number of serial ports for mpc860 */ +#else +#define NUM_PORTS 4 /* number of serial ports for mpc821 */ +#endif + +#define SMC1_MINOR 0 +#define SMC2_MINOR 1 +#define SCC1_MINOR 2 +#define SCC2_MINOR 3 +#define SCC3_MINOR 4 +#define SCC4_MINOR 5 + + +#endif diff --git a/bsps/powerpc/include/mpc8xx/cpm.h b/bsps/powerpc/include/mpc8xx/cpm.h new file mode 100644 index 0000000000..49889bdc32 --- /dev/null +++ b/bsps/powerpc/include/mpc8xx/cpm.h @@ -0,0 +1,36 @@ +/* + * cpm.h + * + * This include file contains definitions pertaining + * to the Communications Processor Module (CPM) on the MPC8xx. + * + * Copyright (c) 1999, National Research Council of Canada + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _MPC8XX_CPM_H +#define _MPC8XX_CPM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Functions */ + +void m8xx_cp_execute_cmd( uint16_t command ); +void *m8xx_dpram_allocate( unsigned int byte_count ); + +#define m8xx_bd_allocate(count) \ + m8xx_dpram_allocate( (count) * sizeof(m8xxBufferDescriptor_t) ) +#define m8xx_RISC_timer_table_allocate(count) \ + m8xx_dpram_allocate( (count) * 4 ) + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/bsps/powerpc/include/mpc8xx/mmu.h b/bsps/powerpc/include/mpc8xx/mmu.h new file mode 100644 index 0000000000..f818b14be1 --- /dev/null +++ b/bsps/powerpc/include/mpc8xx/mmu.h @@ -0,0 +1,47 @@ +/* + * mmu.h + * + * This include file contains definitions pertaining + * to the MMU on the MPC8xx. + * + * Copyright (c) 1999, National Research Council of Canada + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _MPC8XX_MMU_H +#define _MPC8XX_MMU_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The MMU_TLB_table is used to statically initialize the Table Lookaside + * Buffers in the MMU of an MPC8xx. + */ +typedef struct { + uint32_t mmu_epn; /* Effective Page Number */ + uint32_t mmu_twc; /* Tablewalk Control Register */ + uint32_t mmu_rpn; /* Real Page Number */ +} MMU_TLB_table_t; + +/* + * The MMU_TLB_table and its size, MMU_N_TLB_Table_Entries, must be + * supplied by the BSP. + */ +extern MMU_TLB_table_t MMU_TLB_table[]; /* MMU TLB table supplied by BSP */ +extern int MMU_N_TLB_Table_Entries; /* Number of entries in MMU TLB table */ + +/* Functions */ + +void mmu_init( void ); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ |