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
e1a7d167
Commit
e1a7d167
authored
Apr 05, 2019
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spi-5.1' into spi-5.2
parents
9fda6693
a026525d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
71 deletions
+173
-71
drivers/spi/spi-fsl-lpspi.c
drivers/spi/spi-fsl-lpspi.c
+2
-2
drivers/spi/spi-gpio.c
drivers/spi/spi-gpio.c
+0
-1
drivers/spi/spi-pic32.c
drivers/spi/spi-pic32.c
+1
-1
drivers/spi/spi-tegra114.c
drivers/spi/spi-tegra114.c
+146
-62
drivers/spi/spi-tegra20-slink.c
drivers/spi/spi-tegra20-slink.c
+9
-3
drivers/spi/spi-topcliff-pch.c
drivers/spi/spi-topcliff-pch.c
+13
-2
drivers/spi/spi.c
drivers/spi/spi.c
+2
-0
No files found.
drivers/spi/spi-fsl-lpspi.c
View file @
e1a7d167
...
...
@@ -77,7 +77,7 @@
#define CFGR1_PCSPOL BIT(8)
#define CFGR1_NOSTALL BIT(3)
#define CFGR1_MASTER BIT(0)
#define FSR_
RXCOUNT (BIT(16)|BIT(17)|BIT(18)
)
#define FSR_
TXCOUNT (0xFF
)
#define RSR_RXEMPTY BIT(1)
#define TCR_CPOL BIT(31)
#define TCR_CPHA BIT(30)
...
...
@@ -771,7 +771,7 @@ static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id)
}
if
(
temp_SR
&
SR_MBF
||
readl
(
fsl_lpspi
->
base
+
IMX7ULP_FSR
)
&
FSR_
R
XCOUNT
)
{
readl
(
fsl_lpspi
->
base
+
IMX7ULP_FSR
)
&
FSR_
T
XCOUNT
)
{
writel
(
SR_FCF
,
fsl_lpspi
->
base
+
IMX7ULP_SR
);
fsl_lpspi_intctrl
(
fsl_lpspi
,
IER_FCIE
);
return
IRQ_HANDLED
;
...
...
drivers/spi/spi-gpio.c
View file @
e1a7d167
...
...
@@ -35,7 +35,6 @@
* platform_device->driver_data ... points to spi_gpio
*
* spi->controller_state ... reserved for bitbang framework code
* spi->controller_data ... holds chipselect GPIO
*
* spi->master->dev.driver_data ... points to spi_gpio->bitbang
*/
...
...
drivers/spi/spi-pic32.c
View file @
e1a7d167
...
...
@@ -559,7 +559,7 @@ static int pic32_spi_one_transfer(struct spi_master *master,
dev_err
(
&
spi
->
dev
,
"wait error/timedout
\n
"
);
if
(
dma_issued
)
{
dmaengine_terminate_all
(
master
->
dma_rx
);
dmaengine_terminate_all
(
master
->
dma_
r
x
);
dmaengine_terminate_all
(
master
->
dma_
t
x
);
}
ret
=
-
ETIMEDOUT
;
}
else
{
...
...
drivers/spi/spi-tegra114.c
View file @
e1a7d167
This diff is collapsed.
Click to expand it.
drivers/spi/spi-tegra20-slink.c
View file @
e1a7d167
...
...
@@ -717,9 +717,6 @@ static int tegra_slink_start_transfer_one(struct spi_device *spi,
command2
=
tspi
->
command2_reg
;
command2
&=
~
(
SLINK_RXEN
|
SLINK_TXEN
);
tegra_slink_writel
(
tspi
,
command
,
SLINK_COMMAND
);
tspi
->
command_reg
=
command
;
tspi
->
cur_direction
=
0
;
if
(
t
->
rx_buf
)
{
command2
|=
SLINK_RXEN
;
...
...
@@ -729,9 +726,18 @@ static int tegra_slink_start_transfer_one(struct spi_device *spi,
command2
|=
SLINK_TXEN
;
tspi
->
cur_direction
|=
DATA_DIR_TX
;
}
/*
* Writing to the command2 register bevore the command register prevents
* a spike in chip_select line 0. This selects the chip_select line
* before changing the chip_select value.
*/
tegra_slink_writel
(
tspi
,
command2
,
SLINK_COMMAND2
);
tspi
->
command2_reg
=
command2
;
tegra_slink_writel
(
tspi
,
command
,
SLINK_COMMAND
);
tspi
->
command_reg
=
command
;
if
(
total_fifo_words
>
SLINK_FIFO_DEPTH
)
ret
=
tegra_slink_start_dma_based_transfer
(
tspi
,
t
);
else
...
...
drivers/spi/spi-topcliff-pch.c
View file @
e1a7d167
...
...
@@ -1299,18 +1299,27 @@ static void pch_free_dma_buf(struct pch_spi_board_data *board_dat,
dma
->
rx_buf_virt
,
dma
->
rx_buf_dma
);
}
static
void
pch_alloc_dma_buf
(
struct
pch_spi_board_data
*
board_dat
,
static
int
pch_alloc_dma_buf
(
struct
pch_spi_board_data
*
board_dat
,
struct
pch_spi_data
*
data
)
{
struct
pch_spi_dma_ctrl
*
dma
;
int
ret
;
dma
=
&
data
->
dma
;
ret
=
0
;
/* Get Consistent memory for Tx DMA */
dma
->
tx_buf_virt
=
dma_alloc_coherent
(
&
board_dat
->
pdev
->
dev
,
PCH_BUF_SIZE
,
&
dma
->
tx_buf_dma
,
GFP_KERNEL
);
if
(
!
dma
->
tx_buf_virt
)
ret
=
-
ENOMEM
;
/* Get Consistent memory for Rx DMA */
dma
->
rx_buf_virt
=
dma_alloc_coherent
(
&
board_dat
->
pdev
->
dev
,
PCH_BUF_SIZE
,
&
dma
->
rx_buf_dma
,
GFP_KERNEL
);
if
(
!
dma
->
rx_buf_virt
)
ret
=
-
ENOMEM
;
return
ret
;
}
static
int
pch_spi_pd_probe
(
struct
platform_device
*
plat_dev
)
...
...
@@ -1387,7 +1396,9 @@ static int pch_spi_pd_probe(struct platform_device *plat_dev)
if
(
use_dma
)
{
dev_info
(
&
plat_dev
->
dev
,
"Use DMA for data transfers
\n
"
);
pch_alloc_dma_buf
(
board_dat
,
data
);
ret
=
pch_alloc_dma_buf
(
board_dat
,
data
);
if
(
ret
)
goto
err_spi_register_master
;
}
ret
=
spi_register_master
(
master
);
...
...
drivers/spi/spi.c
View file @
e1a7d167
...
...
@@ -2199,6 +2199,8 @@ static int spi_get_gpio_descs(struct spi_controller *ctlr)
*/
cs
[
i
]
=
devm_gpiod_get_index_optional
(
dev
,
"cs"
,
i
,
GPIOD_OUT_LOW
);
if
(
IS_ERR
(
cs
[
i
]))
return
PTR_ERR
(
cs
[
i
]);
if
(
cs
[
i
])
{
/*
...
...
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