Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / char / rio / proto.h
blobddff0ef84e3a42d24a21b56f7674e48402dcccfb
1 /*
3 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef _prototypes_h
20 #define _prototypes_h
24 ** boot.c
26 void init_boot( char *p, short stage);
29 ** disconct.c
31 void kill_boot ( LPB *link );
32 void disconnected( LPB *link );
33 short boot_3( LPB *link, PKT *pkt );
34 short send_3_pkt( LPB *link, PKT *pkt);
37 ** error.c
39 void du_error(void);
42 ** formpkt.c
44 ushort sum_it( PKT *pkt ) ;
45 void form_rup_pkt( RUP *form_rup, PKT *pkt );
46 void form_poll_pkt ( int type, LPB *link, int node );
47 void form_route_pkt ( int type, PKT *pkt, LPB *link );
50 ** idle.c
52 void idle( Process *idle_p );
55 ** init.c
57 void general_init(void);
58 void mem_halt( int error);
61 ** linkinit.c
63 void initlink( u_short number, LPB *link);
64 void runlink( LPB *link);
67 ** list.c
69 PKT *get_free_start(void);
70 void put_free_start( PKT *pkt);
72 #ifdef HOST
73 int can_remove_transmit ( PKT **pkt, PKT *pointer );
74 #endif
76 #ifdef RTA
77 int spl7 ( void );
78 int spl0 ( void );
79 Q_BUF *get_free_q( void );
80 PKT *get_free_end(void);
81 int add_end( PKT *pkt, PHB *phb, int type);
82 unsigned short free_packets( PHB *phb, int type);
83 int can_remove_start( PKT **pkt, PHB *phb, int type);
84 int can_add_start( PHB *phb, int type);
85 int can_add_end( PHB *phb, int type);
86 void put_free_end( PKT *pkt);
87 int remove_start( PKT **pkt, PHB *phb, int type);
88 #endif
91 ** Lrt.c
93 void lrt( Process *lrt_p, LPB *link );
95 #ifdef RTA
96 void set_led_red ( LPB *link );
97 #endif
100 ** ltt.c
102 void ltt( Process *ltt_p, LPB *link, PHB *phb_ptr[] );
103 void send_poll ( LPB *link );
104 void request_id ( LPB *link );
105 void send_topology_update ( LPB *link );
106 void send_topology ( LPB *link );
107 void supply_id ( LPB *link );
109 #ifdef RTA
110 void redirect_queue ( LPB *link, ushort flush );
111 int obtain_rup ( int rup_number, PKT **pkt_address, LPB *link );
112 #endif
114 #ifdef TESTING_PERF
115 int consume_cpu( void );
116 #endif
119 ** lttwake.c
121 #ifdef HOST
122 void ltt_wakeup( Process *ltt_wakeup_p );
123 #endif
126 ** mapgen.c
128 void generate_id_map( short mapping, ROUTE_STR route[] );
129 void gen_map( int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl );
130 void adjust_ttl( int mapping, int looking_at, int come_from, ROUTE_STR route[], int link, int *ttl);
131 void init_sys_map(void);
134 ** mmu.c
136 char *rio_malloc( unsigned int amount);
137 char *rio_calloc( unsigned int num, unsigned int size);
138 ERROR rio_mmu_init( uint total_mem );
141 ** partn.c
143 void partition_tx( struct PHB *phb, u_short tx_size, u_short rx_size, u_short rx_limit);
146 ** poll.c
148 void tx_poll( Process *tx_poll_p);
151 ** process.c
153 int get_proc_space( Process **pd, int **pws, int wssize);
156 ** readrom.c
158 void read_serial_number(char *buf);
161 ** rio.c
163 int main( void );
166 ** route.c
168 void route_update ( PKT *pkt, LPB *link);
171 ** rtainit.c
173 #if defined(RTA)
174 void rta_init(ushort RtaType);
175 #endif /* defined(RTA) */
178 ** rupboot.c
180 void rup_boot( PKT *pkt, RUP *this_rup, LPB *link);
182 #ifdef RTA
183 void kill_your_neighbour( int link_to_kill );
184 #endif
187 ** rupcmd.c
189 void rup_command( PKT *pkt, struct RUP *this_rup, LPB *link);
192 ** ruperr.c
194 void rup_error( PKT *pkt, RUP *this_rup, LPB *link );
195 void illegal_cmd( PKT *src_pkt );
198 ** ruppoll.c
200 void rup_poll( PKT *pkt, RUP *this_rup, LPB *link );
203 ** ruppower.c
205 void rup_power( PKT *pkt, RUP *this_rup, LPB *link );
208 ** ruprm.c
210 void rup_route_map( PKT *pkt, RUP *this_rup, LPB *link);
213 ** rupstat.c
215 void rup_status( PKT *pkt, RUP *this_rup, LPB *link);
218 ** rupsync.c
220 void rup_sync( PKT *pkt);
223 ** rxpkt.c
225 ERROR rx_pkt( PKT_ptr_ptr pkt_address, LPB *link);
228 ** sendsts.c
230 void send_status( PKT *requesting_pkt, RUP *this_rup);
233 ** serial.c
235 void assign_serial ( char *ser_in, char *ser_out);
236 int cmp_serial ( char *ser_1, char *ser_2);
239 ** txpkt.c
241 ERROR tx_pkt( PKT *pkt, LPB *link);
242 short send_sync( LPB *link);
244 #endif /* _prototypes_h */