mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 18:22:02 +02:00
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>
This commit is contained in:
committed by
Michal Simek
parent
f149ee4c36
commit
fc7220f0c4
@@ -12,6 +12,7 @@
|
|||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/u-boot.h>
|
#include <asm/u-boot.h>
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
bool boot_linux;
|
bool boot_linux;
|
||||||
|
|
||||||
@@ -54,8 +55,9 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("mts rmsr, r0;" \
|
__asm__ __volatile__ (
|
||||||
"bra r0");
|
"mts rmsr, r0;" \
|
||||||
|
"brai " __stringify(CONFIG_XILINX_MICROBLAZE0_VECTOR_BASE_ADDR));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -8,13 +8,15 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sysreset.h>
|
#include <sysreset.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
static int microblaze_sysreset_request(struct udevice *dev,
|
static int microblaze_sysreset_request(struct udevice *dev,
|
||||||
enum sysreset_t type)
|
enum sysreset_t type)
|
||||||
{
|
{
|
||||||
puts("Microblaze soft reset sysreset\n");
|
puts("Microblaze soft reset sysreset\n");
|
||||||
__asm__ __volatile__ (" mts rmsr, r0;" \
|
__asm__ __volatile__ (
|
||||||
"bra r0");
|
"mts rmsr, r0;" \
|
||||||
|
"brai " __stringify(CONFIG_XILINX_MICROBLAZE0_VECTOR_BASE_ADDR));
|
||||||
|
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user