Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
68a595c7
Commit
68a595c7
authored
Apr 11, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/img-spfi' into spi-linus
parents
f22e6e84
8543d0e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/spi/spi-img-spfi.c
drivers/spi/spi-img-spfi.c
+5
-5
No files found.
drivers/spi/spi-img-spfi.c
View file @
68a595c7
...
...
@@ -405,10 +405,10 @@ static void img_spfi_config(struct spi_master *master, struct spi_device *spi,
/*
* output = spfi_clk * (BITCLK / 512), where BITCLK must be a
* power of 2 up to
256 (where 255 == 256 since BITCLK is 8 bits)
* power of 2 up to
128
*/
div
=
DIV_ROUND_UP
(
master
->
max_speed_hz
,
xfer
->
speed_hz
);
div
=
clamp
(
512
/
(
1
<<
get_count_order
(
div
)),
1
,
255
);
div
=
DIV_ROUND_UP
(
clk_get_rate
(
spfi
->
spfi_clk
)
,
xfer
->
speed_hz
);
div
=
clamp
(
512
/
(
1
<<
get_count_order
(
div
)),
1
,
128
);
val
=
spfi_readl
(
spfi
,
SPFI_DEVICE_PARAMETER
(
spi
->
chip_select
));
val
&=
~
(
SPFI_DEVICE_PARAMETER_BITCLK_MASK
<<
...
...
@@ -594,8 +594,8 @@ static int img_spfi_probe(struct platform_device *pdev)
master
->
num_chipselect
=
5
;
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
master
->
bits_per_word_mask
=
SPI_BPW_MASK
(
32
)
|
SPI_BPW_MASK
(
8
);
master
->
max_speed_hz
=
clk_get_rate
(
spfi
->
spfi_clk
);
master
->
min_speed_hz
=
master
->
max_speed_hz
/
512
;
master
->
max_speed_hz
=
clk_get_rate
(
spfi
->
spfi_clk
)
/
4
;
master
->
min_speed_hz
=
clk_get_rate
(
spfi
->
spfi_clk
)
/
512
;
master
->
set_cs
=
img_spfi_set_cs
;
master
->
transfer_one
=
img_spfi_transfer_one
;
...
...
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