1 /* SPDX-License-Identifier: GPL-2.0 */
2 /***********************************
3 * $Id: quicc_simple.h,v 1.1 2002/03/02 15:01:10 gerg Exp $
4 ***********************************
6 ***************************************
7 * Simple drivers common header
8 ***************************************
14 /* #include "quicc.h" */
21 typedef void (int_routine
)(unsigned short interrupt_event
);
22 typedef int_routine
*int_routine_ptr
;
23 typedef void *(alloc_routine
)(int length
);
24 typedef void (free_routine
)(int scc_num
, int channel_num
, void *buf
);
25 typedef void (store_rx_buffer_routine
)(int scc_num
, int channel_num
, void *buff
, int length
);
26 typedef int (handle_tx_error_routine
)(int scc_num
, int channel_num
, QUICC_BD
*tbd
);
27 typedef void (handle_rx_error_routine
)(int scc_num
, int channel_num
, QUICC_BD
*rbd
);
28 typedef void (handle_lost_error_routine
)(int scc_num
, int channel_num
);
30 /* user defined functions for global errors */
31 typedef void (handle_glob_overrun_routine
)(int scc_number
);
32 typedef void (handle_glob_underrun_routine
)(int scc_number
);
33 typedef void (glob_intr_q_overflow_routine
)(int scc_number
);
36 * General initialization and command routines
38 void quicc_issue_cmd (unsigned short cmd
, int scc_num
);
39 void quicc_init(void);
40 void quicc_scc_init(int scc_number
, int number_of_rx_buf
, int number_of_tx_buf
);
41 void quicc_smc_init(int smc_number
, int number_of_rx_buf
, int number_of_tx_buf
);
42 void quicc_scc_start(int scc_num
);
43 void quicc_scc_loopback(int scc_num
);
45 /* Interrupt enable/disable routines for critical pieces of code*/
46 unsigned short IntrDis(void);
47 void IntrEna(unsigned short old_sr
);
50 void print_rbd(int scc_num
);
51 void print_tbd(int scc_num
);