diff options
Diffstat (limited to 'include/asm-xtensa/xtensa/xtboard.h')
-rw-r--r-- | include/asm-xtensa/xtensa/xtboard.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/include/asm-xtensa/xtensa/xtboard.h b/include/asm-xtensa/xtensa/xtboard.h new file mode 100644 index 000000000000..22469c175307 --- /dev/null +++ b/include/asm-xtensa/xtensa/xtboard.h | |||
@@ -0,0 +1,120 @@ | |||
1 | #ifndef _xtboard_h_included_ | ||
2 | #define _xtboard_h_included_ | ||
3 | |||
4 | /* | ||
5 | * THIS FILE IS GENERATED -- DO NOT MODIFY BY HAND | ||
6 | * | ||
7 | * xtboard.h -- Routines for getting useful information from the board. | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file "COPYING" in the main directory of this archive | ||
11 | * for more details. | ||
12 | * | ||
13 | * Copyright (C) 2002 Tensilica Inc. | ||
14 | */ | ||
15 | |||
16 | |||
17 | #include <xtensa/xt2000.h> | ||
18 | |||
19 | #define XTBOARD_RTC_ERROR -1 | ||
20 | #define XTBOARD_RTC_STOPPED -2 | ||
21 | |||
22 | |||
23 | /* xt2000-i2cdev.c: */ | ||
24 | typedef void XtboardDelayFunc( unsigned ); | ||
25 | extern XtboardDelayFunc* xtboard_set_nsdelay_func( XtboardDelayFunc *delay_fn ); | ||
26 | extern int xtboard_i2c_read (unsigned id, unsigned char *buf, unsigned addr, unsigned size); | ||
27 | extern int xtboard_i2c_write(unsigned id, unsigned char *buf, unsigned addr, unsigned size); | ||
28 | extern int xtboard_i2c_wait_nvram_ack(unsigned id, unsigned swtimer); | ||
29 | |||
30 | /* xtboard.c: */ | ||
31 | extern int xtboard_nvram_read (unsigned addr, unsigned len, unsigned char *buf); | ||
32 | extern int xtboard_nvram_write(unsigned addr, unsigned len, unsigned char *buf); | ||
33 | extern int xtboard_nvram_binfo_read (xt2000_nvram_binfo *buf); | ||
34 | extern int xtboard_nvram_binfo_write(xt2000_nvram_binfo *buf); | ||
35 | extern int xtboard_nvram_binfo_valid(xt2000_nvram_binfo *buf); | ||
36 | extern int xtboard_ethermac_get(unsigned char *buf); | ||
37 | extern int xtboard_ethermac_set(unsigned char *buf); | ||
38 | |||
39 | /*+*---------------------------------------------------------------------------- | ||
40 | / Function: xtboard_get_rtc_time | ||
41 | / | ||
42 | / Description: Get time stored in real-time clock. | ||
43 | / | ||
44 | / Returns: time in seconds stored in real-time clock. | ||
45 | /-**----------------------------------------------------------------------------*/ | ||
46 | |||
47 | extern unsigned xtboard_get_rtc_time(void); | ||
48 | |||
49 | /*+*---------------------------------------------------------------------------- | ||
50 | / Function: xtboard_set_rtc_time | ||
51 | / | ||
52 | / Description: Set time stored in real-time clock. | ||
53 | / | ||
54 | / Parameters: time -- time in seconds to store to real-time clock | ||
55 | / | ||
56 | / Returns: 0 on success, xtboard_i2c_write() error code otherwise. | ||
57 | /-**----------------------------------------------------------------------------*/ | ||
58 | |||
59 | extern int xtboard_set_rtc_time(unsigned time); | ||
60 | |||
61 | |||
62 | /* xtfreq.c: */ | ||
63 | /*+*---------------------------------------------------------------------------- | ||
64 | / Function: xtboard_measure_sys_clk | ||
65 | / | ||
66 | / Description: Get frequency of system clock. | ||
67 | / | ||
68 | / Parameters: none | ||
69 | / | ||
70 | / Returns: frequency of system clock. | ||
71 | /-**----------------------------------------------------------------------------*/ | ||
72 | |||
73 | extern unsigned xtboard_measure_sys_clk(void); | ||
74 | |||
75 | |||
76 | #if 0 /* old stuff from xtboard.c: */ | ||
77 | |||
78 | /*+*---------------------------------------------------------------------------- | ||
79 | / Function: xtboard_nvram valid | ||
80 | / | ||
81 | / Description: Determines if data in NVRAM is valid. | ||
82 | / | ||
83 | / Parameters: delay -- 10us delay function | ||
84 | / | ||
85 | / Returns: 1 if NVRAM is valid, 0 otherwise | ||
86 | /-**----------------------------------------------------------------------------*/ | ||
87 | |||
88 | extern unsigned xtboard_nvram_valid(void (*delay)( void )); | ||
89 | |||
90 | /*+*---------------------------------------------------------------------------- | ||
91 | / Function: xtboard_get_nvram_contents | ||
92 | / | ||
93 | / Description: Returns contents of NVRAM. | ||
94 | / | ||
95 | / Parameters: buf -- buffer to NVRAM contents. | ||
96 | / delay -- 10us delay function | ||
97 | / | ||
98 | / Returns: 1 if NVRAM is valid, 0 otherwise | ||
99 | /-**----------------------------------------------------------------------------*/ | ||
100 | |||
101 | extern unsigned xtboard_get_nvram_contents(unsigned char *buf, void (*delay)( void )); | ||
102 | |||
103 | /*+*---------------------------------------------------------------------------- | ||
104 | / Function: xtboard_get_ether_addr | ||
105 | / | ||
106 | / Description: Returns ethernet address of board. | ||
107 | / | ||
108 | / Parameters: buf -- buffer to store ethernet address | ||
109 | / delay -- 10us delay function | ||
110 | / | ||
111 | / Returns: nothing. | ||
112 | /-**----------------------------------------------------------------------------*/ | ||
113 | |||
114 | extern void xtboard_get_ether_addr(unsigned char *buf, void (*delay)( void )); | ||
115 | |||
116 | #endif /*0*/ | ||
117 | |||
118 | |||
119 | #endif /*_xtboard_h_included_*/ | ||
120 | |||