| 1 | /* |
| 2 | * ASPEED LTPI Controller |
| 3 | * |
| 4 | * Copyright (C) 2025 ASPEED Technology Inc. |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | #ifndef ASPEED_LTPI_H |
| 9 | #define ASPEED_LTPI_H |
| 10 | |
| 11 | #include "hw/core/sysbus.h" |
| 12 | |
| 13 | #define TYPE_ASPEED_LTPI "aspeed.ltpi-ctrl" |
| 14 | OBJECT_DECLARE_SIMPLE_TYPE(AspeedLTPIState, ASPEED_LTPI) |
| 15 | |
| 16 | #define ASPEED_LTPI_TOTAL_SIZE 0x900 |
| 17 | #define ASPEED_LTPI_CTRL_SIZE 0x200 |
| 18 | #define ASPEED_LTPI_PHY_SIZE 0x100 |
| 19 | #define ASPEED_LTPI_TOP_SIZE 0x100 |
| 20 | |
| 21 | struct AspeedLTPIState { |
| 22 | SysBusDevice parent; |
| 23 | MemoryRegion mmio; |
| 24 | MemoryRegion mmio_ctrl; |
| 25 | MemoryRegion mmio_phy; |
| 26 | MemoryRegion mmio_top; |
| 27 | |
| 28 | uint32_t ctrl_regs[ASPEED_LTPI_CTRL_SIZE >> 2]; |
| 29 | uint32_t phy_regs[ASPEED_LTPI_PHY_SIZE >> 2]; |
| 30 | uint32_t top_regs[ASPEED_LTPI_TOP_SIZE >> 2]; |
| 31 | }; |
| 32 | |
| 33 | #endif /* ASPEED_LTPI_H */ |