![]() |
|
|||
0001 // SPDX-License-Identifier: GPL-2.0-or-later 0002 /* 0003 * Copyright 2012 Freescale Semiconductor, Inc. 0004 */ 0005 0006 #include <linux/err.h> 0007 #include <linux/io.h> 0008 #include <linux/jiffies.h> 0009 #include <linux/spinlock.h> 0010 #include "clk.h" 0011 0012 DEFINE_SPINLOCK(mxs_lock); 0013 0014 int mxs_clk_wait(void __iomem *reg, u8 shift) 0015 { 0016 unsigned long timeout = jiffies + msecs_to_jiffies(10); 0017 0018 while (readl_relaxed(reg) & (1 << shift)) 0019 if (time_after(jiffies, timeout)) 0020 return -ETIMEDOUT; 0021 0022 return 0; 0023 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |