From: Michal Simek Date: Fri, 30 Aug 2013 05:26:08 +0000 (+0200) Subject: ARM: zynq: Setup correct slcr_lock value X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=2da7a745b6d24eec7be30e7d11ca456d445e30c3;p=u-boot.git ARM: zynq: Setup correct slcr_lock value The driver should setup slcr state according to slcr operations. Reported-by: Andrey Filippov Signed-off-by: Michal Simek --- diff --git a/arch/arm/cpu/armv7/zynq/slcr.c b/arch/arm/cpu/armv7/zynq/slcr.c index 1ff1eac06f..5ba58fad16 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 */