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
70f092a5
Commit
70f092a5
authored
Jul 15, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/xilinx' into spi-linus
parents
52bc441a
e0761953
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
drivers/spi/spi-xilinx.c
drivers/spi/spi-xilinx.c
+16
-0
No files found.
drivers/spi/spi-xilinx.c
View file @
70f092a5
...
@@ -233,6 +233,21 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi,
...
@@ -233,6 +233,21 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi,
return
0
;
return
0
;
}
}
static
int
xilinx_spi_setup
(
struct
spi_device
*
spi
)
{
/* always return 0, we can not check the number of bits.
* There are cases when SPI setup is called before any driver is
* there, in that case the SPI core defaults to 8 bits, which we
* do not support in some cases. But if we return an error, the
* SPI device would not be registered and no driver can get hold of it
* When the driver is there, it will call SPI setup again with the
* correct number of bits per transfer.
* If a driver setups with the wrong bit number, it will fail when
* it tries to do a transfer
*/
return
0
;
}
static
void
xilinx_spi_fill_tx_fifo
(
struct
xilinx_spi
*
xspi
)
static
void
xilinx_spi_fill_tx_fifo
(
struct
xilinx_spi
*
xspi
)
{
{
u8
sr
;
u8
sr
;
...
@@ -360,6 +375,7 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem,
...
@@ -360,6 +375,7 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem,
xspi
->
bitbang
.
chipselect
=
xilinx_spi_chipselect
;
xspi
->
bitbang
.
chipselect
=
xilinx_spi_chipselect
;
xspi
->
bitbang
.
setup_transfer
=
xilinx_spi_setup_transfer
;
xspi
->
bitbang
.
setup_transfer
=
xilinx_spi_setup_transfer
;
xspi
->
bitbang
.
txrx_bufs
=
xilinx_spi_txrx_bufs
;
xspi
->
bitbang
.
txrx_bufs
=
xilinx_spi_txrx_bufs
;
xspi
->
bitbang
.
master
->
setup
=
xilinx_spi_setup
;
init_completion
(
&
xspi
->
done
);
init_completion
(
&
xspi
->
done
);
if
(
!
request_mem_region
(
mem
->
start
,
resource_size
(
mem
),
if
(
!
request_mem_region
(
mem
->
start
,
resource_size
(
mem
),
...
...
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