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
c9508d4b
Commit
c9508d4b
authored
Dec 08, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/cadence' into spi-linus
parents
b2776bf7
ee0ebe81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
drivers/spi/spi-cadence.c
drivers/spi/spi-cadence.c
+7
-2
No files found.
drivers/spi/spi-cadence.c
View file @
c9508d4b
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#define CDNS_SPI_CR_CPHA_MASK 0x00000004
/* Clock Phase Control */
#define CDNS_SPI_CR_CPHA_MASK 0x00000004
/* Clock Phase Control */
#define CDNS_SPI_CR_CPOL_MASK 0x00000002
/* Clock Polarity Control */
#define CDNS_SPI_CR_CPOL_MASK 0x00000002
/* Clock Polarity Control */
#define CDNS_SPI_CR_SSCTRL_MASK 0x00003C00
/* Slave Select Mask */
#define CDNS_SPI_CR_SSCTRL_MASK 0x00003C00
/* Slave Select Mask */
#define CDNS_SPI_CR_PERI_SEL_MASK 0x00000200
/* Peripheral Select Decode */
#define CDNS_SPI_CR_BAUD_DIV_MASK 0x00000038
/* Baud Rate Divisor Mask */
#define CDNS_SPI_CR_BAUD_DIV_MASK 0x00000038
/* Baud Rate Divisor Mask */
#define CDNS_SPI_CR_MSTREN_MASK 0x00000001
/* Master Enable Mask */
#define CDNS_SPI_CR_MSTREN_MASK 0x00000001
/* Master Enable Mask */
#define CDNS_SPI_CR_MANSTRTEN_MASK 0x00008000
/* Manual TX Enable Mask */
#define CDNS_SPI_CR_MANSTRTEN_MASK 0x00008000
/* Manual TX Enable Mask */
...
@@ -148,6 +149,11 @@ static inline void cdns_spi_write(struct cdns_spi *xspi, u32 offset, u32 val)
...
@@ -148,6 +149,11 @@ static inline void cdns_spi_write(struct cdns_spi *xspi, u32 offset, u32 val)
*/
*/
static
void
cdns_spi_init_hw
(
struct
cdns_spi
*
xspi
)
static
void
cdns_spi_init_hw
(
struct
cdns_spi
*
xspi
)
{
{
u32
ctrl_reg
=
CDNS_SPI_CR_DEFAULT_MASK
;
if
(
xspi
->
is_decoded_cs
)
ctrl_reg
|=
CDNS_SPI_CR_PERI_SEL_MASK
;
cdns_spi_write
(
xspi
,
CDNS_SPI_ER_OFFSET
,
cdns_spi_write
(
xspi
,
CDNS_SPI_ER_OFFSET
,
CDNS_SPI_ER_DISABLE_MASK
);
CDNS_SPI_ER_DISABLE_MASK
);
cdns_spi_write
(
xspi
,
CDNS_SPI_IDR_OFFSET
,
cdns_spi_write
(
xspi
,
CDNS_SPI_IDR_OFFSET
,
...
@@ -160,8 +166,7 @@ static void cdns_spi_init_hw(struct cdns_spi *xspi)
...
@@ -160,8 +166,7 @@ static void cdns_spi_init_hw(struct cdns_spi *xspi)
cdns_spi_write
(
xspi
,
CDNS_SPI_ISR_OFFSET
,
cdns_spi_write
(
xspi
,
CDNS_SPI_ISR_OFFSET
,
CDNS_SPI_IXR_ALL_MASK
);
CDNS_SPI_IXR_ALL_MASK
);
cdns_spi_write
(
xspi
,
CDNS_SPI_CR_OFFSET
,
cdns_spi_write
(
xspi
,
CDNS_SPI_CR_OFFSET
,
ctrl_reg
);
CDNS_SPI_CR_DEFAULT_MASK
);
cdns_spi_write
(
xspi
,
CDNS_SPI_ER_OFFSET
,
cdns_spi_write
(
xspi
,
CDNS_SPI_ER_OFFSET
,
CDNS_SPI_ER_ENABLE_MASK
);
CDNS_SPI_ER_ENABLE_MASK
);
}
}
...
...
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