1 | /* |
---|
2 | * bsp.h -- contain BSP API definition. |
---|
3 | * |
---|
4 | * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr |
---|
5 | * |
---|
6 | * The license and distribution terms for this file may be |
---|
7 | * found in found in the file LICENSE in this distribution or at |
---|
8 | * http://www.OARcorp.com/rtems/license.html. |
---|
9 | * |
---|
10 | * $Id$ |
---|
11 | */ |
---|
12 | #ifndef LIBBSP_POWERPC_MCP750_BSP_H |
---|
13 | #define LIBBSP_POWERPC_MCP750_BSP_H |
---|
14 | |
---|
15 | #include <rtems.h> |
---|
16 | #include <console.h> |
---|
17 | #include <libcpu/io.h> |
---|
18 | #include <clockdrv.h> |
---|
19 | #include <bsp/vectors.h> |
---|
20 | |
---|
21 | #ifndef ASM |
---|
22 | #define outport_byte(port,value) outb(value,port) |
---|
23 | #define outport_word(port,value) outw(value,port) |
---|
24 | #define outport_long(port,value) outl(value,port) |
---|
25 | |
---|
26 | #define inport_byte(port,value) (value = inb(port)) |
---|
27 | #define inport_word(port,value) (value = inw(port)) |
---|
28 | #define inport_long(port,value) (value = inl(port)) |
---|
29 | /* |
---|
30 | * Vital Board data Start using DATA RESIDUAL |
---|
31 | */ |
---|
32 | /* |
---|
33 | * Total memory using RESIDUAL DATA |
---|
34 | */ |
---|
35 | extern unsigned int BSP_mem_size; |
---|
36 | /* |
---|
37 | * PCI Bus Frequency |
---|
38 | */ |
---|
39 | extern unsigned int BSP_bus_frequency; |
---|
40 | /* |
---|
41 | * processor clock frequency |
---|
42 | */ |
---|
43 | extern unsigned int BSP_processor_frequency; |
---|
44 | /* |
---|
45 | * Time base divisior (how many tick for 1 second). |
---|
46 | */ |
---|
47 | extern unsigned int BSP_time_base_divisor; |
---|
48 | |
---|
49 | #define BSP_Convert_decrementer( _value ) \ |
---|
50 | ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value))) |
---|
51 | |
---|
52 | extern rtems_configuration_table BSP_Configuration; |
---|
53 | extern void BSP_panic(char *s); |
---|
54 | extern void rtemsReboot(void); |
---|
55 | extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); |
---|
56 | extern int BSP_disconnect_clock_handler (void); |
---|
57 | extern int BSP_connect_clock_handler (void); |
---|
58 | #endif |
---|
59 | |
---|
60 | #endif |
---|