2 * ASPEED Hash and Crypto Engine
4 * Copyright (C) 2021 IBM Corp.
6 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "hw/sysbus.h"
14 #define TYPE_ASPEED_HACE "aspeed.hace"
15 #define TYPE_ASPEED_AST2400_HACE TYPE_ASPEED_HACE "-ast2400"
16 #define TYPE_ASPEED_AST2500_HACE TYPE_ASPEED_HACE "-ast2500"
17 #define TYPE_ASPEED_AST2600_HACE TYPE_ASPEED_HACE "-ast2600"
18 #define TYPE_ASPEED_AST1030_HACE TYPE_ASPEED_HACE "-ast1030"
20 OBJECT_DECLARE_TYPE(AspeedHACEState
, AspeedHACEClass
, ASPEED_HACE
)
22 #define ASPEED_HACE_NR_REGS (0x64 >> 2)
23 #define ASPEED_HACE_MAX_SG 256 /* max number of entries */
25 struct AspeedHACEState
{
31 struct iovec iov_cache
[ASPEED_HACE_MAX_SG
];
32 uint32_t regs
[ASPEED_HACE_NR_REGS
];
33 uint32_t total_req_len
;
36 MemoryRegion
*dram_mr
;
41 struct AspeedHACEClass
{
42 SysBusDeviceClass parent_class
;
50 #endif /* ASPEED_HACE_H */