mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
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>
This commit is contained in:
parent
6e04769caf
commit
2da7a745b6
1 changed files with 6 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue