Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
16c10b3b
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
16c10b3b
编写于
6月 04, 2018
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'spi-4.17' into spi-4.18 for the merge window
上级
29e795ca
0921e11e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
12 deletion
+35
-12
drivers/spi/spi-bcm-qspi.c
drivers/spi/spi-bcm-qspi.c
+18
-10
drivers/spi/spi-bcm2835aux.c
drivers/spi/spi-bcm2835aux.c
+5
-0
drivers/spi/spi-cadence.c
drivers/spi/spi-cadence.c
+8
-0
drivers/spi/spi-sh-msiof.c
drivers/spi/spi-sh-msiof.c
+4
-2
未找到文件。
drivers/spi/spi-bcm-qspi.c
浏览文件 @
16c10b3b
...
...
@@ -488,7 +488,7 @@ static int bcm_qspi_bspi_set_mode(struct bcm_qspi *qspi,
static
void
bcm_qspi_enable_bspi
(
struct
bcm_qspi
*
qspi
)
{
if
(
!
has_bspi
(
qspi
)
||
(
qspi
->
bspi_enabled
)
)
if
(
!
has_bspi
(
qspi
))
return
;
qspi
->
bspi_enabled
=
1
;
...
...
@@ -503,7 +503,7 @@ static void bcm_qspi_enable_bspi(struct bcm_qspi *qspi)
static
void
bcm_qspi_disable_bspi
(
struct
bcm_qspi
*
qspi
)
{
if
(
!
has_bspi
(
qspi
)
||
(
!
qspi
->
bspi_enabled
)
)
if
(
!
has_bspi
(
qspi
))
return
;
qspi
->
bspi_enabled
=
0
;
...
...
@@ -517,16 +517,19 @@ static void bcm_qspi_disable_bspi(struct bcm_qspi *qspi)
static
void
bcm_qspi_chip_select
(
struct
bcm_qspi
*
qspi
,
int
cs
)
{
u32
data
=
0
;
u32
rd
=
0
;
u32
wr
=
0
;
if
(
qspi
->
curr_cs
==
cs
)
return
;
if
(
qspi
->
base
[
CHIP_SELECT
])
{
data
=
bcm_qspi_read
(
qspi
,
CHIP_SELECT
,
0
);
data
=
(
data
&
~
0xff
)
|
(
1
<<
cs
);
bcm_qspi_write
(
qspi
,
CHIP_SELECT
,
0
,
data
);
rd
=
bcm_qspi_read
(
qspi
,
CHIP_SELECT
,
0
);
wr
=
(
rd
&
~
0xff
)
|
(
1
<<
cs
);
if
(
rd
==
wr
)
return
;
bcm_qspi_write
(
qspi
,
CHIP_SELECT
,
0
,
wr
);
usleep_range
(
10
,
20
);
}
dev_dbg
(
&
qspi
->
pdev
->
dev
,
"using cs:%d
\n
"
,
cs
);
qspi
->
curr_cs
=
cs
;
}
...
...
@@ -753,8 +756,13 @@ static int write_to_hw(struct bcm_qspi *qspi, struct spi_device *spi)
dev_dbg
(
&
qspi
->
pdev
->
dev
,
"WR %04x
\n
"
,
val
);
}
mspi_cdram
=
MSPI_CDRAM_CONT_BIT
;
mspi_cdram
|=
(
~
(
1
<<
spi
->
chip_select
)
&
MSPI_CDRAM_PCS
);
if
(
has_bspi
(
qspi
))
mspi_cdram
&=
~
1
;
else
mspi_cdram
|=
(
~
(
1
<<
spi
->
chip_select
)
&
MSPI_CDRAM_PCS
);
mspi_cdram
|=
((
tp
.
trans
->
bits_per_word
<=
8
)
?
0
:
MSPI_CDRAM_BITSE_BIT
);
...
...
drivers/spi/spi-bcm2835aux.c
浏览文件 @
16c10b3b
...
...
@@ -184,6 +184,11 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
struct
bcm2835aux_spi
*
bs
=
spi_master_get_devdata
(
master
);
irqreturn_t
ret
=
IRQ_NONE
;
/* IRQ may be shared, so return if our interrupts are disabled */
if
(
!
(
bcm2835aux_rd
(
bs
,
BCM2835_AUX_SPI_CNTL1
)
&
(
BCM2835_AUX_SPI_CNTL1_TXEMPTY
|
BCM2835_AUX_SPI_CNTL1_IDLE
)))
return
ret
;
/* check if we have data to read */
while
(
bs
->
rx_len
&&
(
!
(
bcm2835aux_rd
(
bs
,
BCM2835_AUX_SPI_STAT
)
&
...
...
drivers/spi/spi-cadence.c
浏览文件 @
16c10b3b
...
...
@@ -313,6 +313,14 @@ static void cdns_spi_fill_tx_fifo(struct cdns_spi *xspi)
while
((
trans_cnt
<
CDNS_SPI_FIFO_DEPTH
)
&&
(
xspi
->
tx_bytes
>
0
))
{
/* When xspi in busy condition, bytes may send failed,
* then spi control did't work thoroughly, add one byte delay
*/
if
(
cdns_spi_read
(
xspi
,
CDNS_SPI_ISR
)
&
CDNS_SPI_IXR_TXFULL
)
usleep_range
(
10
,
20
);
if
(
xspi
->
txbuf
)
cdns_spi_write
(
xspi
,
CDNS_SPI_TXD
,
*
xspi
->
txbuf
++
);
else
...
...
drivers/spi/spi-sh-msiof.c
浏览文件 @
16c10b3b
...
...
@@ -567,14 +567,16 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
/* Configure native chip select mode/polarity early */
clr
=
MDR1_SYNCMD_MASK
;
set
=
MDR1_
TRMD
|
TMDR1_PCON
|
MDR1_
SYNCMD_SPI
;
set
=
MDR1_SYNCMD_SPI
;
if
(
spi
->
mode
&
SPI_CS_HIGH
)
clr
|=
BIT
(
MDR1_SYNCAC_SHIFT
);
else
set
|=
BIT
(
MDR1_SYNCAC_SHIFT
);
pm_runtime_get_sync
(
&
p
->
pdev
->
dev
);
tmp
=
sh_msiof_read
(
p
,
TMDR1
)
&
~
clr
;
sh_msiof_write
(
p
,
TMDR1
,
tmp
|
set
);
sh_msiof_write
(
p
,
TMDR1
,
tmp
|
set
|
MDR1_TRMD
|
TMDR1_PCON
);
tmp
=
sh_msiof_read
(
p
,
RMDR1
)
&
~
clr
;
sh_msiof_write
(
p
,
RMDR1
,
tmp
|
set
);
pm_runtime_put
(
&
p
->
pdev
->
dev
);
p
->
native_cs_high
=
spi
->
mode
&
SPI_CS_HIGH
;
p
->
native_cs_inited
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录