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
5b1a01c1
Commit
5b1a01c1
authored
Jul 06, 2022
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
spi: Merge AMD fix
Work around problems with large transfers.
parents
30554a1f
6ece49c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
drivers/spi/spi-amd.c
drivers/spi/spi-amd.c
+8
-0
No files found.
drivers/spi/spi-amd.c
View file @
5b1a01c1
...
...
@@ -33,6 +33,7 @@
#define AMD_SPI_RX_COUNT_REG 0x4B
#define AMD_SPI_STATUS_REG 0x4C
#define AMD_SPI_FIFO_SIZE 70
#define AMD_SPI_MEM_SIZE 200
/* M_CMD OP codes for SPI */
...
...
@@ -270,6 +271,11 @@ static int amd_spi_master_transfer(struct spi_master *master,
return
0
;
}
static
size_t
amd_spi_max_transfer_size
(
struct
spi_device
*
spi
)
{
return
AMD_SPI_FIFO_SIZE
;
}
static
int
amd_spi_probe
(
struct
platform_device
*
pdev
)
{
struct
device
*
dev
=
&
pdev
->
dev
;
...
...
@@ -302,6 +308,8 @@ static int amd_spi_probe(struct platform_device *pdev)
master
->
flags
=
SPI_MASTER_HALF_DUPLEX
;
master
->
setup
=
amd_spi_master_setup
;
master
->
transfer_one_message
=
amd_spi_master_transfer
;
master
->
max_transfer_size
=
amd_spi_max_transfer_size
;
master
->
max_message_size
=
amd_spi_max_transfer_size
;
/* Register the controller with SPI framework */
err
=
devm_spi_register_master
(
dev
,
master
);
...
...
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