diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2021-11-30 19:33:57 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2022-01-05 12:22:03 +0300 |
commit | fc7220f0c4ed2ce7bc89f50c33f37e39b77e2690 (patch) | |
tree | adba3870a6e4c31b6cb096ea903da666cb3a174b /drivers | |
parent | f149ee4c36dd907de496ff1a370adcdea5cb17ce (diff) | |
download | u-boot-fc7220f0c4ed2ce7bc89f50c33f37e39b77e2690.tar.xz |
microblaze: branch to base vector address on reset
Current code assumes that the vector base address is always at 0x0.
However, this value is configurable for MicroBlaze using the
CONFIG_XILINX_MICROBLAZE0_VECTOR_BASE_ADDR Kconfig option. Update the
reset routines to branch to this location instead.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Link: https://lore.kernel.org/r/20211130163358.2531677-10-ovidiu.panait@windriver.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sysreset/sysreset_microblaze.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/sysreset/sysreset_microblaze.c b/drivers/sysreset/sysreset_microblaze.c index 514c95817f..83a7f77ac4 100644 --- a/drivers/sysreset/sysreset_microblaze.c +++ b/drivers/sysreset/sysreset_microblaze.c @@ -8,13 +8,15 @@ #include <errno.h> #include <sysreset.h> #include <linux/err.h> +#include <linux/stringify.h> static int microblaze_sysreset_request(struct udevice *dev, enum sysreset_t type) { puts("Microblaze soft reset sysreset\n"); - __asm__ __volatile__ (" mts rmsr, r0;" \ - "bra r0"); + __asm__ __volatile__ ( + "mts rmsr, r0;" \ + "brai " __stringify(CONFIG_XILINX_MICROBLAZE0_VECTOR_BASE_ADDR)); return -EINPROGRESS; } |