soc/amd/cezanne: enable crypto in psp_verstage

Enable RSA and SHA for cezanne since support has been added to the PSP.
Also picasso and cezanne have different enums definitions for
hash algorithm, so split that out into chipset.c.

BUG=b:187906425
TEST=boot guybrush, check cbmem -t and the logs

Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I725b0cac801ac0429f362a83aa58a8b9de158550
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55833
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
diff --git a/src/soc/amd/common/psp_verstage/vboot_crypto.c b/src/soc/amd/common/psp_verstage/vboot_crypto.c
index 3f7151a..581d924 100644
--- a/src/soc/amd/common/psp_verstage/vboot_crypto.c
+++ b/src/soc/amd/common/psp_verstage/vboot_crypto.c
@@ -21,13 +21,7 @@
 
 	sha_op_size_remaining = data_size;
 
-	if (hash_alg == VB2_HASH_SHA256) {
-		sha_op.SHAType = SHA_TYPE_256;
-		sha_op.DigestLen = 32;
-	} else if (hash_alg == VB2_HASH_SHA512) {
-		sha_op.SHAType = SHA_TYPE_512;
-		sha_op.DigestLen = 64;
-	} else {
+	if (platform_set_sha_op(hash_alg, &sha_op) != 0) {
 		printk(BIOS_INFO, "Unsupported hash_alg %d!\n", hash_alg);
 		return VB2_ERROR_EX_HWCRYPTO_UNSUPPORTED;
 	}