Skip to content

Commit

Permalink
soc: arm: xilinx_zynqmp: Use CMSIS-Core(R).
Browse files Browse the repository at this point in the history
This commit updates the 'xilinx_zynqmp' SoC initialisation code to use
the preliminary CMSIS-Core(R) implementation added in the PR zephyrproject-rtos#19964.

In addition, it also defines the Core IP revision value for the SoC as
specified in the Zynq UltraScale+ Device Technical Reference Manual.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
  • Loading branch information
stephanosio committed Nov 5, 2019
1 parent b90436d commit 6ac68f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions soc/arm/xilinx_zynqmp/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <device.h>
#include <init.h>

#include <arch/arm/cortex_r/cmsis.h>

/**
*
* @brief Perform basic hardware initialization
Expand All @@ -31,9 +33,7 @@ SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

void z_platform_init(void)
{
__asm__ volatile(
"mrc p15, 0, r0, c1, c0, 0;" /* SCTLR */
"bic r0, r0, #" TOSTR(HIVECS) ";" /* Vector table at 0 */
"mcr p15, 0, r0, c1, c0, 0;"
: : : "memory");
unsigned int sctlr = __get_SCTLR();
sctlr &= ~SCTLR_V_Msk;
__set_SCTLR(sctlr);
}
6 changes: 2 additions & 4 deletions soc/arm/xilinx_zynqmp/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#ifndef _BOARD__H_
#define _BOARD__H_

#include <misc/util.h>

#ifndef _ASMLANGUAGE

#include <device.h>
#include <misc/util.h>
/* Define CMSIS configurations */
#define __CR_REV 1U

#endif /* !_ASMLANGUAGE */

Expand Down

0 comments on commit 6ac68f5

Please sign in to comment.