From 9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 Mon Sep 17 00:00:00 2001 From: Yunhong Jiang Date: Tue, 4 Aug 2015 12:17:53 -0700 Subject: Add the rt linux 4.1.3-rt3 as base Import the rt linux 4.1.3-rt3 as OPNFV kvm base. It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and the base is: commit 0917f823c59692d751951bf5ea699a2d1e2f26a2 Author: Sebastian Andrzej Siewior Date: Sat Jul 25 12:13:34 2015 +0200 Prepare v4.1.3-rt3 Signed-off-by: Sebastian Andrzej Siewior We lose all the git history this way and it's not good. We should apply another opnfv project repo in future. Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423 Signed-off-by: Yunhong Jiang --- .../drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h (limited to 'kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h') diff --git a/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h b/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h new file mode 100644 index 000000000..6586e1567 --- /dev/null +++ b/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h @@ -0,0 +1,87 @@ +#ifndef __NVKM_I2C_PRIV_H__ +#define __NVKM_I2C_PRIV_H__ +#include + +extern struct nvkm_oclass nv04_i2c_pad_oclass; +extern struct nvkm_oclass g94_i2c_pad_oclass; +extern struct nvkm_oclass gm204_i2c_pad_oclass; + +#define nvkm_i2c_port_create(p,e,o,i,a,f,d) \ + nvkm_i2c_port_create_((p), (e), (o), (i), (a), (f), \ + sizeof(**d), (void **)d) +#define nvkm_i2c_port_destroy(p) ({ \ + struct nvkm_i2c_port *port = (p); \ + _nvkm_i2c_port_dtor(nv_object(i2c)); \ +}) +#define nvkm_i2c_port_init(p) \ + nvkm_object_init(&(p)->base) +#define nvkm_i2c_port_fini(p,s) \ + nvkm_object_fini(&(p)->base, (s)) + +int nvkm_i2c_port_create_(struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, u8, + const struct i2c_algorithm *, + const struct nvkm_i2c_func *, + int, void **); +void _nvkm_i2c_port_dtor(struct nvkm_object *); +#define _nvkm_i2c_port_init nvkm_object_init +int _nvkm_i2c_port_fini(struct nvkm_object *, bool); + +#define nvkm_i2c_create(p,e,o,d) \ + nvkm_i2c_create_((p), (e), (o), sizeof(**d), (void **)d) +#define nvkm_i2c_destroy(p) ({ \ + struct nvkm_i2c *i2c = (p); \ + _nvkm_i2c_dtor(nv_object(i2c)); \ +}) +#define nvkm_i2c_init(p) ({ \ + struct nvkm_i2c *i2c = (p); \ + _nvkm_i2c_init(nv_object(i2c)); \ +}) +#define nvkm_i2c_fini(p,s) ({ \ + struct nvkm_i2c *i2c = (p); \ + _nvkm_i2c_fini(nv_object(i2c), (s)); \ +}) + +int nvkm_i2c_create_(struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, int, void **); +int _nvkm_i2c_ctor(struct nvkm_object *, struct nvkm_object *, + struct nvkm_oclass *, void *, u32, + struct nvkm_object **); +void _nvkm_i2c_dtor(struct nvkm_object *); +int _nvkm_i2c_init(struct nvkm_object *); +int _nvkm_i2c_fini(struct nvkm_object *, bool); + +extern struct nvkm_oclass nvkm_anx9805_sclass[]; +extern struct nvkm_oclass gf110_i2c_sclass[]; + +extern const struct i2c_algorithm nvkm_i2c_bit_algo; +extern const struct i2c_algorithm nvkm_i2c_aux_algo; + +struct nvkm_i2c_impl { + struct nvkm_oclass base; + + /* supported i2c port classes */ + struct nvkm_oclass *sclass; + struct nvkm_oclass *pad_x; + struct nvkm_oclass *pad_s; + + /* number of native dp aux channels present */ + int aux; + + /* read and ack pending interrupts, returning only data + * for ports that have not been masked off, while still + * performing the ack for anything that was pending. + */ + void (*aux_stat)(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); + + /* mask on/off interrupt types for a given set of auxch + */ + void (*aux_mask)(struct nvkm_i2c *, u32, u32, u32); +}; + +void g94_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); +void g94_aux_mask(struct nvkm_i2c *, u32, u32, u32); + +void gk104_aux_stat(struct nvkm_i2c *, u32 *, u32 *, u32 *, u32 *); +void gk104_aux_mask(struct nvkm_i2c *, u32, u32, u32); +#endif -- cgit 1.2.3-korg