Skip to content
Snippets Groups Projects
Commit 2da7a745 authored by Michal Simek's avatar Michal Simek
Browse files

ARM: zynq: Setup correct slcr_lock value


The driver should setup slcr state according
to slcr operations.

Reported-by: default avatarAndrey Filippov <andrey@elphel.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 6e04769c
No related branches found
No related tags found
No related merge requests found
...@@ -21,14 +21,18 @@ static int slcr_lock = 1; /* 1 means locked, 0 means unlocked */ ...@@ -21,14 +21,18 @@ static int slcr_lock = 1; /* 1 means locked, 0 means unlocked */
void zynq_slcr_lock(void) void zynq_slcr_lock(void)
{ {
if (!slcr_lock) if (!slcr_lock) {
writel(SLCR_LOCK_MAGIC, &slcr_base->slcr_lock); writel(SLCR_LOCK_MAGIC, &slcr_base->slcr_lock);
slcr_lock = 1;
}
} }
void zynq_slcr_unlock(void) void zynq_slcr_unlock(void)
{ {
if (slcr_lock) if (slcr_lock) {
writel(SLCR_UNLOCK_MAGIC, &slcr_base->slcr_unlock); writel(SLCR_UNLOCK_MAGIC, &slcr_base->slcr_unlock);
slcr_lock = 0;
}
} }
/* Reset the entire system */ /* Reset the entire system */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment