2 * IXP2000 MSF network device driver
3 * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org>
4 * Dedicated to Marija Kulikova.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #ifndef __IXPDEV_PRIV_H
13 #define __IXPDEV_PRIV_H
15 #define RX_BUF_DESC_BASE 0x00001000
16 #define RX_BUF_COUNT ((3 * PAGE_SIZE) / (4 * sizeof(struct ixpdev_rx_desc)))
17 #define TX_BUF_DESC_BASE 0x00002000
18 #define TX_BUF_COUNT ((3 * PAGE_SIZE) / (4 * sizeof(struct ixpdev_tx_desc)))
19 #define TX_BUF_COUNT_PER_CHAN (TX_BUF_COUNT / 4)
21 #define RING_RX_PENDING ((u32 *)IXP2000_SCRATCH_RING_VIRT_BASE)
22 #define RING_RX_DONE ((u32 *)(IXP2000_SCRATCH_RING_VIRT_BASE + 4))
23 #define RING_TX_PENDING ((u32 *)(IXP2000_SCRATCH_RING_VIRT_BASE + 8))
24 #define RING_TX_DONE ((u32 *)(IXP2000_SCRATCH_RING_VIRT_BASE + 12))
26 #define SCRATCH_REG(x) ((u32 *)(IXP2000_GLOBAL_REG_VIRT_BASE | 0x0800 | (x)))
27 #define RING_RX_PENDING_BASE SCRATCH_REG(0x00)
28 #define RING_RX_PENDING_HEAD SCRATCH_REG(0x04)
29 #define RING_RX_PENDING_TAIL SCRATCH_REG(0x08)
30 #define RING_RX_DONE_BASE SCRATCH_REG(0x10)
31 #define RING_RX_DONE_HEAD SCRATCH_REG(0x14)
32 #define RING_RX_DONE_TAIL SCRATCH_REG(0x18)
33 #define RING_TX_PENDING_BASE SCRATCH_REG(0x20)
34 #define RING_TX_PENDING_HEAD SCRATCH_REG(0x24)
35 #define RING_TX_PENDING_TAIL SCRATCH_REG(0x28)
36 #define RING_TX_DONE_BASE SCRATCH_REG(0x30)
37 #define RING_TX_DONE_HEAD SCRATCH_REG(0x34)
38 #define RING_TX_DONE_TAIL SCRATCH_REG(0x38)
This page took 0.032957 seconds and 5 git commands to generate.