summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2013-08-30 07:26:08 +0200
committerMichal Simek <michal.simek@xilinx.com>2014-05-14 07:43:34 +0200
commit2da7a745b6d24eec7be30e7d11ca456d445e30c3 (patch)
treef1c90923e8854936c2dbc2e8d26c938fa00cfc5d /arch/arm
parent6e04769caf208a9f2da8ef8a85353def2a170176 (diff)
downloadu-boot-imx-2da7a745b6d24eec7be30e7d11ca456d445e30c3.zip
u-boot-imx-2da7a745b6d24eec7be30e7d11ca456d445e30c3.tar.gz
u-boot-imx-2da7a745b6d24eec7be30e7d11ca456d445e30c3.tar.bz2
ARM: zynq: Setup correct slcr_lock value
The driver should setup slcr state according to slcr operations. Reported-by: Andrey Filippov <andrey@elphel.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/zynq/slcr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/zynq/slcr.c b/arch/arm/cpu/armv7/zynq/slcr.c
index 1ff1eac..5ba58fa 100644
--- a/arch/arm/cpu/armv7/zynq/slcr.c
+++ b/arch/arm/cpu/armv7/zynq/slcr.c
@@ -21,14 +21,18 @@ static int slcr_lock = 1; /* 1 means locked, 0 means unlocked */
void zynq_slcr_lock(void)
{
- if (!slcr_lock)
+ if (!slcr_lock) {
writel(SLCR_LOCK_MAGIC, &slcr_base->slcr_lock);
+ slcr_lock = 1;
+ }
}
void zynq_slcr_unlock(void)
{
- if (slcr_lock)
+ if (slcr_lock) {
writel(SLCR_UNLOCK_MAGIC, &slcr_base->slcr_unlock);
+ slcr_lock = 0;
+ }
}
/* Reset the entire system */