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
Kirill Smelkov
linux
Commits
421c65fd
Commit
421c65fd
authored
Jul 24, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branches 'spi/fix/pax2xx' and 'spi/fix/rockchip' into spi-linus
parents
523d939e
152bc19e
5185a81c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
drivers/spi/spi-pxa2xx.c
drivers/spi/spi-pxa2xx.c
+8
-1
drivers/spi/spi-rockchip.c
drivers/spi/spi-rockchip.c
+17
-0
No files found.
drivers/spi/spi-pxa2xx.c
View file @
421c65fd
...
...
@@ -585,7 +585,14 @@ static void reset_sccr1(struct driver_data *drv_data)
u32
sccr1_reg
;
sccr1_reg
=
pxa2xx_spi_read
(
drv_data
,
SSCR1
)
&
~
drv_data
->
int_cr1
;
switch
(
drv_data
->
ssp_type
)
{
case
QUARK_X1000_SSP
:
sccr1_reg
&=
~
QUARK_X1000_SSCR1_RFT
;
break
;
default:
sccr1_reg
&=
~
SSCR1_RFT
;
break
;
}
sccr1_reg
|=
chip
->
threshold
;
pxa2xx_spi_write
(
drv_data
,
SSCR1
,
sccr1_reg
);
}
...
...
drivers/spi/spi-rockchip.c
View file @
421c65fd
...
...
@@ -142,6 +142,12 @@
/* sclk_out: spi master internal logic in rk3x can support 50Mhz */
#define MAX_SCLK_OUT 50000000
/*
* SPI_CTRLR1 is 16-bits, so we should support lengths of 0xffff + 1. However,
* the controller seems to hang when given 0x10000, so stick with this for now.
*/
#define ROCKCHIP_SPI_MAX_TRANLEN 0xffff
enum
rockchip_ssi_type
{
SSI_MOTO_SPI
=
0
,
SSI_TI_SSP
,
...
...
@@ -573,6 +579,11 @@ static void rockchip_spi_config(struct rockchip_spi *rs)
dev_dbg
(
rs
->
dev
,
"cr0 0x%x, div %d
\n
"
,
cr0
,
div
);
}
static
size_t
rockchip_spi_max_transfer_size
(
struct
spi_device
*
spi
)
{
return
ROCKCHIP_SPI_MAX_TRANLEN
;
}
static
int
rockchip_spi_transfer_one
(
struct
spi_master
*
master
,
struct
spi_device
*
spi
,
...
...
@@ -589,6 +600,11 @@ static int rockchip_spi_transfer_one(
return
-
EINVAL
;
}
if
(
xfer
->
len
>
ROCKCHIP_SPI_MAX_TRANLEN
)
{
dev_err
(
rs
->
dev
,
"Transfer is too long (%d)
\n
"
,
xfer
->
len
);
return
-
EINVAL
;
}
rs
->
speed
=
xfer
->
speed_hz
;
rs
->
bpw
=
xfer
->
bits_per_word
;
rs
->
n_bytes
=
rs
->
bpw
>>
3
;
...
...
@@ -730,6 +746,7 @@ static int rockchip_spi_probe(struct platform_device *pdev)
master
->
prepare_message
=
rockchip_spi_prepare_message
;
master
->
unprepare_message
=
rockchip_spi_unprepare_message
;
master
->
transfer_one
=
rockchip_spi_transfer_one
;
master
->
max_transfer_size
=
rockchip_spi_max_transfer_size
;
master
->
handle_err
=
rockchip_spi_handle_err
;
rs
->
dma_tx
.
ch
=
dma_request_chan
(
rs
->
dev
,
"tx"
);
...
...
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