diff options
author | Tom Rini <trini@konsulko.com> | 2019-10-25 11:23:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-25 11:23:46 -0400 |
commit | e382713d224d6fc14cf8fe8f6bb852f24ab652a7 (patch) | |
tree | 132e3dcd8c2ab9ae7b7e5e114216f0f52b13766c /drivers/crypto/rsa_mod_exp/mod_exp_uclass.c | |
parent | 17fd9915a4c639381804ed28274fa136ae3b0bee (diff) | |
parent | 3ad95ed6f87de048861ea8b9c3ab9a77e548d7b1 (diff) |
Merge tag 'xilinx-for-v2020.01-part2' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx/FPGA changes for v2020.01 part 2
common:
- Fix manual relocation for repeatable commands
arm:
- Also clean up generated dtbos
microblaze:
- Add support for Manual relocation in crypto framework
- Tune and align architecture bootm support
zynq:
- DT sync ups
- Some defconfig updates
- Remove empty board_early_init_f()
zynqmp:
- Clean firmware handing via drivers/firmware/
- DT/defconfig name alignments
- DT cleanups with using firmware based clock driver
- Some defconfig updates
- Add IIO ina226 DT description
- Tune zynqmp_psu_init_minimalize.sh script
- Add single nand mini configuration, e-a2197, m-a2197-02/03 and zcu216
versal:
- Clean firmware handing via drivers/firmware/
- Add gpio support
- Enable DT overlay/USB/CLK/FPGA
- DT updates
- Tune mini configuration
spi:
- gqspi - Remove unused headers
Diffstat (limited to 'drivers/crypto/rsa_mod_exp/mod_exp_uclass.c')
-rw-r--r-- | drivers/crypto/rsa_mod_exp/mod_exp_uclass.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c index 93deaa7f51e..e91fe644580 100644 --- a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c +++ b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c @@ -13,10 +13,23 @@ #include <asm/io.h> #include <linux/list.h> +#if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC) +DECLARE_GLOBAL_DATA_PTR; +#endif + int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, struct key_prop *node, uint8_t *out) { - const struct mod_exp_ops *ops = device_get_ops(dev); + struct mod_exp_ops *ops = (struct mod_exp_ops *)device_get_ops(dev); + +#if !defined(USE_HOSTCC) && defined(CONFIG_NEEDS_MANUAL_RELOC) + static bool done; + + if (!done) { + done = true; + ops->mod_exp += gd->reloc_off; + } +#endif if (!ops->mod_exp) return -ENOSYS; |