Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - 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 DEL 1ns 4cha - Software
Commits
96da921c
Commit
96da921c
authored
Apr 30, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/spi: write DAC at init an not-wr time
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
bd23b5e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
fd-zio.c
kernel/fd-zio.c
+3
-0
fine-delay.h
kernel/fine-delay.h
+2
-1
spi.c
kernel/spi.c
+3
-1
No files found.
kernel/fd-zio.c
View file @
96da921c
...
...
@@ -170,6 +170,9 @@ static int fd_wr_mode(struct fd_dev *fd, int on)
}
else
{
fd_writel
(
fd
,
0
,
FD_REG_TCR
);
clear_bit
(
FD_FLAG_WR_MODE
,
&
fd
->
flags
);
/* not white-rabbit: write default to DAC for VCXO */
fd_spi_xfer
(
fd
,
FD_CS_DAC
,
24
,
fd
->
calib
.
vcxo_default_tune
&
0xffff
,
NULL
);
}
spin_unlock_irqrestore
(
&
fd
->
lock
,
flags
);
return
0
;
...
...
kernel/fine-delay.h
View file @
96da921c
...
...
@@ -277,9 +277,10 @@ enum fd_acam_modes {
#define ACAM_MASK ((1<<29) - 1)
/* 28 bits */
/* SPI Bus chip selects */
#define FD_CS_
NONE 0
/* Nothing
*/
#define FD_CS_
DAC 0
/* DAC for VCXO
*/
#define FD_CS_PLL 1
/* AD9516 PLL */
#define FD_CS_GPIO 2
/* MCP23S17 GPIO */
#define FD_CS_NONE 3
/* Unconnected, used as a delay */
/* MCP23S17 register addresses (only ones which are used by the lib) */
#define FD_MCP_IODIR 0x00
...
...
kernel/spi.c
View file @
96da921c
...
...
@@ -46,7 +46,9 @@ int fd_spi_xfer(struct fd_dev *fd, int ss, int num_bits,
int
fd_spi_init
(
struct
fd_dev
*
fd
)
{
/* nothing to do */
/* write default to DAC for VCXO */
fd_spi_xfer
(
fd
,
FD_CS_DAC
,
24
,
fd
->
calib
.
vcxo_default_tune
&
0xffff
,
NULL
);
return
0
;
}
...
...
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