summaryrefslogtreecommitdiff
path: root/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-21 08:22:03 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-12-02 15:37:19 +1000
commitc2d83e94d48fc1b737cd9363ddc3537385043acc (patch)
tree090f1d2793030210fb033d53e9462e092e5a9b79 /nvkm
parent81b46628fbfaf52f9ed28fc89b1aa21e458aadda (diff)
downloadnouveau-c2d83e94d48fc1b737cd9363ddc3537385043acc.tar.gz
bios: support for opcodes 0x47/0x48
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nvkm')
-rw-r--r--nvkm/subdev/bios/init.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/nvkm/subdev/bios/init.c b/nvkm/subdev/bios/init.c
index 0c0889e85..c6579ef32 100644
--- a/nvkm/subdev/bios/init.c
+++ b/nvkm/subdev/bios/init.c
@@ -844,6 +844,40 @@ init_io_or(struct nvbios_init *init)
}
/**
+ * INIT_ANDN_REG - opcode 0x47
+ *
+ */
+static void
+init_andn_reg(struct nvbios_init *init)
+{
+ struct nouveau_bios *bios = init->bios;
+ u32 reg = nv_ro32(bios, init->offset + 1);
+ u32 mask = nv_ro32(bios, init->offset + 5);
+
+ trace("ANDN_REG\tR[0x%06x] &= ~0x%08x\n", reg, mask);
+ init->offset += 9;
+
+ init_mask(init, reg, mask, 0);
+}
+
+/**
+ * INIT_OR_REG - opcode 0x48
+ *
+ */
+static void
+init_or_reg(struct nvbios_init *init)
+{
+ struct nouveau_bios *bios = init->bios;
+ u32 reg = nv_ro32(bios, init->offset + 1);
+ u32 mask = nv_ro32(bios, init->offset + 5);
+
+ trace("OR_REG\tR[0x%06x] |= 0x%08x\n", reg, mask);
+ init->offset += 9;
+
+ init_mask(init, reg, 0, mask);
+}
+
+/**
* INIT_INDEX_ADDRESS_LATCHED - opcode 0x49
*
*/
@@ -2074,6 +2108,8 @@ static struct nvbios_init_opcode {
[0x3a] = { init_dp_condition },
[0x3b] = { init_io_mask_or },
[0x3c] = { init_io_or },
+ [0x47] = { init_andn_reg },
+ [0x48] = { init_or_reg },
[0x49] = { init_idx_addr_latched },
[0x4a] = { init_io_restrict_pll2 },
[0x4b] = { init_pll2 },