1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014 Freescale Semiconductor, Inc
4 * Author: Ruchika Gupta <ruchika.gupta@freescale.com>
9 #include <u-boot/rsa-mod-exp.h>
14 #include <linux/list.h>
16 #if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC)
17 DECLARE_GLOBAL_DATA_PTR;
20 int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len,
21 struct key_prop *node, uint8_t *out)
23 struct mod_exp_ops *ops = (struct mod_exp_ops *)device_get_ops(dev);
25 #if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC)
30 ops->mod_exp += gd->reloc_off;
37 return ops->mod_exp(dev, sig, sig_len, node, out);
40 UCLASS_DRIVER(mod_exp) = {
42 .name = "rsa_mod_exp",