|
@@ -31,9 +31,9 @@
|
|
|
#include <subdev/fb.h>
|
|
|
|
|
|
#include <engine/fifo.h>
|
|
|
-#include <engine/crypt.h>
|
|
|
+#include <engine/cipher.h>
|
|
|
|
|
|
-struct nv84_crypt_priv {
|
|
|
+struct nv84_cipher_priv {
|
|
|
struct nouveau_engine base;
|
|
|
};
|
|
|
|
|
@@ -42,7 +42,7 @@ struct nv84_crypt_priv {
|
|
|
******************************************************************************/
|
|
|
|
|
|
static int
|
|
|
-nv84_crypt_object_ctor(struct nouveau_object *parent,
|
|
|
+nv84_cipher_object_ctor(struct nouveau_object *parent,
|
|
|
struct nouveau_object *engine,
|
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
|
struct nouveau_object **pobject)
|
|
@@ -64,8 +64,8 @@ nv84_crypt_object_ctor(struct nouveau_object *parent,
|
|
|
}
|
|
|
|
|
|
static struct nouveau_ofuncs
|
|
|
-nv84_crypt_ofuncs = {
|
|
|
- .ctor = nv84_crypt_object_ctor,
|
|
|
+nv84_cipher_ofuncs = {
|
|
|
+ .ctor = nv84_cipher_object_ctor,
|
|
|
.dtor = _nouveau_gpuobj_dtor,
|
|
|
.init = _nouveau_gpuobj_init,
|
|
|
.fini = _nouveau_gpuobj_fini,
|
|
@@ -74,18 +74,18 @@ nv84_crypt_ofuncs = {
|
|
|
};
|
|
|
|
|
|
static struct nouveau_oclass
|
|
|
-nv84_crypt_sclass[] = {
|
|
|
- { 0x74c1, &nv84_crypt_ofuncs },
|
|
|
+nv84_cipher_sclass[] = {
|
|
|
+ { 0x74c1, &nv84_cipher_ofuncs },
|
|
|
{}
|
|
|
};
|
|
|
|
|
|
/*******************************************************************************
|
|
|
- * PCRYPT context
|
|
|
+ * PCIPHER context
|
|
|
******************************************************************************/
|
|
|
|
|
|
static struct nouveau_oclass
|
|
|
-nv84_crypt_cclass = {
|
|
|
- .handle = NV_ENGCTX(CRYPT, 0x84),
|
|
|
+nv84_cipher_cclass = {
|
|
|
+ .handle = NV_ENGCTX(CIPHER, 0x84),
|
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
|
.ctor = _nouveau_engctx_ctor,
|
|
|
.dtor = _nouveau_engctx_dtor,
|
|
@@ -97,10 +97,10 @@ nv84_crypt_cclass = {
|
|
|
};
|
|
|
|
|
|
/*******************************************************************************
|
|
|
- * PCRYPT engine/subdev functions
|
|
|
+ * PCIPHER engine/subdev functions
|
|
|
******************************************************************************/
|
|
|
|
|
|
-static const struct nouveau_bitfield nv84_crypt_intr_mask[] = {
|
|
|
+static const struct nouveau_bitfield nv84_cipher_intr_mask[] = {
|
|
|
{ 0x00000001, "INVALID_STATE" },
|
|
|
{ 0x00000002, "ILLEGAL_MTHD" },
|
|
|
{ 0x00000004, "ILLEGAL_CLASS" },
|
|
@@ -110,12 +110,12 @@ static const struct nouveau_bitfield nv84_crypt_intr_mask[] = {
|
|
|
};
|
|
|
|
|
|
static void
|
|
|
-nv84_crypt_intr(struct nouveau_subdev *subdev)
|
|
|
+nv84_cipher_intr(struct nouveau_subdev *subdev)
|
|
|
{
|
|
|
struct nouveau_fifo *pfifo = nouveau_fifo(subdev);
|
|
|
struct nouveau_engine *engine = nv_engine(subdev);
|
|
|
struct nouveau_object *engctx;
|
|
|
- struct nv84_crypt_priv *priv = (void *)subdev;
|
|
|
+ struct nv84_cipher_priv *priv = (void *)subdev;
|
|
|
u32 stat = nv_rd32(priv, 0x102130);
|
|
|
u32 mthd = nv_rd32(priv, 0x102190);
|
|
|
u32 data = nv_rd32(priv, 0x102194);
|
|
@@ -127,7 +127,7 @@ nv84_crypt_intr(struct nouveau_subdev *subdev)
|
|
|
|
|
|
if (stat) {
|
|
|
nv_error(priv, "%s", "");
|
|
|
- nouveau_bitfield_print(nv84_crypt_intr_mask, stat);
|
|
|
+ nouveau_bitfield_print(nv84_cipher_intr_mask, stat);
|
|
|
pr_cont(" ch %d [0x%010llx %s] mthd 0x%04x data 0x%08x\n",
|
|
|
chid, (u64)inst << 12, nouveau_client_name(engctx),
|
|
|
mthd, data);
|
|
@@ -140,30 +140,30 @@ nv84_crypt_intr(struct nouveau_subdev *subdev)
|
|
|
}
|
|
|
|
|
|
static int
|
|
|
-nv84_crypt_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
|
+nv84_cipher_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
|
struct nouveau_object **pobject)
|
|
|
{
|
|
|
- struct nv84_crypt_priv *priv;
|
|
|
+ struct nv84_cipher_priv *priv;
|
|
|
int ret;
|
|
|
|
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
|
- "PCRYPT", "crypt", &priv);
|
|
|
+ "PCIPHER", "cipher", &priv);
|
|
|
*pobject = nv_object(priv);
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
nv_subdev(priv)->unit = 0x00004000;
|
|
|
- nv_subdev(priv)->intr = nv84_crypt_intr;
|
|
|
- nv_engine(priv)->cclass = &nv84_crypt_cclass;
|
|
|
- nv_engine(priv)->sclass = nv84_crypt_sclass;
|
|
|
+ nv_subdev(priv)->intr = nv84_cipher_intr;
|
|
|
+ nv_engine(priv)->cclass = &nv84_cipher_cclass;
|
|
|
+ nv_engine(priv)->sclass = nv84_cipher_sclass;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static int
|
|
|
-nv84_crypt_init(struct nouveau_object *object)
|
|
|
+nv84_cipher_init(struct nouveau_object *object)
|
|
|
{
|
|
|
- struct nv84_crypt_priv *priv = (void *)object;
|
|
|
+ struct nv84_cipher_priv *priv = (void *)object;
|
|
|
int ret;
|
|
|
|
|
|
ret = nouveau_engine_init(&priv->base);
|
|
@@ -177,12 +177,12 @@ nv84_crypt_init(struct nouveau_object *object)
|
|
|
}
|
|
|
|
|
|
struct nouveau_oclass
|
|
|
-nv84_crypt_oclass = {
|
|
|
- .handle = NV_ENGINE(CRYPT, 0x84),
|
|
|
+nv84_cipher_oclass = {
|
|
|
+ .handle = NV_ENGINE(CIPHER, 0x84),
|
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
|
- .ctor = nv84_crypt_ctor,
|
|
|
+ .ctor = nv84_cipher_ctor,
|
|
|
.dtor = _nouveau_engine_dtor,
|
|
|
- .init = nv84_crypt_init,
|
|
|
+ .init = nv84_cipher_init,
|
|
|
.fini = _nouveau_engine_fini,
|
|
|
},
|
|
|
};
|