2 * Faraday FTGMAC100 Gigabit Ethernet
4 * Copyright (C) 2016-2017, IBM Corporation.
6 * This code is licensed under the GPL version 2 or later. See the
7 * COPYING file in the top-level directory.
12 #include "qom/object.h"
14 #define TYPE_FTGMAC100 "ftgmac100"
15 OBJECT_DECLARE_SIMPLE_TYPE(FTGMAC100State
, FTGMAC100
)
17 #define FTGMAC100_MEM_SIZE 0x1000
18 #define FTGMAC100_REG_MEM_SIZE 0x100
19 #define FTGMAC100_REG_HIGH_MEM_SIZE 0x100
20 #define FTGMAC100_REG_HIGH_OFFSET 0x100
22 #include "hw/sysbus.h"
26 * Max frame size for the receiving buffer
28 #define FTGMAC100_MAX_FRAME_SIZE 9220
30 struct FTGMAC100State
{
32 SysBusDevice parent_obj
;
38 MemoryRegion iomem_container
;
40 MemoryRegion iomem_high
;
42 uint8_t frame
[FTGMAC100_MAX_FRAME_SIZE
];
61 uint64_t rx_descriptor
;
63 uint64_t tx_descriptor
;
67 uint32_t phy_advertise
;
69 uint32_t phy_int_mask
;
72 uint32_t txdes0_edotr
;
73 uint32_t rxdes0_edorr
;
77 #define TYPE_ASPEED_MII "aspeed-mmi"
78 OBJECT_DECLARE_SIMPLE_TYPE(AspeedMiiState
, ASPEED_MII
)
81 * AST2600 MII controller
83 struct AspeedMiiState
{
85 SysBusDevice parent_obj
;