summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:06 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:07 +1000
commit266f8b5ee6e98979f3251efc81451a2a2cbf2a28 (patch)
tree560205371034f8c3f8d56f9c28eff35a40ea0aaa /drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
parent3eca809b3c05ea6918c1d13da478abdae5e712ba (diff)
downloadop-kernel-dev-266f8b5ee6e98979f3251efc81451a2a2cbf2a28.zip
op-kernel-dev-266f8b5ee6e98979f3251efc81451a2a2cbf2a28.tar.gz
drm/nouveau/devinit: cosmetic changes
This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
index 6a3e8d4..ffe3828 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
@@ -31,8 +31,8 @@
int
gt215_devinit_pll_set(struct nvkm_devinit *devinit, u32 type, u32 freq)
{
- struct nv50_devinit_priv *priv = (void *)devinit;
- struct nvkm_bios *bios = nvkm_bios(priv);
+ struct nv50_devinit *init = (void *)devinit;
+ struct nvkm_bios *bios = nvkm_bios(init);
struct nvbios_pll info;
int N, fN, M, P;
int ret;
@@ -48,13 +48,13 @@ gt215_devinit_pll_set(struct nvkm_devinit *devinit, u32 type, u32 freq)
switch (info.type) {
case PLL_VPLL0:
case PLL_VPLL1:
- nv_wr32(priv, info.reg + 0, 0x50000610);
- nv_mask(priv, info.reg + 4, 0x003fffff,
+ nv_wr32(init, info.reg + 0, 0x50000610);
+ nv_mask(init, info.reg + 4, 0x003fffff,
(P << 16) | (M << 8) | N);
- nv_wr32(priv, info.reg + 8, fN);
+ nv_wr32(init, info.reg + 8, fN);
break;
default:
- nv_warn(priv, "0x%08x/%dKhz unimplemented\n", type, freq);
+ nv_warn(init, "0x%08x/%dKhz unimplemented\n", type, freq);
ret = -EINVAL;
break;
}
@@ -65,9 +65,9 @@ gt215_devinit_pll_set(struct nvkm_devinit *devinit, u32 type, u32 freq)
static u64
gt215_devinit_disable(struct nvkm_devinit *devinit)
{
- struct nv50_devinit_priv *priv = (void *)devinit;
- u32 r001540 = nv_rd32(priv, 0x001540);
- u32 r00154c = nv_rd32(priv, 0x00154c);
+ struct nv50_devinit *init = (void *)devinit;
+ u32 r001540 = nv_rd32(init, 0x001540);
+ u32 r00154c = nv_rd32(init, 0x00154c);
u64 disable = 0ULL;
if (!(r001540 & 0x40000000)) {
@@ -101,7 +101,7 @@ gt215_devinit_mmio_part[] = {
static u32
gt215_devinit_mmio(struct nvkm_devinit *devinit, u32 addr)
{
- struct nv50_devinit_priv *priv = (void *)devinit;
+ struct nv50_devinit *init = (void *)devinit;
u32 *mmio = gt215_devinit_mmio_part;
/* the init tables on some boards have INIT_RAM_RESTRICT_ZM_REG_GROUP
@@ -113,7 +113,7 @@ gt215_devinit_mmio(struct nvkm_devinit *devinit, u32 addr)
*
* the binary driver avoids touching these registers at all, however,
* the video bios doesn't care and does what the scripts say. it's
- * presumed that the io-port access to priv registers isn't effected
+ * presumed that the io-port access to init registers isn't effected
* by the screw-up bug mentioned above.
*
* really, a new opcode should've been invented to handle these
@@ -122,9 +122,9 @@ gt215_devinit_mmio(struct nvkm_devinit *devinit, u32 addr)
while (mmio[0]) {
if (addr >= mmio[0] && addr <= mmio[1]) {
u32 part = (addr / mmio[2]) & 7;
- if (!priv->r001540)
- priv->r001540 = nv_rd32(priv, 0x001540);
- if (part >= hweight8((priv->r001540 >> 16) & 0xff))
+ if (!init->r001540)
+ init->r001540 = nv_rd32(init, 0x001540);
+ if (part >= hweight8((init->r001540 >> 16) & 0xff))
return ~0;
return addr;
}
OpenPOWER on IntegriCloud