Resync with broadcom drivers 5.100.138.20 and utilities.
[tomato.git] / release / src-rt / include / sbhndpio.h
blob1af8f71e942b8266e22b1b39c544214468083071
1 /*
2 * Generic Broadcom Home Networking Division (HND) PIO engine HW interface
3 * This supports the following chips: BCM42xx, 44xx, 47xx .
5 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
6 *
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: sbhndpio.h,v 13.2 2005-06-21 18:01:47 Exp $
21 #ifndef _sbhndpio_h_
22 #define _sbhndpio_h_
24 /* PIO structure,
25 * support two PIO format: 2 bytes access and 4 bytes access
26 * basic FIFO register set is per channel(transmit or receive)
27 * a pair of channels is defined for convenience
30 /* 2byte-wide pio register set per channel(xmt or rcv) */
31 typedef volatile struct {
32 uint16 fifocontrol;
33 uint16 fifodata;
34 uint16 fifofree; /* only valid in xmt channel, not in rcv channel */
35 uint16 PAD;
36 } pio2regs_t;
38 /* a pair of pio channels(tx and rx) */
39 typedef volatile struct {
40 pio2regs_t tx;
41 pio2regs_t rx;
42 } pio2regp_t;
44 /* 4byte-wide pio register set per channel(xmt or rcv) */
45 typedef volatile struct {
46 uint32 fifocontrol;
47 uint32 fifodata;
48 } pio4regs_t;
50 /* a pair of pio channels(tx and rx) */
51 typedef volatile struct {
52 pio4regs_t tx;
53 pio4regs_t rx;
54 } pio4regp_t;
56 #endif /* _sbhndpio_h_ */