BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
831a8bec
Commit
831a8bec
authored
Jan 24, 2018
by
David Frey
Committed by
David Clark
Feb 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mt7697: Remove s2m_mbox from mt7697q_info
This member does not need to be persisted as it can simply be returned to the caller requesting the mailbox value.
parent
c26c231f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
18 deletions
+12
-18
io.c
linux_kernel_modules/mt7697q/io.c
+5
-7
io.h
linux_kernel_modules/mt7697q/io.h
+2
-2
queue.c
linux_kernel_modules/mt7697q/queue.c
+5
-8
queue.h
linux_kernel_modules/mt7697q/queue.h
+0
-1
No files found.
linux_kernel_modules/mt7697q/io.c
View file @
831a8bec
...
...
@@ -189,7 +189,7 @@ cleanup:
return
ret
;
}
int
mt7697io_rd_s2m_mbx
(
struct
mt7697q_info
*
qinfo
)
int
mt7697io_rd_s2m_mbx
(
struct
mt7697q_info
*
qinfo
,
u8
*
s2m_mbx
)
{
int
ret
;
u16
value
;
...
...
@@ -201,27 +201,25 @@ int mt7697io_rd_s2m_mbx(struct mt7697q_info *qinfo)
goto
cleanup
;
}
qinfo
->
s2m_mbo
x
=
mt7697io_get_s2m_mbox
(
value
);
*
s2m_mb
x
=
mt7697io_get_s2m_mbox
(
value
);
dev_dbg
(
qinfo
->
dev
,
"%s(): s2m mbx(0x%02x)
\n
"
,
__func__
,
qinfo
->
s2m_mbo
x
);
__func__
,
*
s2m_mb
x
);
cleanup:
return
ret
;
}
int
mt7697io_clr_s2m_mbx
(
struct
mt7697q_info
*
qinfo
)
int
mt7697io_clr_s2m_mbx
(
struct
mt7697q_info
*
qinfo
,
u8
s2m_mbx
)
{
const
u16
value
=
mt7697io_set_s2m_mbox
(
qinfo
->
s2m_mbo
x
);
const
u16
value
=
mt7697io_set_s2m_mbox
(
s2m_mb
x
);
int
ret
;
ret
=
mt7697io_write16
(
qinfo
,
MT7697_IO_SLAVE_REG_MAILBOX_S2M
,
value
);
if
(
ret
<
0
)
{
dev_err
(
qinfo
->
dev
,
"%s(): mt7697io_write16() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
cleanup:
return
ret
;
}
...
...
linux_kernel_modules/mt7697q/io.h
View file @
831a8bec
...
...
@@ -84,8 +84,8 @@
struct
mt7697q_info
;
int
mt7697io_wr_m2s_mbx
(
struct
mt7697q_info
*
,
u8
);
int
mt7697io_rd_s2m_mbx
(
struct
mt7697q_info
*
);
int
mt7697io_clr_s2m_mbx
(
struct
mt7697q_info
*
);
int
mt7697io_rd_s2m_mbx
(
struct
mt7697q_info
*
,
u8
*
);
int
mt7697io_clr_s2m_mbx
(
struct
mt7697q_info
*
,
u8
);
int
mt7697io_wr
(
struct
mt7697q_info
*
,
u32
,
const
u32
*
,
size_t
);
int
mt7697io_rd
(
struct
mt7697q_info
*
,
u32
,
u32
*
,
size_t
);
...
...
linux_kernel_modules/mt7697q/queue.c
View file @
831a8bec
...
...
@@ -330,24 +330,21 @@ size_t mt7697q_get_free_words(const struct mt7697q_spec *qs)
return
mt7697q_get_capacity
(
qs
)
-
mt7697q_get_num_words
(
qs
);
}
int
mt7697q_get_s2m_mbx
(
struct
mt7697q_info
*
qinfo
,
u8
*
s2m_mbox
)
int
mt7697q_get_s2m_mbx
(
struct
mt7697q_info
*
qinfo
,
u8
*
s2m_mbox
)
{
int
ret
;
mutex_lock
(
&
qinfo
->
mutex
);
ret
=
mt7697io_rd_s2m_mbx
(
qinfo
);
if
(
ret
<
0
)
{
ret
=
mt7697io_rd_s2m_mbx
(
qinfo
,
s2m_mbox
);
if
(
ret
<
0
)
{
dev_err
(
qinfo
->
dev
,
"%s(): mt7697io_rd_s2m_mbx() failed(%d)
\n
"
,
__func__
,
ret
);
goto
cleanup
;
}
*
s2m_mbox
=
qinfo
->
s2m_mbox
;
ret
=
mt7697io_clr_s2m_mbx
(
qinfo
);
if
(
ret
<
0
)
{
ret
=
mt7697io_clr_s2m_mbx
(
qinfo
,
*
s2m_mbox
);
if
(
ret
<
0
)
{
dev_err
(
qinfo
->
dev
,
"%s(): mt7697io_clr_s2m_mbx() failed(%d)
\n
"
,
__func__
,
ret
);
...
...
linux_kernel_modules/mt7697q/queue.h
View file @
831a8bec
...
...
@@ -68,7 +68,6 @@ struct mt7697q_info {
atomic_t
blocked_writer
;
int
gpio_pin
;
int
irq
;
u8
s2m_mbox
;
};
void
mt7697q_irq_delayed_work
(
struct
work_struct
*
);
...
...
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