mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
ARM: uniphier: add sg_set_iectrl() function
This helper function would be useful for new SoCs with per-pin input enable controlling, such as PH1-LD20, PH1-LD11, etc. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
fc26b7b91d
commit
c8cc7213a5
1 changed files with 11 additions and 0 deletions
|
@ -115,6 +115,17 @@ static inline void sg_set_pinsel(unsigned pin, unsigned muxval,
|
||||||
writel(tmp, reg);
|
writel(tmp, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void sg_set_iectrl(unsigned pin)
|
||||||
|
{
|
||||||
|
unsigned bit = pin % 32;
|
||||||
|
unsigned long reg = SG_IECTRL + pin / 32 * 4;
|
||||||
|
u32 tmp;
|
||||||
|
|
||||||
|
tmp = readl(reg);
|
||||||
|
tmp |= 1 << bit;
|
||||||
|
writel(tmp, reg);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* ARCH_SG_REGS_H */
|
#endif /* ARCH_SG_REGS_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue