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
bfdfc65a
Commit
bfdfc65a
authored
Sep 16, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed several warnings, removed unused files
parent
60f29555
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
122 deletions
+8
-122
circbuf.c
src/drivers/elphel/circbuf.c
+1
-1
jpeghead.c
src/drivers/elphel/jpeghead.c
+1
-1
quantization_tables.c
src/drivers/elphel/quantization_tables.c
+3
-3
sensor_common.c
src/drivers/elphel/sensor_common.c
+1
-1
x393_fpga_functions.c
src/drivers/elphel/x393_fpga_functions.c
+1
-1
x393_fpga_functions.h
src/drivers/elphel/x393_fpga_functions.h
+1
-1
x393_helpers.c
src/drivers/elphel/x393_helpers.c
+0
-79
x393_helpers.h
src/drivers/elphel/x393_helpers.h
+0
-35
No files found.
src/drivers/elphel/circbuf.c
View file @
bfdfc65a
...
...
@@ -45,7 +45,7 @@
//#include "circbuf.h"
#include "exif.h"
#include "x393_macro.h"
#include "x393_helpers.h"
//
#include "x393_helpers.h"
/** @brief Driver name displayed in system logs */
//#define CIRCBUF_DRIVER_NAME "circbuf driver"
...
...
src/drivers/elphel/jpeghead.c
View file @
bfdfc65a
...
...
@@ -708,7 +708,7 @@ void jpeg_htable_fpga_pgm(unsigned int chn)
TABLE_TYPE_HUFFMAN
,
0
,
len
,
(
u32
*
)
huff_tables
->
fpga_huffman_table
);
huff_tables
->
fpga_huffman_table
);
jpeghead_priv
[
chn
].
fpga_programmed
=
1
;
...
...
src/drivers/elphel/quantization_tables.c
View file @
bfdfc65a
...
...
@@ -358,7 +358,7 @@ int set_qtable_fpga(int quality2, ///< single byte (standard) or a pair of
int
i
,
transpose
,
fpga_index
,
fpga_index_prev
,
q_type
,
quality
,
temp
,
tstart
;
unsigned
short
qtable_fpga
[
QTABLE_SIZE
*
2
];
unsigned
short
*
tab
;
u
nsigned
long
*
qtable_fpga_dw
=
(
unsigned
long
*
)
qtable_fpga
;
u
32
*
qtable_fpga_dw
=
(
u32
*
)
qtable_fpga
;
#if 0
x393_cmprs_table_addr_t table_addr;
#endif
...
...
@@ -488,7 +488,7 @@ int set_qtable_fpga(int quality2, ///< single byte (standard) or a pair of
* min = 0, max = 10, step = 0.1;
* see coring_filter_setup.php to generate this table (with parameter '?C').
*/
static
u
nsigned
long
coring_tables
[]
=
{
static
u
32
coring_tables
[]
=
{
// filter=0
0x00000000
,
0x11111111
,
0x11111111
,
0x22222222
,
0x22222222
,
0x33333333
,
0x33333333
,
0x44444444
,
0x44444444
,
0x55555555
,
0x55555555
,
0x66666666
,
0x66666666
,
0x77777777
,
0x77777777
,
0x88888888
,
...
...
@@ -1003,7 +1003,7 @@ void set_coring_fpga(unsigned int coring_number, ///< [in] 0..99 - function nu
int
fpga_tbl_num
,
///< [in] 0..15 - FPGA table number
unsigned
int
chn
)
///< [in] compressor channel number
{
int
i
;
//
int i;
// unsigned long flags;
// x393_cmprs_table_addr_t table_addr;
...
...
src/drivers/elphel/sensor_common.c
View file @
bfdfc65a
...
...
@@ -51,7 +51,7 @@
#include "quantization_tables.h"
#include "x393_macro.h"
#include "x393.h"
#include "x393_helpers.h"
//
#include "x393_helpers.h"
#include <asm/delay.h> // just for usleep1000()
...
...
src/drivers/elphel/x393_fpga_functions.c
View file @
bfdfc65a
...
...
@@ -213,7 +213,7 @@ int write_compressor_table(int chn, // compressor channel (0..3)
x393cmprs_tables_t
type
,
// table type (
int
index
,
int
num_items
,
u
nsigned
long
*
data
)
u
32
*
data
)
{
x393_cmprs_table_addr_t
table_addr
;
int
i
;
...
...
src/drivers/elphel/x393_fpga_functions.h
View file @
bfdfc65a
...
...
@@ -26,4 +26,4 @@ int compressor_dma_setup (int port_afi, int chn_mask, int reset, int status_mode
sec_usec_t
*
get_fpga_rtc
(
sec_usec_t
*
ts
);
int
set_fpga_rtc
(
sec_usec_t
ts
);
int
is_fpga_programmed
(
void
);
int
write_compressor_table
(
int
chn
,
x393cmprs_tables_t
type
,
int
index
,
int
num_items
,
u
nsigned
long
*
data
);
int
write_compressor_table
(
int
chn
,
x393cmprs_tables_t
type
,
int
index
,
int
num_items
,
u
32
*
data
);
src/drivers/elphel/x393_helpers.c
deleted
100644 → 0
View file @
60f29555
/** @file x393_helpers.c
*
* @brief Helper functions for various routines form x393.h which require several actions to get
* reliable result.
*
* @copyright Copyright (C) 2016 Elphel, Inc
*
* @par <b>License</b>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/module.h>
#include <stddef.h>
#include "x393_helpers.h"
/**
* @brief Read RTC microsecond counter.
* @return Current value of microsecond counter or 0 in case read sequence was
* not successful.
*/
u32
get_rtc_usec
(
void
)
{
x393_rtc_status_t
stat
;
x393_status_ctrl_t
stat_ctrl
;
x393_rtc_usec_t
usec
;
unsigned
int
i
;
stat
=
x393_rtc_status
();
stat_ctrl
.
d32
=
0
;
stat_ctrl
.
mode
=
1
;
stat_ctrl
.
seq_num
=
stat
.
seq_num
+
1
;
set_x393_rtc_set_status
(
stat_ctrl
);
for
(
i
=
0
;
i
<
REPEAT_READ
;
i
++
)
{
stat
=
x393_rtc_status
();
if
(
stat
.
seq_num
==
stat_ctrl
.
seq_num
)
{
usec
=
x393_rtc_status_usec
();
return
usec
.
usec
;
}
}
return
0
;
}
EXPORT_SYMBOL_GPL
(
get_rtc_usec
);
/**
* @brief Read RTC second counter.
* @return Current value of second counter or 0 in case read sequence was
* not successful.
*/
u32
get_rtc_sec
(
void
)
{
x393_rtc_status_t
stat
;
x393_status_ctrl_t
stat_ctrl
;
x393_rtc_sec_t
sec
;
unsigned
int
i
;
stat
=
x393_rtc_status
();
stat_ctrl
.
d32
=
0
;
stat_ctrl
.
mode
=
1
;
stat_ctrl
.
seq_num
=
stat
.
seq_num
+
1
;
set_x393_rtc_set_status
(
stat_ctrl
);
for
(
i
=
0
;
i
<
REPEAT_READ
;
i
++
)
{
stat
=
x393_rtc_status
();
if
(
stat
.
seq_num
==
stat_ctrl
.
seq_num
)
{
sec
=
x393_rtc_status_sec
();
return
sec
.
sec
;
}
}
return
0
;
}
EXPORT_SYMBOL_GPL
(
get_rtc_sec
);
src/drivers/elphel/x393_helpers.h
deleted
100644 → 0
View file @
60f29555
/** @file x393_helpers.h
*
* @brief Helper functions for various routines form x393.h which require several actions to get
* reliable result.
*
* @copyright Copyright (C) 2016 Elphel, Inc
*
* @par <b>License</b>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _X393_HELPERS_H
#define _X393_HELPERS_H
#include <asm/types.h>
#include "x393.h"
/** @brief The number of times to repeat register read sequence while waiting for
* sequence number specified.
*/
#define REPEAT_READ 10
u32
get_rtc_usec
(
void
);
u32
get_rtc_sec
(
void
);
#endif
/* _X393_HELPERS_H */
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