[CONNECTOR]: Update documentation to match reality.
[linux-2.6/verdex.git] / include / asm-xtensa / xtensa / xtboard.h
blob22469c1753072624a706e3b29493551c015df058
1 #ifndef _xtboard_h_included_
2 #define _xtboard_h_included_
4 /*
5 * THIS FILE IS GENERATED -- DO NOT MODIFY BY HAND
7 * xtboard.h -- Routines for getting useful information from the board.
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.
13 * Copyright (C) 2002 Tensilica Inc.
17 #include <xtensa/xt2000.h>
19 #define XTBOARD_RTC_ERROR -1
20 #define XTBOARD_RTC_STOPPED -2
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);
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);
39 /*+*----------------------------------------------------------------------------
40 / Function: xtboard_get_rtc_time
42 / Description: Get time stored in real-time clock.
44 / Returns: time in seconds stored in real-time clock.
45 /-**----------------------------------------------------------------------------*/
47 extern unsigned xtboard_get_rtc_time(void);
49 /*+*----------------------------------------------------------------------------
50 / Function: xtboard_set_rtc_time
52 / Description: Set time stored in real-time clock.
54 / Parameters: time -- time in seconds to store to real-time clock
56 / Returns: 0 on success, xtboard_i2c_write() error code otherwise.
57 /-**----------------------------------------------------------------------------*/
59 extern int xtboard_set_rtc_time(unsigned time);
62 /* xtfreq.c: */
63 /*+*----------------------------------------------------------------------------
64 / Function: xtboard_measure_sys_clk
66 / Description: Get frequency of system clock.
68 / Parameters: none
70 / Returns: frequency of system clock.
71 /-**----------------------------------------------------------------------------*/
73 extern unsigned xtboard_measure_sys_clk(void);
76 #if 0 /* old stuff from xtboard.c: */
78 /*+*----------------------------------------------------------------------------
79 / Function: xtboard_nvram valid
81 / Description: Determines if data in NVRAM is valid.
83 / Parameters: delay -- 10us delay function
85 / Returns: 1 if NVRAM is valid, 0 otherwise
86 /-**----------------------------------------------------------------------------*/
88 extern unsigned xtboard_nvram_valid(void (*delay)( void ));
90 /*+*----------------------------------------------------------------------------
91 / Function: xtboard_get_nvram_contents
93 / Description: Returns contents of NVRAM.
95 / Parameters: buf -- buffer to NVRAM contents.
96 / delay -- 10us delay function
98 / Returns: 1 if NVRAM is valid, 0 otherwise
99 /-**----------------------------------------------------------------------------*/
101 extern unsigned xtboard_get_nvram_contents(unsigned char *buf, void (*delay)( void ));
103 /*+*----------------------------------------------------------------------------
104 / Function: xtboard_get_ether_addr
106 / Description: Returns ethernet address of board.
108 / Parameters: buf -- buffer to store ethernet address
109 / delay -- 10us delay function
111 / Returns: nothing.
112 /-**----------------------------------------------------------------------------*/
114 extern void xtboard_get_ether_addr(unsigned char *buf, void (*delay)( void ));
116 #endif /*0*/
119 #endif /*_xtboard_h_included_*/