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
d426a842
Commit
d426a842
authored
Feb 04, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branches 'spi/fix/fsl-dspi' and 'spi/fix/imx' into spi-linus
parents
e36f014e
973fbce6
a02bb401
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
drivers/spi/spi-fsl-dspi.c
drivers/spi/spi-fsl-dspi.c
+12
-2
drivers/spi/spi-imx.c
drivers/spi/spi-imx.c
+4
-0
No files found.
drivers/spi/spi-fsl-dspi.c
View file @
d426a842
...
...
@@ -342,8 +342,7 @@ static int dspi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
/* Only alloc on first setup */
chip
=
spi_get_ctldata
(
spi
);
if
(
chip
==
NULL
)
{
chip
=
devm_kzalloc
(
&
spi
->
dev
,
sizeof
(
struct
chip_data
),
GFP_KERNEL
);
chip
=
kzalloc
(
sizeof
(
struct
chip_data
),
GFP_KERNEL
);
if
(
!
chip
)
return
-
ENOMEM
;
}
...
...
@@ -382,6 +381,16 @@ static int dspi_setup(struct spi_device *spi)
return
dspi_setup_transfer
(
spi
,
NULL
);
}
static
void
dspi_cleanup
(
struct
spi_device
*
spi
)
{
struct
chip_data
*
chip
=
spi_get_ctldata
((
struct
spi_device
*
)
spi
);
dev_dbg
(
&
spi
->
dev
,
"spi_device %u.%u cleanup
\n
"
,
spi
->
master
->
bus_num
,
spi
->
chip_select
);
kfree
(
chip
);
}
static
irqreturn_t
dspi_interrupt
(
int
irq
,
void
*
dev_id
)
{
struct
fsl_dspi
*
dspi
=
(
struct
fsl_dspi
*
)
dev_id
;
...
...
@@ -467,6 +476,7 @@ static int dspi_probe(struct platform_device *pdev)
dspi
->
bitbang
.
master
->
setup
=
dspi_setup
;
dspi
->
bitbang
.
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
master
->
cleanup
=
dspi_cleanup
;
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
;
master
->
bits_per_word_mask
=
SPI_BPW_MASK
(
4
)
|
SPI_BPW_MASK
(
8
)
|
SPI_BPW_MASK
(
16
);
...
...
drivers/spi/spi-imx.c
View file @
d426a842
...
...
@@ -823,6 +823,10 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
struct
dma_slave_config
slave_config
=
{};
int
ret
;
/* use pio mode for i.mx6dl chip TKT238285 */
if
(
of_machine_is_compatible
(
"fsl,imx6dl"
))
return
0
;
/* Prepare for TX DMA: */
master
->
dma_tx
=
dma_request_slave_channel
(
dev
,
"tx"
);
if
(
!
master
->
dma_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