EN-Z8530 Programming Guide.pdf

(362 KB) Pobierz
Z8530 Programming Guide
Alan Cox
alan@lxorguk.ukuu.org.uk
Z8530 Programming Guide
by Alan Cox
Copyright © 2000 Alan Cox
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For more details see the file COPYING in the source distribution of Linux.
Table of Contents
1. Introduction............................................................................................................................................1
2. Driver Modes..........................................................................................................................................2
3. Using the Z85230 driver ........................................................................................................................3
4. Attaching Network Interfaces ..............................................................................................................4
5. Configuring And Activating The Port .................................................................................................5
6. Network Layer Functions .....................................................................................................................7
7. Porting The Z8530 Driver .....................................................................................................................8
8. Known Bugs And Assumptions ............................................................................................................9
9. Public Functions Provided ..................................................................................................................10
z8530_interrupt ................................................................................................................................10
z8530_sync_open.............................................................................................................................10
z8530_sync_close ............................................................................................................................11
z8530_sync_dma_open ....................................................................................................................12
z8530_sync_dma_close ...................................................................................................................13
z8530_sync_txdma_open.................................................................................................................13
z8530_sync_txdma_close ................................................................................................................14
z8530_describe.................................................................................................................................15
z8530_init.........................................................................................................................................16
z8530_shutdown ..............................................................................................................................17
z8530_channel_load.........................................................................................................................18
z8530_null_rx ..................................................................................................................................18
z8530_queue_xmit ...........................................................................................................................19
10. Internal Functions .............................................................................................................................21
z8530_read_port...............................................................................................................................21
z8530_write_port .............................................................................................................................21
read_zsreg ........................................................................................................................................22
read_zsdata.......................................................................................................................................23
write_zsreg .......................................................................................................................................24
write_zsctrl.......................................................................................................................................25
write_zsdata .....................................................................................................................................25
z8530_flush_fifo...............................................................................................................................26
z8530_rtsdtr .....................................................................................................................................27
z8530_rx...........................................................................................................................................28
z8530_tx...........................................................................................................................................29
z8530_status.....................................................................................................................................30
z8530_dma_rx..................................................................................................................................30
z8530_dma_tx ..................................................................................................................................31
z8530_dma_status ............................................................................................................................32
z8530_rx_clear.................................................................................................................................33
z8530_tx_clear .................................................................................................................................33
z8530_status_clear ...........................................................................................................................34
z8530_tx_begin ................................................................................................................................35
z8530_tx_done .................................................................................................................................36
z8530_rx_done.................................................................................................................................36
iii
spans_boundary................................................................................................................................37
iv
Chapter 1. Introduction
The Z85x30 family synchronous/asynchronous controller chips are used on a large number of cheap
network interface cards. The kernel provides a core interface layer that is designed to make it easy to
provide WAN services using this chip.
The current driver only support synchronous operation. Merging the asynchronous driver support into
this code to allow any Z85x30 device to be used as both a tty interface and as a synchronous controller is
a project for Linux post the 2.4 release
1
Zgłoś jeśli naruszono regulamin