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
d5f78f50
Commit
d5f78f50
authored
Aug 26, 2021
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/for-5.14' into spi-linus
parents
e22ce8eb
ea4ab99c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
drivers/spi/spi-coldfire-qspi.c
drivers/spi/spi-coldfire-qspi.c
+1
-1
drivers/spi/spi-davinci.c
drivers/spi/spi-davinci.c
+1
-7
drivers/spi/spi-orion.c
drivers/spi/spi-orion.c
+16
-6
No files found.
drivers/spi/spi-coldfire-qspi.c
View file @
d5f78f50
...
@@ -444,7 +444,7 @@ static int mcfqspi_remove(struct platform_device *pdev)
...
@@ -444,7 +444,7 @@ static int mcfqspi_remove(struct platform_device *pdev)
mcfqspi_wr_qmr
(
mcfqspi
,
MCFQSPI_QMR_MSTR
);
mcfqspi_wr_qmr
(
mcfqspi
,
MCFQSPI_QMR_MSTR
);
mcfqspi_cs_teardown
(
mcfqspi
);
mcfqspi_cs_teardown
(
mcfqspi
);
clk_disable
(
mcfqspi
->
clk
);
clk_disable
_unprepare
(
mcfqspi
->
clk
);
return
0
;
return
0
;
}
}
...
...
drivers/spi/spi-davinci.c
View file @
d5f78f50
...
@@ -213,12 +213,6 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
...
@@ -213,12 +213,6 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
* line for the controller
* line for the controller
*/
*/
if
(
spi
->
cs_gpiod
)
{
if
(
spi
->
cs_gpiod
)
{
/*
* FIXME: is this code ever executed? This host does not
* set SPI_MASTER_GPIO_SS so this chipselect callback should
* not get called from the SPI core when we are using
* GPIOs for chip select.
*/
if
(
value
==
BITBANG_CS_ACTIVE
)
if
(
value
==
BITBANG_CS_ACTIVE
)
gpiod_set_value
(
spi
->
cs_gpiod
,
1
);
gpiod_set_value
(
spi
->
cs_gpiod
,
1
);
else
else
...
@@ -945,7 +939,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
...
@@ -945,7 +939,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
master
->
bus_num
=
pdev
->
id
;
master
->
bus_num
=
pdev
->
id
;
master
->
num_chipselect
=
pdata
->
num_chipselect
;
master
->
num_chipselect
=
pdata
->
num_chipselect
;
master
->
bits_per_word_mask
=
SPI_BPW_RANGE_MASK
(
2
,
16
);
master
->
bits_per_word_mask
=
SPI_BPW_RANGE_MASK
(
2
,
16
);
master
->
flags
=
SPI_MASTER_MUST_RX
;
master
->
flags
=
SPI_MASTER_MUST_RX
|
SPI_MASTER_GPIO_SS
;
master
->
setup
=
davinci_spi_setup
;
master
->
setup
=
davinci_spi_setup
;
master
->
cleanup
=
davinci_spi_cleanup
;
master
->
cleanup
=
davinci_spi_cleanup
;
master
->
can_dma
=
davinci_spi_can_dma
;
master
->
can_dma
=
davinci_spi_can_dma
;
...
...
drivers/spi/spi-orion.c
View file @
d5f78f50
...
@@ -328,8 +328,16 @@ orion_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
...
@@ -328,8 +328,16 @@ orion_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
static
void
orion_spi_set_cs
(
struct
spi_device
*
spi
,
bool
enable
)
static
void
orion_spi_set_cs
(
struct
spi_device
*
spi
,
bool
enable
)
{
{
struct
orion_spi
*
orion_spi
;
struct
orion_spi
*
orion_spi
;
void
__iomem
*
ctrl_reg
;
u32
val
;
orion_spi
=
spi_master_get_devdata
(
spi
->
master
);
orion_spi
=
spi_master_get_devdata
(
spi
->
master
);
ctrl_reg
=
spi_reg
(
orion_spi
,
ORION_SPI_IF_CTRL_REG
);
val
=
readl
(
ctrl_reg
);
/* Clear existing chip-select and assertion state */
val
&=
~
(
ORION_SPI_CS_MASK
|
0x1
);
/*
/*
* If this line is using a GPIO to control chip select, this internal
* If this line is using a GPIO to control chip select, this internal
...
@@ -338,9 +346,7 @@ static void orion_spi_set_cs(struct spi_device *spi, bool enable)
...
@@ -338,9 +346,7 @@ static void orion_spi_set_cs(struct spi_device *spi, bool enable)
* as it is handled by a GPIO, but that doesn't matter. What we need
* as it is handled by a GPIO, but that doesn't matter. What we need
* is to deassert the old chip select and assert some other chip select.
* is to deassert the old chip select and assert some other chip select.
*/
*/
orion_spi_clrbits
(
orion_spi
,
ORION_SPI_IF_CTRL_REG
,
ORION_SPI_CS_MASK
);
val
|=
ORION_SPI_CS
(
spi
->
chip_select
);
orion_spi_setbits
(
orion_spi
,
ORION_SPI_IF_CTRL_REG
,
ORION_SPI_CS
(
spi
->
chip_select
));
/*
/*
* Chip select logic is inverted from spi_set_cs(). For lines using a
* Chip select logic is inverted from spi_set_cs(). For lines using a
...
@@ -350,9 +356,13 @@ static void orion_spi_set_cs(struct spi_device *spi, bool enable)
...
@@ -350,9 +356,13 @@ static void orion_spi_set_cs(struct spi_device *spi, bool enable)
* doesn't matter.
* doesn't matter.
*/
*/
if
(
!
enable
)
if
(
!
enable
)
orion_spi_setbits
(
orion_spi
,
ORION_SPI_IF_CTRL_REG
,
0x1
);
val
|=
0x1
;
else
orion_spi_clrbits
(
orion_spi
,
ORION_SPI_IF_CTRL_REG
,
0x1
);
/*
* To avoid toggling unwanted chip selects update the register
* with a single write.
*/
writel
(
val
,
ctrl_reg
);
}
}
static
inline
int
orion_spi_wait_till_ready
(
struct
orion_spi
*
orion_spi
)
static
inline
int
orion_spi_wait_till_ready
(
struct
orion_spi
*
orion_spi
)
...
...
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