quicc_simple.h (1830B)
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 *********************************** 5 * 6 *************************************** 7 * Simple drivers common header 8 *************************************** 9 */ 10 11#ifndef __SIMPLE_H 12#define __SIMPLE_H 13 14/* #include "quicc.h" */ 15 16#define GLB_SCC_0 0 17#define GLB_SCC_1 1 18#define GLB_SCC_2 2 19#define GLB_SCC_3 3 20 21typedef void (int_routine)(unsigned short interrupt_event); 22typedef int_routine *int_routine_ptr; 23typedef void *(alloc_routine)(int length); 24typedef void (free_routine)(int scc_num, int channel_num, void *buf); 25typedef void (store_rx_buffer_routine)(int scc_num, int channel_num, void *buff, int length); 26typedef int (handle_tx_error_routine)(int scc_num, int channel_num, QUICC_BD *tbd); 27typedef void (handle_rx_error_routine)(int scc_num, int channel_num, QUICC_BD *rbd); 28typedef void (handle_lost_error_routine)(int scc_num, int channel_num); 29 30/* user defined functions for global errors */ 31typedef void (handle_glob_overrun_routine)(int scc_number); 32typedef void (handle_glob_underrun_routine)(int scc_number); 33typedef void (glob_intr_q_overflow_routine)(int scc_number); 34 35/* 36 * General initialization and command routines 37 */ 38void quicc_issue_cmd (unsigned short cmd, int scc_num); 39void quicc_init(void); 40void quicc_scc_init(int scc_number, int number_of_rx_buf, int number_of_tx_buf); 41void quicc_smc_init(int smc_number, int number_of_rx_buf, int number_of_tx_buf); 42void quicc_scc_start(int scc_num); 43void quicc_scc_loopback(int scc_num); 44 45/* Interrupt enable/disable routines for critical pieces of code*/ 46unsigned short IntrDis(void); 47void IntrEna(unsigned short old_sr); 48 49/* For debugging */ 50void print_rbd(int scc_num); 51void print_tbd(int scc_num); 52 53#endif