diff options
author | Jagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com> | 2014-01-09 01:48:21 +0530 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-01-10 15:18:33 +0100 |
commit | b3de92495f23db58a2643fb9328edacbf9a17f1c (patch) | |
tree | 8c19a291bffd9b22576f7c50124c6e99a2fbe0c7 /arch/arm/cpu/armv7/zynq | |
parent | fe5eddbf9818ba857d0d7f5e849b5682c9717b74 (diff) | |
download | u-boot-imx-b3de92495f23db58a2643fb9328edacbf9a17f1c.zip u-boot-imx-b3de92495f23db58a2643fb9328edacbf9a17f1c.tar.gz u-boot-imx-b3de92495f23db58a2643fb9328edacbf9a17f1c.tar.bz2 |
zynq: Add support to find bootmode
Added support to find the bootmodes by reading
slcr bootmode register. this can be helpful to
autoboot the configurations w.r.t a specified bootmode.
Added this functionality on board_late_init as it's not
needed for normal initializtion part.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Diffstat (limited to 'arch/arm/cpu/armv7/zynq')
-rw-r--r-- | arch/arm/cpu/armv7/zynq/slcr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/zynq/slcr.c b/arch/arm/cpu/armv7/zynq/slcr.c index 717ec65..b4c11c3 100644 --- a/arch/arm/cpu/armv7/zynq/slcr.c +++ b/arch/arm/cpu/armv7/zynq/slcr.c @@ -101,6 +101,12 @@ void zynq_slcr_devcfg_enable(void) zynq_slcr_lock(); } +u32 zynq_slcr_get_boot_mode(void) +{ + /* Get the bootmode register value */ + return readl(&slcr_base->boot_mode); +} + u32 zynq_slcr_get_idcode(void) { return (readl(&slcr_base->pss_idcode) & SLCR_IDCODE_MASK) >> |