Commit c9f737c7 authored by Douglas Anderson's avatar Douglas Anderson Committed by Rob Clark

drm/msm: Use nvmem_cell_read_variable_le_u32() to read speed bin

Let's use the newly-added nvmem_cell_read_variable_le_u32() to future
proof ourselves a little bit.
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20210521134516.v2.1.Id496c6fea0cb92ff6ea8ef1faf5d468eb09465e3@changeidReviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 0710a740
...@@ -1724,10 +1724,10 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) ...@@ -1724,10 +1724,10 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse)
static int a6xx_set_supported_hw(struct device *dev, struct adreno_rev rev) static int a6xx_set_supported_hw(struct device *dev, struct adreno_rev rev)
{ {
u32 supp_hw = UINT_MAX; u32 supp_hw = UINT_MAX;
u16 speedbin; u32 speedbin;
int ret; int ret;
ret = nvmem_cell_read_u16(dev, "speed_bin", &speedbin); ret = nvmem_cell_read_variable_le_u32(dev, "speed_bin", &speedbin);
/* /*
* -ENOENT means that the platform doesn't support speedbin which is * -ENOENT means that the platform doesn't support speedbin which is
* fine * fine
...@@ -1740,7 +1740,6 @@ static int a6xx_set_supported_hw(struct device *dev, struct adreno_rev rev) ...@@ -1740,7 +1740,6 @@ static int a6xx_set_supported_hw(struct device *dev, struct adreno_rev rev)
ret); ret);
goto done; goto done;
} }
speedbin = le16_to_cpu(speedbin);
supp_hw = fuse_to_supp_hw(dev, rev, speedbin); supp_hw = fuse_to_supp_hw(dev, rev, speedbin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment