[ad65fc7f] | 1 | /** |
---|
| 2 | *@file bsp.h |
---|
| 3 | * |
---|
| 4 | * This include file contains all board IO definitions for TLL6527M. |
---|
| 5 | * |
---|
| 6 | * COPYRIGHT (c) 2010 by ECE Northeastern University. |
---|
| 7 | * |
---|
| 8 | * The license and distribution terms for this file may be |
---|
| 9 | * found in the file LICENSE in this distribution or at |
---|
| 10 | * http://www.rtems.com/license |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | #ifndef _BSP_H |
---|
| 15 | #define _BSP_H |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | #ifdef __cplusplus |
---|
| 19 | extern "C" { |
---|
| 20 | #endif |
---|
| 21 | |
---|
| 22 | #include <bspopts.h> |
---|
[a052181] | 23 | #include <bsp/default-initial-extension.h> |
---|
[ad65fc7f] | 24 | |
---|
| 25 | #include <rtems.h> |
---|
| 26 | #include <rtems/console.h> |
---|
| 27 | #include <rtems/clockdrv.h> |
---|
| 28 | #include <rtems/score/bfin.h> |
---|
| 29 | #include <rtems/bfin/bf52x.h> |
---|
| 30 | #include <bf52x.h> |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | /* |
---|
| 34 | * PLL and clock setup values: |
---|
| 35 | */ |
---|
| 36 | |
---|
| 37 | /* |
---|
| 38 | * PLL configuration for TLL6527M |
---|
| 39 | * |
---|
| 40 | * XTL = 27 MHz |
---|
| 41 | * CLKIN = 13 MHz |
---|
| 42 | * VCO = 391 MHz |
---|
| 43 | * CCLK = 391 MHz |
---|
| 44 | * SCLK = 130 MHz |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | #define PLL_CSEL 0x0000 /* CCLK = VCO */ |
---|
| 48 | #define PLL_SSEL 0x0003 /* SCLK = CCLK/3 */ |
---|
| 49 | #define PLL_MSEL 0x3A00 /* VCO = 29xCLKIN */ |
---|
| 50 | #define PLL_DF 0x0001 /* CLKIN = XTL/2 */ |
---|
| 51 | |
---|
| 52 | #define CLKIN (25000000) /* Input clock to the PLL */ |
---|
| 53 | #define CCLK (600000000) /* CORE CLOCK */ |
---|
| 54 | #define SCLK (100000000) /* SYSTEM CLOCK */ |
---|
| 55 | |
---|
| 56 | /* |
---|
| 57 | * UART setup values |
---|
| 58 | */ |
---|
| 59 | #define BAUDRATE 57600 /* Console Baudrate */ |
---|
| 60 | #define WORD_5BITS 0x00 /* 5 bits word */ |
---|
| 61 | #define WORD_6BITS 0x01 /* 6 bits word */ |
---|
| 62 | #define WORD_7BITS 0x02 /* 7 bits word */ |
---|
| 63 | #define WORD_8BITS 0x03 /* 8 bits word */ |
---|
| 64 | #define EVEN_PARITY 0x18 /* Enable EVEN parity */ |
---|
| 65 | #define ODD_PARITY 0x08 /* Enable ODD parity */ |
---|
| 66 | #define TWO_STP_BIT 0x04 /* 2 stop bits */ |
---|
| 67 | |
---|
| 68 | rtems_isr_entry set_vector( /* returns old vector */ |
---|
| 69 | rtems_isr_entry handler, /* isr routine */ |
---|
| 70 | rtems_vector_number vector, /* vector number */ |
---|
| 71 | int type /* RTEMS or RAW intr */ |
---|
| 72 | ); |
---|
| 73 | |
---|
| 74 | #ifdef __cplusplus |
---|
| 75 | } |
---|
| 76 | #endif |
---|
| 77 | |
---|
| 78 | #endif |
---|