diff options
author | Jamin Lin <jamin_lin@aspeedtech.com> | 2025-02-25 15:56:19 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-03-09 14:36:52 +0100 |
commit | 393c908afb39df5ca44b67edf3acb16bb8835cf7 (patch) | |
tree | 7ad3f2f6174109fe4242b990822e9589d7b83609 | |
parent | cde8182b8772fc35dc44cd688166c59e7b9c9530 (diff) | |
download | qemu-393c908afb39df5ca44b67edf3acb16bb8835cf7.zip qemu-393c908afb39df5ca44b67edf3acb16bb8835cf7.tar.gz qemu-393c908afb39df5ca44b67edf3acb16bb8835cf7.tar.bz2 |
hw/misc/aspeed_hace: Add AST2700 support
Introduce a new ast2700 class to support AST2700.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Link: https://lore.kernel.org/qemu-devel/20250225075622.305515-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
-rw-r--r-- | hw/misc/aspeed_hace.c | 20 | ||||
-rw-r--r-- | include/hw/misc/aspeed_hace.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index 18b8508..86422cb 100644 --- a/hw/misc/aspeed_hace.c +++ b/hw/misc/aspeed_hace.c @@ -552,12 +552,32 @@ static const TypeInfo aspeed_ast1030_hace_info = { .class_init = aspeed_ast1030_hace_class_init, }; +static void aspeed_ast2700_hace_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + AspeedHACEClass *ahc = ASPEED_HACE_CLASS(klass); + + dc->desc = "AST2700 Hash and Crypto Engine"; + + ahc->src_mask = 0x7FFFFFFF; + ahc->dest_mask = 0x7FFFFFF8; + ahc->key_mask = 0x7FFFFFF8; + ahc->hash_mask = 0x00147FFF; +} + +static const TypeInfo aspeed_ast2700_hace_info = { + .name = TYPE_ASPEED_AST2700_HACE, + .parent = TYPE_ASPEED_HACE, + .class_init = aspeed_ast2700_hace_class_init, +}; + static void aspeed_hace_register_types(void) { type_register_static(&aspeed_ast2400_hace_info); type_register_static(&aspeed_ast2500_hace_info); type_register_static(&aspeed_ast2600_hace_info); type_register_static(&aspeed_ast1030_hace_info); + type_register_static(&aspeed_ast2700_hace_info); type_register_static(&aspeed_hace_info); } diff --git a/include/hw/misc/aspeed_hace.h b/include/hw/misc/aspeed_hace.h index 4af9919..d13fd3d 100644 --- a/include/hw/misc/aspeed_hace.h +++ b/include/hw/misc/aspeed_hace.h @@ -18,6 +18,7 @@ #define TYPE_ASPEED_AST2500_HACE TYPE_ASPEED_HACE "-ast2500" #define TYPE_ASPEED_AST2600_HACE TYPE_ASPEED_HACE "-ast2600" #define TYPE_ASPEED_AST1030_HACE TYPE_ASPEED_HACE "-ast1030" +#define TYPE_ASPEED_AST2700_HACE TYPE_ASPEED_HACE "-ast2700" OBJECT_DECLARE_TYPE(AspeedHACEState, AspeedHACEClass, ASPEED_HACE) |