Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
d78efbaa
Commit
d78efbaa
authored
Jan 12, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: moved interrupt enabling to membridge_start
parent
d1be8f30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
x393_videomem.c
src/drivers/elphel/x393_videomem.c
+18
-18
No files found.
src/drivers/elphel/x393_videomem.c
View file @
d78efbaa
...
...
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
//
#define DEBUG
#define DEBUG
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/of_device.h>
...
...
@@ -694,6 +694,23 @@ int membridge_start(int sensor_port, unsigned long target_frame){
x393_status_membridge_t
status
;
// to enable interrupt
x393_membridge_ctrl_irq_t
membridge_irq_en
=
{.
d32
=
0
};
membridge_irq_en
.
interrupt_cmd
=
MEMBRIDGE_CMD_IRQ_EN
;
// check fpga
if
(
!
is_fpga_programmed
()){
pr_err
(
"*** Attempted to access hardware without bitsteram ***
\n
"
);
return
-
ENODEV
;
}
// extra variable
if
(
!
hardware_initialized
){
// enable interrupt
x393_membridge_ctrl_irq
(
membridge_irq_en
);
hardware_initialized
=
1
;
}
// wait for target frame here
waitFrame
(
sensor_port
,
target_frame
);
...
...
@@ -915,23 +932,6 @@ int videomem_open(struct inode *inode, struct file *filp)
int
minor
;
int
sensor_port
;
// to enable interrupt
x393_membridge_ctrl_irq_t
membridge_irq_en
=
{.
d32
=
0
};
membridge_irq_en
.
interrupt_cmd
=
MEMBRIDGE_CMD_IRQ_EN
;
// check fpga
if
(
!
is_fpga_programmed
()){
pr_err
(
"*** Attempted to access hardware without bitsteram ***
\n
"
);
return
-
ENODEV
;
}
// extra variable
if
(
!
hardware_initialized
){
// enable interrupt
x393_membridge_ctrl_irq
(
membridge_irq_en
);
hardware_initialized
=
1
;
}
pr_debug
(
"VIDEOMEM_OPEN
\n
"
);
privData
=
(
struct
raw_priv_t
*
)
kmalloc
(
sizeof
(
struct
raw_priv_t
),
GFP_KERNEL
);
...
...
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