51 nv98_crypt_sclass[] = {
71 *pobject = nv_object(priv);
82 .ctor = nv98_crypt_context_ctor,
95 static const struct nouveau_enum nv98_crypt_isr_error_name[] = {
96 { 0x0000,
"ILLEGAL_MTHD" },
97 { 0x0001,
"INVALID_BITFIELD" },
98 { 0x0002,
"INVALID_ENUM" },
110 u32 disp = nv_rd32(priv, 0x08701c);
111 u32 stat = nv_rd32(priv, 0x087008) & disp & ~(disp >> 16);
112 u32 inst = nv_rd32(priv, 0x087050) & 0x3fffffff;
113 u32 ssta = nv_rd32(priv, 0x087040) & 0x0000ffff;
114 u32 addr = nv_rd32(priv, 0x087040) >> 16;
115 u32 mthd = (addr & 0x07ff) << 2;
116 u32 subc = (addr & 0x3800) >> 11;
117 u32 data = nv_rd32(priv, 0x087044);
121 chid = pfifo->
chid(pfifo, engctx);
123 if (stat & 0x00000040) {
126 printk(
"] ch %d [0x%010llx] subc %d mthd 0x%04x data 0x%08x\n",
127 chid, (
u64)inst << 12, subc, mthd, data);
128 nv_wr32(priv, 0x087004, 0x00000040);
133 nv_error(priv,
"unhandled intr 0x%08x\n", stat);
134 nv_wr32(priv, 0x087004, stat);
157 *pobject = nv_object(priv);
161 nv_subdev(priv)->unit = 0x00004000;
162 nv_subdev(priv)->intr = nv98_crypt_intr;
163 nv_engine(priv)->cclass = &nv98_crypt_cclass;
164 nv_engine(priv)->sclass = nv98_crypt_sclass;
165 nv_engine(priv)->tlb_flush = nv98_crypt_tlb_flush;
180 nv_wait(priv, 0x087008, 0x00000010, 0x00000010);
181 nv_wr32(priv, 0x087004, 0x00000010);
184 nv_wr32(priv, 0x087ff8, 0x00100000);
185 for (i = 0; i <
ARRAY_SIZE(nv98_pcrypt_code); i++)
186 nv_wr32(priv, 0x087ff4, nv98_pcrypt_code[i]);
188 nv_wr32(priv, 0x087ff8, 0x00000000);
189 for (i = 0; i <
ARRAY_SIZE(nv98_pcrypt_data); i++)
190 nv_wr32(priv, 0x087ff4, nv98_pcrypt_data[i]);
193 nv_wr32(priv, 0x08710c, 0x00000000);
194 nv_wr32(priv, 0x087104, 0x00000000);
195 nv_wr32(priv, 0x087100, 0x00000002);
203 .ctor = nv98_crypt_ctor,
205 .init = nv98_crypt_init,