mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
drm/msm: move msm_readl/_writel to msm_drv.h
With the reglog removal, msm_readl/_writel became single line wrappers around readl/writel. Move those two wrappers and msm_rmw to msm_drv.h to remove need for extra function calls when doing register writes. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220105232700.444170-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
c0e745d73a
commit
3f4a80cbf9
|
|
@ -164,26 +164,6 @@ void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name,
|
|||
return _msm_ioremap(pdev, name, false, psize);
|
||||
}
|
||||
|
||||
void msm_writel(u32 data, void __iomem *addr)
|
||||
{
|
||||
writel(data, addr);
|
||||
}
|
||||
|
||||
u32 msm_readl(const void __iomem *addr)
|
||||
{
|
||||
u32 val = readl(addr);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void msm_rmw(void __iomem *addr, u32 mask, u32 or)
|
||||
{
|
||||
u32 val = msm_readl(addr);
|
||||
|
||||
val &= ~mask;
|
||||
msm_writel(val | or, addr);
|
||||
}
|
||||
|
||||
static enum hrtimer_restart msm_hrtimer_worktimer(struct hrtimer *t)
|
||||
{
|
||||
struct msm_hrtimer_work *work = container_of(t,
|
||||
|
|
|
|||
|
|
@ -484,9 +484,17 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name);
|
|||
void __iomem *msm_ioremap_size(struct platform_device *pdev, const char *name,
|
||||
phys_addr_t *size);
|
||||
void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name);
|
||||
void msm_writel(u32 data, void __iomem *addr);
|
||||
u32 msm_readl(const void __iomem *addr);
|
||||
void msm_rmw(void __iomem *addr, u32 mask, u32 or);
|
||||
|
||||
#define msm_writel(data, addr) writel((data), (addr))
|
||||
#define msm_readl(addr) readl((addr))
|
||||
|
||||
static inline void msm_rmw(void __iomem *addr, u32 mask, u32 or)
|
||||
{
|
||||
u32 val = msm_readl(addr);
|
||||
|
||||
val &= ~mask;
|
||||
msm_writel(val | or, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct msm_hrtimer_work - a helper to combine an hrtimer with kthread_work
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user