Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a0a53a43
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a0a53a43
编写于
10年前
作者:
V
Vinod Koul
浏览文件
操作
浏览文件
下载
差异文件
Merge commit 'tags/spi-pxa2xx-clk' into for-linus
上级
29897087
afa93c90
无相关合并请求
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
2 deletion
+21
-2
drivers/spi/Kconfig
drivers/spi/Kconfig
+1
-1
drivers/spi/spi-pxa2xx-pci.c
drivers/spi/spi-pxa2xx-pci.c
+20
-1
未找到文件。
drivers/spi/Kconfig
浏览文件 @
a0a53a43
...
@@ -380,7 +380,7 @@ config SPI_PXA2XX
...
@@ -380,7 +380,7 @@ config SPI_PXA2XX
additional documentation can be found a Documentation/spi/pxa2xx.
additional documentation can be found a Documentation/spi/pxa2xx.
config SPI_PXA2XX_PCI
config SPI_PXA2XX_PCI
def_tristate SPI_PXA2XX && PCI
def_tristate SPI_PXA2XX && PCI
&& COMMON_CLK
config SPI_ROCKCHIP
config SPI_ROCKCHIP
tristate "Rockchip SPI controller driver"
tristate "Rockchip SPI controller driver"
...
...
This diff is collapsed.
Click to expand it.
drivers/spi/spi-pxa2xx-pci.c
浏览文件 @
a0a53a43
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include <linux/of_device.h>
#include <linux/of_device.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/spi/pxa2xx_spi.h>
#include <linux/spi/pxa2xx_spi.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
enum
{
enum
{
PORT_CE4100
,
PORT_CE4100
,
...
@@ -21,6 +23,7 @@ struct pxa_spi_info {
...
@@ -21,6 +23,7 @@ struct pxa_spi_info {
int
tx_chan_id
;
int
tx_chan_id
;
int
rx_slave_id
;
int
rx_slave_id
;
int
rx_chan_id
;
int
rx_chan_id
;
unsigned
long
max_clk_rate
;
};
};
static
struct
pxa_spi_info
spi_info_configs
[]
=
{
static
struct
pxa_spi_info
spi_info_configs
[]
=
{
...
@@ -32,6 +35,7 @@ static struct pxa_spi_info spi_info_configs[] = {
...
@@ -32,6 +35,7 @@ static struct pxa_spi_info spi_info_configs[] = {
.
tx_chan_id
=
-
1
,
.
tx_chan_id
=
-
1
,
.
rx_slave_id
=
-
1
,
.
rx_slave_id
=
-
1
,
.
rx_chan_id
=
-
1
,
.
rx_chan_id
=
-
1
,
.
max_clk_rate
=
3686400
,
},
},
[
PORT_BYT
]
=
{
[
PORT_BYT
]
=
{
.
type
=
LPSS_SSP
,
.
type
=
LPSS_SSP
,
...
@@ -41,6 +45,7 @@ static struct pxa_spi_info spi_info_configs[] = {
...
@@ -41,6 +45,7 @@ static struct pxa_spi_info spi_info_configs[] = {
.
tx_chan_id
=
0
,
.
tx_chan_id
=
0
,
.
rx_slave_id
=
1
,
.
rx_slave_id
=
1
,
.
rx_chan_id
=
1
,
.
rx_chan_id
=
1
,
.
max_clk_rate
=
50000000
,
},
},
};
};
...
@@ -53,6 +58,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
...
@@ -53,6 +58,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
struct
pxa2xx_spi_master
spi_pdata
;
struct
pxa2xx_spi_master
spi_pdata
;
struct
ssp_device
*
ssp
;
struct
ssp_device
*
ssp
;
struct
pxa_spi_info
*
c
;
struct
pxa_spi_info
*
c
;
char
buf
[
40
];
ret
=
pcim_enable_device
(
dev
);
ret
=
pcim_enable_device
(
dev
);
if
(
ret
)
if
(
ret
)
...
@@ -84,6 +90,12 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
...
@@ -84,6 +90,12 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
ssp
->
port_id
=
(
c
->
port_id
>=
0
)
?
c
->
port_id
:
dev
->
devfn
;
ssp
->
port_id
=
(
c
->
port_id
>=
0
)
?
c
->
port_id
:
dev
->
devfn
;
ssp
->
type
=
c
->
type
;
ssp
->
type
=
c
->
type
;
snprintf
(
buf
,
sizeof
(
buf
),
"pxa2xx-spi.%d"
,
ssp
->
port_id
);
ssp
->
clk
=
clk_register_fixed_rate
(
&
dev
->
dev
,
buf
,
NULL
,
CLK_IS_ROOT
,
c
->
max_clk_rate
);
if
(
IS_ERR
(
ssp
->
clk
))
return
PTR_ERR
(
ssp
->
clk
);
memset
(
&
pi
,
0
,
sizeof
(
pi
));
memset
(
&
pi
,
0
,
sizeof
(
pi
));
pi
.
parent
=
&
dev
->
dev
;
pi
.
parent
=
&
dev
->
dev
;
pi
.
name
=
"pxa2xx-spi"
;
pi
.
name
=
"pxa2xx-spi"
;
...
@@ -92,8 +104,10 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
...
@@ -92,8 +104,10 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
pi
.
size_data
=
sizeof
(
spi_pdata
);
pi
.
size_data
=
sizeof
(
spi_pdata
);
pdev
=
platform_device_register_full
(
&
pi
);
pdev
=
platform_device_register_full
(
&
pi
);
if
(
IS_ERR
(
pdev
))
if
(
IS_ERR
(
pdev
))
{
clk_unregister
(
ssp
->
clk
);
return
PTR_ERR
(
pdev
);
return
PTR_ERR
(
pdev
);
}
pci_set_drvdata
(
dev
,
pdev
);
pci_set_drvdata
(
dev
,
pdev
);
...
@@ -103,8 +117,13 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
...
@@ -103,8 +117,13 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
static
void
pxa2xx_spi_pci_remove
(
struct
pci_dev
*
dev
)
static
void
pxa2xx_spi_pci_remove
(
struct
pci_dev
*
dev
)
{
{
struct
platform_device
*
pdev
=
pci_get_drvdata
(
dev
);
struct
platform_device
*
pdev
=
pci_get_drvdata
(
dev
);
struct
pxa2xx_spi_master
*
spi_pdata
;
spi_pdata
=
dev_get_platdata
(
&
pdev
->
dev
);
platform_device_unregister
(
pdev
);
platform_device_unregister
(
pdev
);
clk_unregister
(
spi_pdata
->
ssp
.
clk
);
pci_set_drvdata
(
dev
,
NULL
);
}
}
static
const
struct
pci_device_id
pxa2xx_spi_pci_devices
[]
=
{
static
const
struct
pci_device_id
pxa2xx_spi_pci_devices
[]
=
{
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
反馈
建议
客服
返回
顶部