Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e47ef0f1
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e47ef0f1
编写于
4月 01, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'spi-fix' into spi-next
上级
823cd045
1ad849ae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
25 deletion
+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
未找到文件。
drivers/spi/spi-mpc512x-psc.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
)
{
spin_unlock_irqrestore
(
&
master
->
queue_lock
,
flags
);
dev_err
(
&
master
->
dev
,
"failed to unprepare transfer hardware
\n
"
);
return
;
}
if
(
!
master
->
busy
)
{
spin_unlock_irqrestore
(
&
master
->
queue_lock
,
flags
);
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
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录