sim: bfin: constify dmac pmap arrays
[deliverable/binutils-gdb.git] / sim / bfin / dv-bfin_emac.h
CommitLineData
ef016f83
MF
1/* Blackfin Ethernet Media Access Controller (EMAC) model.
2
3 Copyright (C) 2010-2011 Free Software Foundation, Inc.
4 Contributed by Analog Devices, Inc.
5
6 This file is part of simulators.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21#ifndef DV_BFIN_EMAC_H
22#define DV_BFIN_EMAC_H
23
24#define BFIN_MMR_EMAC_BASE 0xFFC03000
25#define BFIN_MMR_EMAC_SIZE 0x200
26
27/* EMAC_OPMODE Masks */
28#define RE (1 << 0)
29#define ASTP (1 << 1)
30#define PR (1 << 7)
31#define TE (1 << 16)
32
33/* EMAC_STAADD Masks */
34#define STABUSY (1 << 0)
35#define STAOP (1 << 1)
36#define STADISPRE (1 << 2)
37#define STAIE (1 << 3)
38#define REGAD_SHIFT 6
39#define REGAD_MASK (0x1f << REGAD_SHIFT)
40#define REGAD(val) (((val) & REGAD_MASK) >> REGAD_SHIFT)
41#define PHYAD_SHIFT 11
42#define PHYAD_MASK (0x1f << PHYAD_SHIFT)
43#define PHYAD(val) (((val) & PHYAD_MASK) >> PHYAD_SHIFT)
44
45/* EMAC_SYSCTL Masks */
46#define PHYIE (1 << 0)
47#define RXDWA (1 << 1)
48#define RXCKS (1 << 2)
49#define TXDWA (1 << 4)
50
51/* EMAC_RX_STAT Masks */
52#define RX_FRLEN 0x7ff
53#define RX_COMP (1 << 12)
54#define RX_OK (1 << 13)
55#define RX_ACCEPT (1 << 31)
56
57/* EMAC_TX_STAT Masks */
58#define TX_COMP (1 << 0)
59#define TX_OK (1 << 1)
60
61#endif
This page took 0.032336 seconds and 4 git commands to generate.