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
Kirill Smelkov
linux
Commits
d78fa39a
Commit
d78fa39a
authored
May 13, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/g94/i2c: add aux channel interrupt driver
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
3668a339
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c
+33
-0
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
+3
-0
drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h
drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h
+3
-0
No files found.
drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c
View file @
d78fa39a
...
...
@@ -24,6 +24,36 @@
#include "nv50.h"
void
nv94_aux_stat
(
struct
nouveau_i2c
*
i2c
,
u32
*
hi
,
u32
*
lo
,
u32
*
rq
,
u32
*
tx
)
{
u32
intr
=
nv_rd32
(
i2c
,
0x00e06c
);
u32
stat
=
nv_rd32
(
i2c
,
0x00e068
)
&
intr
,
i
;
for
(
i
=
0
,
*
hi
=
*
lo
=
*
rq
=
*
tx
=
0
;
i
<
8
;
i
++
)
{
if
((
stat
&
(
1
<<
(
i
*
4
))))
*
hi
|=
1
<<
i
;
if
((
stat
&
(
2
<<
(
i
*
4
))))
*
lo
|=
1
<<
i
;
if
((
stat
&
(
4
<<
(
i
*
4
))))
*
rq
|=
1
<<
i
;
if
((
stat
&
(
8
<<
(
i
*
4
))))
*
tx
|=
1
<<
i
;
}
nv_wr32
(
i2c
,
0x00e06c
,
intr
);
}
void
nv94_aux_mask
(
struct
nouveau_i2c
*
i2c
,
u32
type
,
u32
mask
,
u32
data
)
{
u32
temp
=
nv_rd32
(
i2c
,
0x00e068
),
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
mask
&
(
1
<<
i
))
{
if
(
!
(
data
&
(
1
<<
i
)))
{
temp
&=
~
(
type
<<
(
i
*
4
));
continue
;
}
temp
|=
type
<<
(
i
*
4
);
}
}
nv_wr32
(
i2c
,
0x00e068
,
temp
);
}
#define AUX_DBG(fmt, args...) nv_debug(aux, "AUXCH(%d): " fmt, ch, ##args)
#define AUX_ERR(fmt, args...) nv_error(aux, "AUXCH(%d): " fmt, ch, ##args)
...
...
@@ -273,4 +303,7 @@ nv94_i2c_oclass = &(struct nouveau_i2c_impl) {
.
fini
=
_nouveau_i2c_fini
,
},
.
sclass
=
nv94_i2c_sclass
,
.
aux
=
4
,
.
aux_stat
=
nv94_aux_stat
,
.
aux_mask
=
nv94_aux_mask
,
}.
base
;
drivers/gpu/drm/nouveau/core/subdev/i2c/nvd0.c
View file @
d78fa39a
...
...
@@ -106,4 +106,7 @@ nvd0_i2c_oclass = &(struct nouveau_i2c_impl) {
.
fini
=
_nouveau_i2c_fini
,
},
.
sclass
=
nvd0_i2c_sclass
,
.
aux
=
4
,
.
aux_stat
=
nv94_aux_stat
,
.
aux_mask
=
nv94_aux_mask
,
}.
base
;
drivers/gpu/drm/nouveau/core/subdev/i2c/priv.h
View file @
d78fa39a
...
...
@@ -73,4 +73,7 @@ struct nouveau_i2c_impl {
void
(
*
aux_mask
)(
struct
nouveau_i2c
*
,
u32
,
u32
,
u32
);
};
void
nv94_aux_stat
(
struct
nouveau_i2c
*
,
u32
*
,
u32
*
,
u32
*
,
u32
*
);
void
nv94_aux_mask
(
struct
nouveau_i2c
*
,
u32
,
u32
,
u32
);
#endif
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