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
e47ef0f1
Commit
e47ef0f1
authored
Apr 01, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spi-fix' into spi-next
parents
823cd045
1ad849ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
25 deletions
+33
-25
drivers/spi/spi-mpc512x-psc.c
drivers/spi/spi-mpc512x-psc.c
+1
-1
drivers/spi/spi-s3c64xx.c
drivers/spi/spi-s3c64xx.c
+25
-16
drivers/spi/spi.c
drivers/spi/spi.c
+7
-8
No files found.
drivers/spi/spi-mpc512x-psc.c
View file @
e47ef0f1
...
...
@@ -164,7 +164,7 @@ static int mpc512x_psc_spi_transfer_rxtx(struct spi_device *spi,
for
(
i
=
count
;
i
>
0
;
i
--
)
{
data
=
tx_buf
?
*
tx_buf
++
:
0
;
if
(
len
==
EOFBYTE
)
if
(
len
==
EOFBYTE
&&
t
->
cs_change
)
setbits32
(
&
fifo
->
txcmd
,
MPC512x_PSC_FIFO_EOF
);
out_8
(
&
fifo
->
txdata_8
,
data
);
len
--
;
...
...
drivers/spi/spi-s3c64xx.c
View file @
e47ef0f1
...
...
@@ -984,25 +984,30 @@ static irqreturn_t s3c64xx_spi_irq(int irq, void *data)
{
struct
s3c64xx_spi_driver_data
*
sdd
=
data
;
struct
spi_master
*
spi
=
sdd
->
master
;
unsigned
int
val
;
unsigned
int
val
,
clr
=
0
;
val
=
readl
(
sdd
->
regs
+
S3C64XX_SPI_
PENDING_CLR
);
val
=
readl
(
sdd
->
regs
+
S3C64XX_SPI_
STATUS
);
val
&=
S3C64XX_SPI_PND_RX_OVERRUN_CLR
|
S3C64XX_SPI_PND_RX_UNDERRUN_CLR
|
S3C64XX_SPI_PND_TX_OVERRUN_CLR
|
S3C64XX_SPI_PND_TX_UNDERRUN_CLR
;
writel
(
val
,
sdd
->
regs
+
S3C64XX_SPI_PENDING_CLR
);
if
(
val
&
S3C64XX_SPI_PND_RX_OVERRUN_CLR
)
if
(
val
&
S3C64XX_SPI_ST_RX_OVERRUN_ERR
)
{
clr
=
S3C64XX_SPI_PND_RX_OVERRUN_CLR
;
dev_err
(
&
spi
->
dev
,
"RX overrun
\n
"
);
if
(
val
&
S3C64XX_SPI_PND_RX_UNDERRUN_CLR
)
}
if
(
val
&
S3C64XX_SPI_ST_RX_UNDERRUN_ERR
)
{
clr
|=
S3C64XX_SPI_PND_RX_UNDERRUN_CLR
;
dev_err
(
&
spi
->
dev
,
"RX underrun
\n
"
);
if
(
val
&
S3C64XX_SPI_PND_TX_OVERRUN_CLR
)
}
if
(
val
&
S3C64XX_SPI_ST_TX_OVERRUN_ERR
)
{
clr
|=
S3C64XX_SPI_PND_TX_OVERRUN_CLR
;
dev_err
(
&
spi
->
dev
,
"TX overrun
\n
"
);
if
(
val
&
S3C64XX_SPI_PND_TX_UNDERRUN_CLR
)
}
if
(
val
&
S3C64XX_SPI_ST_TX_UNDERRUN_ERR
)
{
clr
|=
S3C64XX_SPI_PND_TX_UNDERRUN_CLR
;
dev_err
(
&
spi
->
dev
,
"TX underrun
\n
"
);
}
/* Clear the pending irq by setting and then clearing it */
writel
(
clr
,
sdd
->
regs
+
S3C64XX_SPI_PENDING_CLR
);
writel
(
0
,
sdd
->
regs
+
S3C64XX_SPI_PENDING_CLR
);
return
IRQ_HANDLED
;
}
...
...
@@ -1026,9 +1031,13 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd, int channel)
writel
(
0
,
regs
+
S3C64XX_SPI_MODE_CFG
);
writel
(
0
,
regs
+
S3C64XX_SPI_PACKET_CNT
);
/* Clear any irq pending bits */
writel
(
readl
(
regs
+
S3C64XX_SPI_PENDING_CLR
),
regs
+
S3C64XX_SPI_PENDING_CLR
);
/* Clear any irq pending bits, should set and clear the bits */
val
=
S3C64XX_SPI_PND_RX_OVERRUN_CLR
|
S3C64XX_SPI_PND_RX_UNDERRUN_CLR
|
S3C64XX_SPI_PND_TX_OVERRUN_CLR
|
S3C64XX_SPI_PND_TX_UNDERRUN_CLR
;
writel
(
val
,
regs
+
S3C64XX_SPI_PENDING_CLR
);
writel
(
0
,
regs
+
S3C64XX_SPI_PENDING_CLR
);
writel
(
0
,
regs
+
S3C64XX_SPI_SWAP_CFG
);
...
...
drivers/spi/spi.c
View file @
e47ef0f1
...
...
@@ -543,17 +543,16 @@ static void spi_pump_messages(struct kthread_work *work)
/* Lock queue and check for queue work */
spin_lock_irqsave
(
&
master
->
queue_lock
,
flags
);
if
(
list_empty
(
&
master
->
queue
)
||
!
master
->
running
)
{
if
(
master
->
busy
&&
master
->
unprepare_transfer_hardware
)
{
ret
=
master
->
unprepare_transfer_hardware
(
master
);
if
(
ret
)
{
if
(
!
master
->
busy
)
{
spin_unlock_irqrestore
(
&
master
->
queue_lock
,
flags
);
dev_err
(
&
master
->
dev
,
"failed to unprepare transfer hardware
\n
"
);
return
;
}
}
master
->
busy
=
false
;
spin_unlock_irqrestore
(
&
master
->
queue_lock
,
flags
);
if
(
master
->
unprepare_transfer_hardware
&&
master
->
unprepare_transfer_hardware
(
master
))
dev_err
(
&
master
->
dev
,
"failed to unprepare transfer hardware
\n
"
);
return
;
}
...
...
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