Tomato-ND 1.21
[tomato.git] / release / src / include / sbhndpio.h
blob741186f9d9b63e053b93a004019b5c4db85debc0
1 /*
2 * Generic Broadcom Home Networking Division (HND) PIO engine HW interface
3 * This supports the following chips: BCM42xx, 44xx, 47xx .
5 * Copyright 2006, Broadcom Corporation
6 * All Rights Reserved.
7 *
8 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12 * $Id$
15 #ifndef _sbhndpio_h_
16 #define _sbhndpio_h_
18 /* PIO structure,
19 * support two PIO format: 2 bytes access and 4 bytes access
20 * basic FIFO register set is per channel(transmit or receive)
21 * a pair of channels is defined for convenience
24 /* 2byte-wide pio register set per channel(xmt or rcv) */
25 typedef volatile struct {
26 uint16 fifocontrol;
27 uint16 fifodata;
28 uint16 fifofree; /* only valid in xmt channel, not in rcv channel */
29 uint16 PAD;
30 } pio2regs_t;
32 /* a pair of pio channels(tx and rx) */
33 typedef volatile struct {
34 pio2regs_t tx;
35 pio2regs_t rx;
36 } pio2regp_t;
38 /* 4byte-wide pio register set per channel(xmt or rcv) */
39 typedef volatile struct {
40 uint32 fifocontrol;
41 uint32 fifodata;
42 } pio4regs_t;
44 /* a pair of pio channels(tx and rx) */
45 typedef volatile struct {
46 pio4regs_t tx;
47 pio4regs_t rx;
48 } pio4regp_t;
50 #endif /* _sbhndpio_h_ */