1 /* 2 * Generic Broadcom Home Networking Division (HND) PIO engine HW interface 3 * This supports the following chips: BCM42xx, 44xx, 47xx . 4 * 5 * Copyright (C) 2020, Broadcom. 6 * 7 * Unless you and Broadcom execute a separate written software license 8 * agreement governing use of this software, this software is licensed to you 9 * under the terms of the GNU General Public License version 2 (the "GPL"), 10 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 11 * following added to such license: 12 * 13 * As a special exception, the copyright holders of this software give you 14 * permission to link this software with independent modules, and to copy and 15 * distribute the resulting executable under terms of your choice, provided that 16 * you also meet, for each linked independent module, the terms and conditions of 17 * the license of that module. An independent module is a module which is not 18 * derived from this software. The special exception does not apply to any 19 * modifications of the software. 20 * 21 * 22 * <<Broadcom-WL-IPTag/Dual:>> 23 */ 24 25 #ifndef _sbhndpio_h_ 26 #define _sbhndpio_h_ 27 28 /* PIO structure, 29 * support two PIO format: 2 bytes access and 4 bytes access 30 * basic FIFO register set is per channel(transmit or receive) 31 * a pair of channels is defined for convenience 32 */ 33 34 /* 2byte-wide pio register set per channel(xmt or rcv) */ 35 typedef volatile struct { 36 uint16 fifocontrol; 37 uint16 fifodata; 38 uint16 fifofree; /* only valid in xmt channel, not in rcv channel */ 39 uint16 PAD; 40 } pio2regs_t; 41 42 /* a pair of pio channels(tx and rx) */ 43 typedef volatile struct { 44 pio2regs_t tx; 45 pio2regs_t rx; 46 } pio2regp_t; 47 48 /* 4byte-wide pio register set per channel(xmt or rcv) */ 49 typedef volatile struct { 50 uint32 fifocontrol; 51 uint32 fifodata; 52 } pio4regs_t; 53 54 /* a pair of pio channels(tx and rx) */ 55 typedef volatile struct { 56 pio4regs_t tx; 57 pio4regs_t rx; 58 } pio4regp_t; 59 60 #endif /* _sbhndpio_h_ */ 61