1 /*
2  * (C) Copyright 2014 Freescale Semiconductor, Inc
3  * Author: Ruchika Gupta <ruchika.gupta@freescale.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <dm.h>
10 #include <u-boot/rsa-mod-exp.h>
11 #include <errno.h>
12 #include <fdtdec.h>
13 #include <malloc.h>
14 #include <asm/io.h>
15 #include <linux/list.h>
16 
17 int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len,
18 		struct key_prop *node, uint8_t *out)
19 {
20 	const struct mod_exp_ops *ops = device_get_ops(dev);
21 
22 	if (!ops->mod_exp)
23 		return -ENOSYS;
24 
25 	return ops->mod_exp(dev, sig, sig_len, node, out);
26 }
27 
28 UCLASS_DRIVER(mod_exp) = {
29 	.id		= UCLASS_MOD_EXP,
30 	.name		= "rsa_mod_exp",
31 };
32