Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8c237fdf
Commit
8c237fdf
authored
Dec 05, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/i2c: pad/ports do not have an engine
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
3532c370
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
27 additions
and
27 deletions
+27
-27
drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
+5
-5
drivers/gpu/drm/nouveau/core/subdev/i2c/nv04.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv04.c
+4
-4
drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
+4
-4
drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.c
+5
-5
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
+2
-2
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.c
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.c
+1
-1
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h
+1
-1
drivers/gpu/drm/nouveau/core/subdev/i2c/padgm204.c
drivers/gpu/drm/nouveau/core/subdev/i2c/padgm204.c
+2
-2
drivers/gpu/drm/nouveau/core/subdev/i2c/padnv94.c
drivers/gpu/drm/nouveau/core/subdev/i2c/padnv94.c
+2
-2
drivers/gpu/drm/nouveau/core/subdev/i2c/port.h
drivers/gpu/drm/nouveau/core/subdev/i2c/port.h
+1
-1
No files found.
drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
View file @
8c237fdf
...
@@ -117,8 +117,8 @@ nouveau_i2c_port_create_(struct nouveau_object *parent,
...
@@ -117,8 +117,8 @@ nouveau_i2c_port_create_(struct nouveau_object *parent,
const
struct
nouveau_i2c_func
*
func
,
const
struct
nouveau_i2c_func
*
func
,
int
size
,
void
**
pobject
)
int
size
,
void
**
pobject
)
{
{
struct
nouveau_device
*
device
=
nv_device
(
engine
);
struct
nouveau_device
*
device
=
nv_device
(
parent
);
struct
nouveau_i2c
*
i2c
=
(
void
*
)
engine
;
struct
nouveau_i2c
*
i2c
=
nouveau_i2c
(
parent
)
;
struct
nouveau_i2c_port
*
port
;
struct
nouveau_i2c_port
*
port
;
int
ret
;
int
ret
;
...
@@ -494,7 +494,7 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type,
...
@@ -494,7 +494,7 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type,
oclass
=
impl
->
pad_x
;
oclass
=
impl
->
pad_x
;
}
}
ret
=
nouveau_object_ctor
(
nv_object
(
i2c
),
nv_object
(
i2c
)
,
oclass
,
ret
=
nouveau_object_ctor
(
nv_object
(
i2c
),
NULL
,
oclass
,
NULL
,
pad
,
&
parent
);
NULL
,
pad
,
&
parent
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
;
return
;
...
@@ -503,7 +503,7 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type,
...
@@ -503,7 +503,7 @@ nouveau_i2c_create_port(struct nouveau_i2c *i2c, int index, u8 type,
do
{
do
{
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
if
(
oclass
->
handle
==
type
)
{
if
(
oclass
->
handle
==
type
)
{
ret
=
nouveau_object_ctor
(
parent
,
nv_object
(
i2c
)
,
ret
=
nouveau_object_ctor
(
parent
,
NULL
,
oclass
,
info
,
index
,
oclass
,
info
,
index
,
&
object
);
&
object
);
}
}
...
@@ -603,7 +603,7 @@ nouveau_i2c_create_(struct nouveau_object *parent,
...
@@ -603,7 +603,7 @@ nouveau_i2c_create_(struct nouveau_object *parent,
do
{
do
{
if
(
oclass
->
handle
!=
info
.
type
)
if
(
oclass
->
handle
!=
info
.
type
)
continue
;
continue
;
ret
=
nouveau_object_ctor
(
parent
,
*
pobject
,
ret
=
nouveau_object_ctor
(
parent
,
NULL
,
oclass
,
NULL
,
oclass
,
NULL
,
index
++
,
&
object
);
index
++
,
&
object
);
}
while
(
ret
&&
(
++
oclass
)
->
handle
);
}
while
(
ret
&&
(
++
oclass
)
->
handle
);
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/nv04.c
View file @
8c237fdf
...
@@ -39,7 +39,7 @@ struct nv04_i2c_port {
...
@@ -39,7 +39,7 @@ struct nv04_i2c_port {
static
void
static
void
nv04_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv04_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
u8
val
=
nv_rdvgac
(
priv
,
0
,
port
->
drive
);
u8
val
=
nv_rdvgac
(
priv
,
0
,
port
->
drive
);
if
(
state
)
val
|=
0x20
;
if
(
state
)
val
|=
0x20
;
...
@@ -50,7 +50,7 @@ nv04_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
...
@@ -50,7 +50,7 @@ nv04_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
static
void
static
void
nv04_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv04_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
u8
val
=
nv_rdvgac
(
priv
,
0
,
port
->
drive
);
u8
val
=
nv_rdvgac
(
priv
,
0
,
port
->
drive
);
if
(
state
)
val
|=
0x10
;
if
(
state
)
val
|=
0x10
;
...
@@ -61,7 +61,7 @@ nv04_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
...
@@ -61,7 +61,7 @@ nv04_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
static
int
static
int
nv04_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
nv04_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rdvgac
(
priv
,
0
,
port
->
sense
)
&
0x04
);
return
!!
(
nv_rdvgac
(
priv
,
0
,
port
->
sense
)
&
0x04
);
}
}
...
@@ -69,7 +69,7 @@ nv04_i2c_sense_scl(struct nouveau_i2c_port *base)
...
@@ -69,7 +69,7 @@ nv04_i2c_sense_scl(struct nouveau_i2c_port *base)
static
int
static
int
nv04_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
nv04_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv04_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv04_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rdvgac
(
priv
,
0
,
port
->
sense
)
&
0x08
);
return
!!
(
nv_rdvgac
(
priv
,
0
,
port
->
sense
)
&
0x08
);
}
}
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/nv4e.c
View file @
8c237fdf
...
@@ -38,7 +38,7 @@ struct nv4e_i2c_port {
...
@@ -38,7 +38,7 @@ struct nv4e_i2c_port {
static
void
static
void
nv4e_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv4e_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
nv_mask
(
priv
,
port
->
addr
,
0x2f
,
state
?
0x21
:
0x01
);
nv_mask
(
priv
,
port
->
addr
,
0x2f
,
state
?
0x21
:
0x01
);
}
}
...
@@ -46,7 +46,7 @@ nv4e_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
...
@@ -46,7 +46,7 @@ nv4e_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
static
void
static
void
nv4e_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv4e_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
nv_mask
(
priv
,
port
->
addr
,
0x1f
,
state
?
0x11
:
0x01
);
nv_mask
(
priv
,
port
->
addr
,
0x1f
,
state
?
0x11
:
0x01
);
}
}
...
@@ -54,7 +54,7 @@ nv4e_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
...
@@ -54,7 +54,7 @@ nv4e_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
static
int
static
int
nv4e_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
nv4e_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00040000
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00040000
);
}
}
...
@@ -62,7 +62,7 @@ nv4e_i2c_sense_scl(struct nouveau_i2c_port *base)
...
@@ -62,7 +62,7 @@ nv4e_i2c_sense_scl(struct nouveau_i2c_port *base)
static
int
static
int
nv4e_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
nv4e_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv4e_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv4e_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00080000
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00080000
);
}
}
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/nv50.c
View file @
8c237fdf
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
void
void
nv50_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv50_i2c_drive_scl
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
if
(
state
)
port
->
state
|=
0x01
;
if
(
state
)
port
->
state
|=
0x01
;
else
port
->
state
&=
0xfe
;
else
port
->
state
&=
0xfe
;
...
@@ -37,7 +37,7 @@ nv50_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
...
@@ -37,7 +37,7 @@ nv50_i2c_drive_scl(struct nouveau_i2c_port *base, int state)
void
void
nv50_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
nv50_i2c_drive_sda
(
struct
nouveau_i2c_port
*
base
,
int
state
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
if
(
state
)
port
->
state
|=
0x02
;
if
(
state
)
port
->
state
|=
0x02
;
else
port
->
state
&=
0xfd
;
else
port
->
state
&=
0xfd
;
...
@@ -47,7 +47,7 @@ nv50_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
...
@@ -47,7 +47,7 @@ nv50_i2c_drive_sda(struct nouveau_i2c_port *base, int state)
int
int
nv50_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
nv50_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000001
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000001
);
}
}
...
@@ -55,7 +55,7 @@ nv50_i2c_sense_scl(struct nouveau_i2c_port *base)
...
@@ -55,7 +55,7 @@ nv50_i2c_sense_scl(struct nouveau_i2c_port *base)
int
int
nv50_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
nv50_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000002
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000002
);
}
}
...
@@ -102,7 +102,7 @@ nv50_i2c_port_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -102,7 +102,7 @@ nv50_i2c_port_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
int
nv50_i2c_port_init
(
struct
nouveau_object
*
object
)
nv50_i2c_port_init
(
struct
nouveau_object
*
object
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
nouveau_i2c
(
object
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
object
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
object
;
nv_wr32
(
priv
,
port
->
addr
,
port
->
state
);
nv_wr32
(
priv
,
port
->
addr
,
port
->
state
);
return
nouveau_i2c_port_init
(
&
port
->
base
);
return
nouveau_i2c_port_init
(
&
port
->
base
);
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
View file @
8c237fdf
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
static
int
static
int
nvd0_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
nvd0_i2c_sense_scl
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000010
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000010
);
}
}
...
@@ -35,7 +35,7 @@ nvd0_i2c_sense_scl(struct nouveau_i2c_port *base)
...
@@ -35,7 +35,7 @@ nvd0_i2c_sense_scl(struct nouveau_i2c_port *base)
static
int
static
int
nvd0_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
nvd0_i2c_sense_sda
(
struct
nouveau_i2c_port
*
base
)
{
{
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
v_object
(
base
)
->
engine
;
struct
nv50_i2c_priv
*
priv
=
(
void
*
)
n
ouveau_i2c
(
base
)
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
struct
nv50_i2c_port
*
port
=
(
void
*
)
base
;
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000020
);
return
!!
(
nv_rd32
(
priv
,
port
->
addr
)
&
0x00000020
);
}
}
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.c
View file @
8c237fdf
...
@@ -48,7 +48,7 @@ nvkm_i2c_pad_create_(struct nouveau_object *parent,
...
@@ -48,7 +48,7 @@ nvkm_i2c_pad_create_(struct nouveau_object *parent,
struct
nouveau_oclass
*
oclass
,
int
index
,
struct
nouveau_oclass
*
oclass
,
int
index
,
int
size
,
void
**
pobject
)
int
size
,
void
**
pobject
)
{
{
struct
nouveau_i2c
*
i2c
=
(
void
*
)
engine
;
struct
nouveau_i2c
*
i2c
=
nouveau_i2c
(
parent
)
;
struct
nouveau_i2c_port
*
port
;
struct
nouveau_i2c_port
*
port
;
struct
nvkm_i2c_pad
*
pad
;
struct
nvkm_i2c_pad
*
pad
;
int
ret
;
int
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/pad.h
View file @
8c237fdf
...
@@ -47,7 +47,7 @@ int _nvkm_i2c_pad_fini(struct nouveau_object *, bool);
...
@@ -47,7 +47,7 @@ int _nvkm_i2c_pad_fini(struct nouveau_object *, bool);
#ifndef MSG
#ifndef MSG
#define MSG(l,f,a...) do { \
#define MSG(l,f,a...) do { \
struct nvkm_i2c_pad *_pad = (void *)pad; \
struct nvkm_i2c_pad *_pad = (void *)pad; \
nv_##l(
nv_object(_pad)->engine, "PAD:%c:%02x: "f,
\
nv_##l(
_pad, "PAD:%c:%02x: "f,
\
_pad->index >= 0x100 ? 'X' : 'S', \
_pad->index >= 0x100 ? 'X' : 'S', \
_pad->index >= 0x100 ? _pad->index - 0x100 : _pad->index, ##a); \
_pad->index >= 0x100 ? _pad->index - 0x100 : _pad->index, ##a); \
} while(0)
} while(0)
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/padgm204.c
View file @
8c237fdf
...
@@ -32,7 +32,7 @@ struct gm204_i2c_pad {
...
@@ -32,7 +32,7 @@ struct gm204_i2c_pad {
static
int
static
int
gm204_i2c_pad_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
gm204_i2c_pad_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
{
{
struct
nouveau_i2c
*
i2c
=
(
void
*
)
object
->
engine
;
struct
nouveau_i2c
*
i2c
=
(
void
*
)
nouveau_i2c
(
object
)
;
struct
gm204_i2c_pad
*
pad
=
(
void
*
)
object
;
struct
gm204_i2c_pad
*
pad
=
(
void
*
)
object
;
nv_mask
(
i2c
,
0x00d97c
+
pad
->
addr
,
0x00000001
,
0x00000001
);
nv_mask
(
i2c
,
0x00d97c
+
pad
->
addr
,
0x00000001
,
0x00000001
);
return
nvkm_i2c_pad_fini
(
&
pad
->
base
,
suspend
);
return
nvkm_i2c_pad_fini
(
&
pad
->
base
,
suspend
);
...
@@ -41,7 +41,7 @@ gm204_i2c_pad_fini(struct nouveau_object *object, bool suspend)
...
@@ -41,7 +41,7 @@ gm204_i2c_pad_fini(struct nouveau_object *object, bool suspend)
static
int
static
int
gm204_i2c_pad_init
(
struct
nouveau_object
*
object
)
gm204_i2c_pad_init
(
struct
nouveau_object
*
object
)
{
{
struct
nouveau_i2c
*
i2c
=
(
void
*
)
object
->
engine
;
struct
nouveau_i2c
*
i2c
=
(
void
*
)
nouveau_i2c
(
object
)
;
struct
gm204_i2c_pad
*
pad
=
(
void
*
)
object
;
struct
gm204_i2c_pad
*
pad
=
(
void
*
)
object
;
switch
(
nv_oclass
(
pad
->
base
.
next
)
->
handle
)
{
switch
(
nv_oclass
(
pad
->
base
.
next
)
->
handle
)
{
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/padnv94.c
View file @
8c237fdf
...
@@ -32,7 +32,7 @@ struct nv94_i2c_pad {
...
@@ -32,7 +32,7 @@ struct nv94_i2c_pad {
static
int
static
int
nv94_i2c_pad_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
nv94_i2c_pad_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
{
{
struct
nouveau_i2c
*
i2c
=
(
void
*
)
object
->
engine
;
struct
nouveau_i2c
*
i2c
=
(
void
*
)
nouveau_i2c
(
object
)
;
struct
nv94_i2c_pad
*
pad
=
(
void
*
)
object
;
struct
nv94_i2c_pad
*
pad
=
(
void
*
)
object
;
nv_mask
(
i2c
,
0x00e50c
+
pad
->
addr
,
0x00000001
,
0x00000001
);
nv_mask
(
i2c
,
0x00e50c
+
pad
->
addr
,
0x00000001
,
0x00000001
);
return
nvkm_i2c_pad_fini
(
&
pad
->
base
,
suspend
);
return
nvkm_i2c_pad_fini
(
&
pad
->
base
,
suspend
);
...
@@ -41,7 +41,7 @@ nv94_i2c_pad_fini(struct nouveau_object *object, bool suspend)
...
@@ -41,7 +41,7 @@ nv94_i2c_pad_fini(struct nouveau_object *object, bool suspend)
static
int
static
int
nv94_i2c_pad_init
(
struct
nouveau_object
*
object
)
nv94_i2c_pad_init
(
struct
nouveau_object
*
object
)
{
{
struct
nouveau_i2c
*
i2c
=
(
void
*
)
object
->
engine
;
struct
nouveau_i2c
*
i2c
=
(
void
*
)
nouveau_i2c
(
object
)
;
struct
nv94_i2c_pad
*
pad
=
(
void
*
)
object
;
struct
nv94_i2c_pad
*
pad
=
(
void
*
)
object
;
switch
(
nv_oclass
(
pad
->
base
.
next
)
->
handle
)
{
switch
(
nv_oclass
(
pad
->
base
.
next
)
->
handle
)
{
...
...
drivers/gpu/drm/nouveau/core/subdev/i2c/port.h
View file @
8c237fdf
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#ifndef MSG
#ifndef MSG
#define MSG(l,f,a...) do { \
#define MSG(l,f,a...) do { \
struct nouveau_i2c_port *_port = (void *)port; \
struct nouveau_i2c_port *_port = (void *)port; \
nv_##l(
nv_object(_port)->engine, "PORT:%02x: "f, _port->index, ##a);
\
nv_##l(
_port, "PORT:%02x: "f, _port->index, ##a);
\
} while(0)
} while(0)
#define DBG(f,a...) MSG(debug, f, ##a)
#define DBG(f,a...) MSG(debug, f, ##a)
#define ERR(f,a...) MSG(error, f, ##a)
#define ERR(f,a...) MSG(error, f, ##a)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment