Skip to content

Commit

Permalink
drm/nv50/gpio: fixup reset for gpios >= 16
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Mar 26, 2014
1 parent 5cfd48b commit 7730705
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ nv50_gpio_reset(struct nouveau_gpio *gpio, u8 match)
u8 unk0 = !!(data & 0x02000000);
u8 unk1 = !!(data & 0x04000000);
u32 val = (unk1 << 16) | unk0;
u32 reg = regs[line >> 4]; line &= 0x0f;
u32 reg = regs[line >> 4];
u32 lsh = line & 0x0f;

if ( func == DCB_GPIO_UNUSED ||
(match != DCB_GPIO_UNUSED && match != func))
continue;

gpio->set(gpio, 0, func, line, defs);

nv_mask(priv, reg, 0x00010001 << line, val << line);
nv_mask(priv, reg, 0x00010001 << lsh, val << lsh);
}
}

Expand Down

0 comments on commit 7730705

Please sign in to comment.