Skip to content

Commit 0efadfb

Browse files
konradybciolumag
authored andcommitted
drm/msm: Drop msm_read/writel
Totally useless. Signed-off-by: Konrad Dybcio <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/588804/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent b662ade commit 0efadfb

File tree

13 files changed

+42
-45
lines changed

13 files changed

+42
-45
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static void a6xx_rpmh_stop(struct a6xx_gmu *gmu)
507507

508508
static inline void pdc_write(void __iomem *ptr, u32 offset, u32 value)
509509
{
510-
msm_writel(value, ptr + (offset << 2));
510+
writel(value, ptr + (offset << 2));
511511
}
512512

513513
static void __iomem *a6xx_gmu_get_mmio(struct platform_device *pdev,

drivers/gpu/drm/msm/adreno/a6xx_gmu.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ struct a6xx_gmu {
103103

104104
static inline u32 gmu_read(struct a6xx_gmu *gmu, u32 offset)
105105
{
106-
return msm_readl(gmu->mmio + (offset << 2));
106+
return readl(gmu->mmio + (offset << 2));
107107
}
108108

109109
static inline void gmu_write(struct a6xx_gmu *gmu, u32 offset, u32 value)
110110
{
111-
msm_writel(value, gmu->mmio + (offset << 2));
111+
writel(value, gmu->mmio + (offset << 2));
112112
}
113113

114114
static inline void
@@ -131,8 +131,8 @@ static inline u64 gmu_read64(struct a6xx_gmu *gmu, u32 lo, u32 hi)
131131
{
132132
u64 val;
133133

134-
val = (u64) msm_readl(gmu->mmio + (lo << 2));
135-
val |= ((u64) msm_readl(gmu->mmio + (hi << 2)) << 32);
134+
val = (u64) readl(gmu->mmio + (lo << 2));
135+
val |= ((u64) readl(gmu->mmio + (hi << 2)) << 32);
136136

137137
return val;
138138
}
@@ -143,12 +143,12 @@ static inline u64 gmu_read64(struct a6xx_gmu *gmu, u32 lo, u32 hi)
143143

144144
static inline u32 gmu_read_rscc(struct a6xx_gmu *gmu, u32 offset)
145145
{
146-
return msm_readl(gmu->rscc + (offset << 2));
146+
return readl(gmu->rscc + (offset << 2));
147147
}
148148

149149
static inline void gmu_write_rscc(struct a6xx_gmu *gmu, u32 offset, u32 value)
150150
{
151-
msm_writel(value, gmu->rscc + (offset << 2));
151+
writel(value, gmu->rscc + (offset << 2));
152152
}
153153

154154
#define gmu_poll_timeout_rscc(gmu, addr, val, cond, interval, timeout) \

drivers/gpu/drm/msm/adreno/a6xx_gpu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ static inline void a6xx_llc_rmw(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 mask, u3
6969

7070
static inline u32 a6xx_llc_read(struct a6xx_gpu *a6xx_gpu, u32 reg)
7171
{
72-
return msm_readl(a6xx_gpu->llc_mmio + (reg << 2));
72+
return readl(a6xx_gpu->llc_mmio + (reg << 2));
7373
}
7474

7575
static inline void a6xx_llc_write(struct a6xx_gpu *a6xx_gpu, u32 reg, u32 value)
7676
{
77-
msm_writel(value, a6xx_gpu->llc_mmio + (reg << 2));
77+
writel(value, a6xx_gpu->llc_mmio + (reg << 2));
7878
}
7979

8080
#define shadowptr(_a6xx_gpu, _ring) ((_a6xx_gpu)->shadow_iova + \

drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ static int debugbus_read(struct msm_gpu *gpu, u32 block, u32 offset,
192192
}
193193

194194
#define cxdbg_write(ptr, offset, val) \
195-
msm_writel((val), (ptr) + ((offset) << 2))
195+
writel((val), (ptr) + ((offset) << 2))
196196

197197
#define cxdbg_read(ptr, offset) \
198-
msm_readl((ptr) + ((offset) << 2))
198+
readl((ptr) + ((offset) << 2))
199199

200200
/* read a value from the CX debug bus */
201201
static int cx_debugbus_read(void __iomem *cxdbg, u32 block, u32 offset,

drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ struct mdp4_kms {
4444

4545
static inline void mdp4_write(struct mdp4_kms *mdp4_kms, u32 reg, u32 data)
4646
{
47-
msm_writel(data, mdp4_kms->mmio + reg);
47+
writel(data, mdp4_kms->mmio + reg);
4848
}
4949

5050
static inline u32 mdp4_read(struct mdp4_kms *mdp4_kms, u32 reg)
5151
{
52-
return msm_readl(mdp4_kms->mmio + reg);
52+
return readl(mdp4_kms->mmio + reg);
5353
}
5454

5555
static inline uint32_t pipe2flush(enum mdp4_pipe pipe)

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ struct mdp5_encoder {
171171
static inline void mdp5_write(struct mdp5_kms *mdp5_kms, u32 reg, u32 data)
172172
{
173173
WARN_ON(mdp5_kms->enable_count <= 0);
174-
msm_writel(data, mdp5_kms->mmio + reg);
174+
writel(data, mdp5_kms->mmio + reg);
175175
}
176176

177177
static inline u32 mdp5_read(struct mdp5_kms *mdp5_kms, u32 reg)
178178
{
179179
WARN_ON(mdp5_kms->enable_count <= 0);
180-
return msm_readl(mdp5_kms->mmio + reg);
180+
return readl(mdp5_kms->mmio + reg);
181181
}
182182

183183
static inline const char *stage2name(enum mdp_mixer_stage_id stage)

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int dsi_get_version(const void __iomem *base, u32 *major, u32 *minor)
5555
* scratch register which we never touch)
5656
*/
5757

58-
ver = msm_readl(base + REG_DSI_VERSION);
58+
ver = readl(base + REG_DSI_VERSION);
5959
if (ver) {
6060
/* older dsi host, there is no register shift */
6161
ver = FIELD(ver, DSI_VERSION_MAJOR);
@@ -73,12 +73,12 @@ static int dsi_get_version(const void __iomem *base, u32 *major, u32 *minor)
7373
* registers are shifted down, read DSI_VERSION again with
7474
* the shifted offset
7575
*/
76-
ver = msm_readl(base + DSI_6G_REG_SHIFT + REG_DSI_VERSION);
76+
ver = readl(base + DSI_6G_REG_SHIFT + REG_DSI_VERSION);
7777
ver = FIELD(ver, DSI_VERSION_MAJOR);
7878
if (ver == MSM_DSI_VER_MAJOR_6G) {
7979
/* 6G version */
8080
*major = ver;
81-
*minor = msm_readl(base + REG_DSI_6G_HW_VERSION);
81+
*minor = readl(base + REG_DSI_6G_HW_VERSION);
8282
return 0;
8383
} else {
8484
return -EINVAL;
@@ -186,11 +186,11 @@ struct msm_dsi_host {
186186

187187
static inline u32 dsi_read(struct msm_dsi_host *msm_host, u32 reg)
188188
{
189-
return msm_readl(msm_host->ctrl_base + reg);
189+
return readl(msm_host->ctrl_base + reg);
190190
}
191191
static inline void dsi_write(struct msm_dsi_host *msm_host, u32 reg, u32 data)
192192
{
193-
msm_writel(data, msm_host->ctrl_base + reg);
193+
writel(data, msm_host->ctrl_base + reg);
194194
}
195195

196196
static const struct msm_dsi_cfg_handler *dsi_get_config(

drivers/gpu/drm/msm/dsi/phy/dsi_phy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
#include "dsi.h"
1414

15-
#define dsi_phy_read(offset) msm_readl((offset))
16-
#define dsi_phy_write(offset, data) msm_writel((data), (offset))
17-
#define dsi_phy_write_udelay(offset, data, delay_us) { msm_writel((data), (offset)); udelay(delay_us); }
18-
#define dsi_phy_write_ndelay(offset, data, delay_ns) { msm_writel((data), (offset)); ndelay(delay_ns); }
15+
#define dsi_phy_read(offset) readl((offset))
16+
#define dsi_phy_write(offset, data) writel((data), (offset))
17+
#define dsi_phy_write_udelay(offset, data, delay_us) { writel((data), (offset)); udelay(delay_us); }
18+
#define dsi_phy_write_ndelay(offset, data, delay_ns) { writel((data), (offset)); ndelay(delay_ns); }
1919

2020
struct msm_dsi_phy_ops {
2121
int (*pll_init)(struct msm_dsi_phy *phy);

drivers/gpu/drm/msm/hdmi/hdmi.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,17 @@ void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on);
115115

116116
static inline void hdmi_write(struct hdmi *hdmi, u32 reg, u32 data)
117117
{
118-
msm_writel(data, hdmi->mmio + reg);
118+
writel(data, hdmi->mmio + reg);
119119
}
120120

121121
static inline u32 hdmi_read(struct hdmi *hdmi, u32 reg)
122122
{
123-
return msm_readl(hdmi->mmio + reg);
123+
return readl(hdmi->mmio + reg);
124124
}
125125

126126
static inline u32 hdmi_qfprom_read(struct hdmi *hdmi, u32 reg)
127127
{
128-
return msm_readl(hdmi->qfprom_mmio + reg);
128+
return readl(hdmi->qfprom_mmio + reg);
129129
}
130130

131131
/*
@@ -166,12 +166,12 @@ struct hdmi_phy {
166166

167167
static inline void hdmi_phy_write(struct hdmi_phy *phy, u32 reg, u32 data)
168168
{
169-
msm_writel(data, phy->mmio + reg);
169+
writel(data, phy->mmio + reg);
170170
}
171171

172172
static inline u32 hdmi_phy_read(struct hdmi_phy *phy, u32 reg)
173173
{
174-
return msm_readl(phy->mmio + reg);
174+
return readl(phy->mmio + reg);
175175
}
176176

177177
int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy);

drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ static inline struct hdmi_phy *pll_get_phy(struct hdmi_pll_8996 *pll)
8686
static inline void hdmi_pll_write(struct hdmi_pll_8996 *pll, int offset,
8787
u32 data)
8888
{
89-
msm_writel(data, pll->mmio_qserdes_com + offset);
89+
writel(data, pll->mmio_qserdes_com + offset);
9090
}
9191

9292
static inline u32 hdmi_pll_read(struct hdmi_pll_8996 *pll, int offset)
9393
{
94-
return msm_readl(pll->mmio_qserdes_com + offset);
94+
return readl(pll->mmio_qserdes_com + offset);
9595
}
9696

9797
static inline void hdmi_tx_chan_write(struct hdmi_pll_8996 *pll, int channel,
9898
int offset, int data)
9999
{
100-
msm_writel(data, pll->mmio_qserdes_tx[channel] + offset);
100+
writel(data, pll->mmio_qserdes_tx[channel] + offset);
101101
}
102102

103103
static inline u32 pll_get_cpctrl(u64 frac_start, unsigned long ref_clk,

0 commit comments

Comments
 (0)