Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
Project
Project
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
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC TDC 1ns 5cha - Software
Commits
721c29b1
Commit
721c29b1
authored
Sep 04, 2012
by
Samuel Iglesias Gonsálvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdc: coding style stuff
Signed-off-by:
Samuel Iglesias Gonsálvez
<
siglesias@igalia.com
>
parent
00e7a3c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
tdc_regs.h
hw/tdc_regs.h
+9
-9
tdc-fmc.c
tdc-fmc.c
+1
-2
No files found.
hw/tdc_regs.h
View file @
721c29b1
...
...
@@ -28,11 +28,11 @@
#define TDC_DMA_NEXT_H_R 0x1C
#define TDC_DMA_ATTRIB_R 0x20
#define TDC_DMA_STAT_IDLE BIT(0)
#define TDC_DMA_STAT_DONE BIT(1)
#define TDC_DMA_STAT_BUSY BIT(2)
#define TDC_DMA_STAT_ERR BIT(3)
#define TDC_DMA_STAT_ABORT BIT(4)
#define TDC_DMA_STAT_IDLE
BIT(0)
#define TDC_DMA_STAT_DONE
BIT(1)
#define TDC_DMA_STAT_BUSY
BIT(2)
#define TDC_DMA_STAT_ERR
BIT(3)
#define TDC_DMA_STAT_ABORT
BIT(4)
/* ACAM GPX chip registers available */
#define TDC_ACAM_CFG_REG_0 0x20000
...
...
@@ -103,10 +103,10 @@
#define TDC_MEZZANINE_1WIRE 0x80000
/* Constants */
#define TDC_CHAN_NUMBER
5
#define TDC_CHAN_NUMBER
5
#define TDC_EVENT_BUFFER_SIZE 256
#define TDC_EVENT_CHANNEL_MASK 0x3
#define TDC_EVENT_DACAPO_FLAG BIT(0)
#define TDC_EVENT_BUFFER_SIZE
256
#define TDC_EVENT_CHANNEL_MASK
0x3
#define TDC_EVENT_DACAPO_FLAG
BIT(0)
#endif
/* __TDC_REGISTERS_H */
tdc-fmc.c
View file @
721c29b1
...
...
@@ -37,6 +37,7 @@ static void tdc_fmc_gennum_setup_local_clock(struct spec_tdc *tdc, int freq)
/* Setup local clock */
divot
=
800
/
freq
-
1
;
data
=
0xE001F00C
+
(
divot
<<
4
);
/* FIXME: Now setup for 160 MHz directly. */
writel
(
0x0001F04C
,
tdc
->
gn412x_regs
+
TDC_PCI_CLK_CSR
);
}
...
...
@@ -89,7 +90,6 @@ static void tdc_fmc_irq_work(struct work_struct *work)
int
ret
,
dacapo_flag
,
count
,
rd_ptr
,
chan
;
struct
tdc_event
*
events
,
*
tmp_data
;
/* TODO: change the size of the tdc buffer for a constant with a proper value */
events
=
kzalloc
(
TDC_EVENT_BUFFER_SIZE
*
sizeof
(
struct
tdc_event
),
GFP_KERNEL
);
if
(
!
events
)
{
pr_err
(
"error allocating memory for the events
\n
"
);
...
...
@@ -115,7 +115,6 @@ static void tdc_fmc_irq_work(struct work_struct *work)
wait_event
(
fmc_wait_dma
,
atomic_read
(
&
fmc_dma_end
));
/* DMA happened */
atomic_set
(
&
fmc_dma_end
,
0
);
/* Check the status of the DMA */
if
(
readl
(
tdc
->
base
+
TDC_DMA_STAT_R
)
&
(
TDC_DMA_STAT_ERR
|
TDC_DMA_STAT_ABORT
))
goto
dma_out
;
...
...
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