2 * Milkymist VJ SoC (Software)
3 * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef __HW_MINIMAC_H
19 #define __HW_MINIMAC_H
21 #include <hw/common.h>
23 #define CSR_MINIMAC_SETUP MMPTR(0x80009000)
25 #define MINIMAC_SETUP_SPEED10 (0x1)
26 #define MINIMAC_SETUP_PROMISC (0x2)
28 #define CSR_MINIMAC_ADDRHI MMPTR(0x80009004)
29 #define CSR_MINIMAC_ADDRLO MMPTR(0x80009008)
31 #define CSR_MINIMAC_MDIO MMPTR(0x8000900C)
33 #define MINIMAC_MDIO_DO (0x1)
34 #define MINIMAC_MDIO_DI (0x2)
35 #define MINIMAC_MDIO_OE (0x4)
36 #define MINIMAC_MDIO_CLK (0x8)
38 #define CSR_MINIMAC_STATE0 MMPTR(0x80009010)
39 #define CSR_MINIMAC_ADDR0 MMPTR(0x80009014)
40 #define CSR_MINIMAC_COUNT0 MMPTR(0x80009018)
41 #define CSR_MINIMAC_STATE1 MMPTR(0x8000901C)
42 #define CSR_MINIMAC_ADDR1 MMPTR(0x80009020)
43 #define CSR_MINIMAC_COUNT1 MMPTR(0x80009024)
44 #define CSR_MINIMAC_STATE2 MMPTR(0x80009028)
45 #define CSR_MINIMAC_ADDR2 MMPTR(0x8000902C)
46 #define CSR_MINIMAC_COUNT2 MMPTR(0x80009030)
47 #define CSR_MINIMAC_STATE3 MMPTR(0x80009034)
48 #define CSR_MINIMAC_ADDR3 MMPTR(0x80009038)
49 #define CSR_MINIMAC_COUNT3 MMPTR(0x8000903C)
51 #define MINIMAC_STATE_EMPTY (0x0)
52 #define MINIMAC_STATE_LOADED (0x1)
53 #define MINIMAC_STATE_PENDING (0x2)
55 #define CSR_MINIMAC_TXADR MMPTR(0x80009040)
56 #define CSR_MINIMAC_TXREMAINING MMPTR(0x80009044)
58 #endif /* __HW_MINIMAC_H */