Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
2155b47a
Commit
2155b47a
authored
Jan 26, 2021
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
boards/afcz: adapt to updated si57x core interface
parent
5d28f0fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
board.c
boards/afcz/board.c
+6
-3
No files found.
boards/afcz/board.c
View file @
2155b47a
...
...
@@ -244,6 +244,9 @@ static int si57x_calc_frequency( uint32_t f_xtal, uint32_t freq_hz, uint64_t *rf
*
hsdiv_out
=
hsdiv_idx
;
*
n1_out
=
n1
;
board_dbg
(
"Si57x: New RFREQ %08x %08x n1 %d hsdiv %d
\n
"
,
(
uint32_t
)
(
*
rfreq_out
>>
32
),
(
uint32_t
)
*
rfreq_out
,
(
int
)
*
n1_out
,
(
int
)
*
hsdiv_out
);
//found = 1;
return
0
;
}
}
...
...
@@ -292,8 +295,8 @@ static int si57x_set_frequency( struct wr_si57x_interface_device *dev, uint32_t
timer_delay_ms
(
10
);
writel
(
(
uint32_t
)
(
rfreq
&
0xffffffffULL
),
dev
->
base_addr
+
SI570_REG_RFREQL
);
writel
(
(
uint32_t
)
(
rfreq
>>
32
)
|
(((
n1
-
1
)
&
0xff
)
<<
6
),
dev
->
base_addr
+
SI570_REG_RFREQH
);
writel
(
SI570_CR_ENABLE
|
SI570_CR_CLK_DIV_W
(
1
00
)
|
SI570_CR_I2C_ADDR_W
(
(
dev
->
i2c_addr
<<
1
)
)
|
SI570_CR_GAIN_W
(
2
),
dev
->
base_addr
+
SI570_REG_CR
);
writel
(
(
uint32_t
)
(
rfreq
>>
32
)
|
(((
n1
-
1
)
&
0xff
)
<<
8
)
|
(
hsdiv
<<
1
6
),
dev
->
base_addr
+
SI570_REG_RFREQH
);
writel
(
SI570_CR_ENABLE
|
SI570_CR_CLK_DIV_W
(
2
00
)
|
SI570_CR_I2C_ADDR_W
(
(
dev
->
i2c_addr
<<
1
)
)
|
SI570_CR_GAIN_W
(
2
),
dev
->
base_addr
+
SI570_REG_CR
);
si57x_read
(
dev
,
135
,
&
r135
,
1
);
si57x_read
(
dev
,
137
,
&
r137
,
1
);
...
...
@@ -704,7 +707,7 @@ int wrc_board_early_init()
#if 1
set_dmtd_dac
(
32767
);
set_main_dac
(
3
2767
);
set_main_dac
(
3
0000
);
ep_reset_phy
(
&
wrc_endpoint_dev
);
//afcz_check_clocks();
...
...
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