[c991eeec] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup RTEMSBSPsPowerPCSS555 |
---|
| 5 | * |
---|
| 6 | * @brief Global BSP definitions. |
---|
| 7 | */ |
---|
| 8 | |
---|
[f62c7daa] | 9 | /* |
---|
[a800d09c] | 10 | * This file includes definitions for the Intec SS555. |
---|
[f62c7daa] | 11 | */ |
---|
| 12 | |
---|
| 13 | /* |
---|
[a800d09c] | 14 | * SS555 port sponsored by Defence Research and Development Canada - Suffield |
---|
| 15 | * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca) |
---|
| 16 | * |
---|
| 17 | * Derived from c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h: |
---|
| 18 | * |
---|
| 19 | * COPYRIGHT (c) 1989-1998. |
---|
| 20 | * On-Line Applications Research Corporation (OAR). |
---|
| 21 | * |
---|
| 22 | * The license and distribution terms for this file may be |
---|
| 23 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 24 | * http://www.rtems.org/license/LICENSE. |
---|
[a800d09c] | 25 | */ |
---|
| 26 | |
---|
[9cff822a] | 27 | #ifndef LIBBSP_POWERPC_SS555_BSP_H |
---|
| 28 | #define LIBBSP_POWERPC_SS555_BSP_H |
---|
[a800d09c] | 29 | |
---|
[c991eeec] | 30 | /** |
---|
| 31 | * @defgroup RTEMSBSPsPowerPCSS555 SS555 |
---|
| 32 | * |
---|
| 33 | * @ingroup RTEMSBSPsPowerPC |
---|
| 34 | * |
---|
| 35 | * @brief SS555 Board Support Package. |
---|
| 36 | * |
---|
| 37 | * @{ |
---|
| 38 | */ |
---|
| 39 | |
---|
[a800d09c] | 40 | #include <bspopts.h> |
---|
[5249a4c] | 41 | |
---|
| 42 | #ifdef ASM |
---|
| 43 | |
---|
| 44 | #define eie 0x050 /* External Interrupt Enable Register */ |
---|
| 45 | #define eid 0x051 /* External Interrupt Disable Register */ |
---|
| 46 | #define nri 0x052 /* Non-Recoverable Interrupt Register */ |
---|
| 47 | |
---|
| 48 | #else /* !ASM */ |
---|
| 49 | |
---|
[a052181] | 50 | #include <bsp/default-initial-extension.h> |
---|
[a800d09c] | 51 | |
---|
| 52 | #include <rtems.h> |
---|
| 53 | #include <mpc5xx.h> |
---|
| 54 | #include <mpc5xx/console.h> |
---|
| 55 | #include <libcpu/vectors.h> |
---|
| 56 | #include <bsp/irq.h> |
---|
| 57 | |
---|
[46dde0fc] | 58 | #ifdef __cplusplus |
---|
| 59 | extern "C" { |
---|
| 60 | #endif |
---|
| 61 | |
---|
[a800d09c] | 62 | /* |
---|
| 63 | * Clock definitions |
---|
| 64 | */ |
---|
[6128a4a] | 65 | |
---|
[a800d09c] | 66 | #define BSP_CRYSTAL_HZ 4000000 /* crystal frequency, Hz */ |
---|
[5249a4c] | 67 | #define BSP_CLOCK_HZ 40000000 /* CPU clock frequency, Hz */ |
---|
[a800d09c] | 68 | |
---|
| 69 | /* |
---|
| 70 | * I/O definitions |
---|
| 71 | * |
---|
| 72 | * The SS555 board includes a CPLD to control on-board features and |
---|
| 73 | * off-board devices. |
---|
| 74 | */ |
---|
| 75 | typedef struct cpld_ { |
---|
[76f9c44] | 76 | uint8_t cs3a[32]; /* Chip select 3A */ |
---|
| 77 | uint8_t pad0[0x200000 - 0x000020]; |
---|
[a800d09c] | 78 | |
---|
[76f9c44] | 79 | uint8_t cs3b[32]; /* Chip select 3B */ |
---|
| 80 | uint8_t pad2[0x400000 - 0x200020]; |
---|
[a800d09c] | 81 | |
---|
[76f9c44] | 82 | uint8_t cs3c[32]; /* Chip select 3C */ |
---|
| 83 | uint8_t pad4[0x600000 - 0x400020]; |
---|
[a800d09c] | 84 | |
---|
[76f9c44] | 85 | uint8_t cs3d[32]; /* Chip select 3D */ |
---|
| 86 | uint8_t pad6[0x800000 - 0x600020]; |
---|
[a800d09c] | 87 | |
---|
[76f9c44] | 88 | uint8_t serial_ints; /* Enable/disable serial interrupts */ |
---|
| 89 | uint8_t serial_resets; /* Enable/disable serial resets */ |
---|
| 90 | uint8_t serial_ack; /* Acknowledge serial transfers */ |
---|
| 91 | uint8_t pad8[0xA00000 - 0x800003]; |
---|
[a800d09c] | 92 | |
---|
[76f9c44] | 93 | uint8_t iflash_writess; /* Enable/disable internal-flash writes */ |
---|
| 94 | uint8_t nflash_writess; /* Enable/disable NAND-flash writes */ |
---|
| 95 | uint8_t padA[0xC00000 - 0xA00002]; |
---|
[a800d09c] | 96 | } cpld_t; |
---|
[6128a4a] | 97 | |
---|
[a800d09c] | 98 | extern volatile cpld_t cpld; /* defined in linkcmds */ |
---|
[6128a4a] | 99 | |
---|
[8502b16] | 100 | /* clock/p_clock.c */ |
---|
| 101 | extern int BSP_disconnect_clock_handler (void); |
---|
| 102 | |
---|
| 103 | extern int BSP_connect_clock_handler (rtems_irq_hdl hdl); |
---|
| 104 | |
---|
[f62c7daa] | 105 | /* |
---|
| 106 | * Prototypes for methods called from .S to support dependency tracking. |
---|
| 107 | */ |
---|
| 108 | void _InitSS555(void); |
---|
| 109 | |
---|
[a800d09c] | 110 | #ifdef __cplusplus |
---|
| 111 | } |
---|
| 112 | #endif |
---|
| 113 | |
---|
[f62c7daa] | 114 | #endif /* !ASM */ |
---|
| 115 | |
---|
[c991eeec] | 116 | /** @} */ |
---|
| 117 | |
---|
[a800d09c] | 118 | #endif |
---|