Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
5ae07daa
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看板
提交
5ae07daa
编写于
4月 29, 2009
作者:
S
Sascha Hauer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mx1ads: setup iomux pins at once
Signed-off-by:
N
Sascha Hauer
<
s.hauer@pengutronix.de
>
上级
5b68421f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
55 deletion
+18
-55
arch/arm/mach-mx1/mx1ads.c
arch/arm/mach-mx1/mx1ads.c
+18
-55
未找到文件。
arch/arm/mach-mx1/mx1ads.c
浏览文件 @
5ae07daa
...
...
@@ -32,57 +32,36 @@
#include "devices.h"
/*
* UARTs platform data
*/
static
int
mxc_uart1_pins
[]
=
{
static
int
mx1ads_pins
[]
=
{
/* UART1 */
PC9_PF_UART1_CTS
,
PC10_PF_UART1_RTS
,
PC11_PF_UART1_TXD
,
PC12_PF_UART1_RXD
,
};
static
int
uart1_mxc_init
(
struct
platform_device
*
pdev
)
{
return
mxc_gpio_setup_multiple_pins
(
mxc_uart1_pins
,
ARRAY_SIZE
(
mxc_uart1_pins
),
"UART1"
);
}
static
int
uart1_mxc_exit
(
struct
platform_device
*
pdev
)
{
mxc_gpio_release_multiple_pins
(
mxc_uart1_pins
,
ARRAY_SIZE
(
mxc_uart1_pins
));
return
0
;
}
static
int
mxc_uart2_pins
[]
=
{
/* UART2 */
PB28_PF_UART2_CTS
,
PB29_PF_UART2_RTS
,
PB30_PF_UART2_TXD
,
PB31_PF_UART2_RXD
,
/* I2C */
PA15_PF_I2C_SDA
,
PA16_PF_I2C_SCL
,
/* SPI */
PC13_PF_SPI1_SPI_RDY
,
PC14_PF_SPI1_SCLK
,
PC15_PF_SPI1_SS
,
PC16_PF_SPI1_MISO
,
PC17_PF_SPI1_MOSI
,
};
static
int
uart2_mxc_init
(
struct
platform_device
*
pdev
)
{
return
mxc_gpio_setup_multiple_pins
(
mxc_uart2_pins
,
ARRAY_SIZE
(
mxc_uart2_pins
),
"UART2"
);
}
static
int
uart2_mxc_exit
(
struct
platform_device
*
pdev
)
{
mxc_gpio_release_multiple_pins
(
mxc_uart2_pins
,
ARRAY_SIZE
(
mxc_uart2_pins
));
return
0
;
}
/*
* UARTs platform data
*/
static
struct
imxuart_platform_data
uart_pdata
[]
=
{
{
.
init
=
uart1_mxc_init
,
.
exit
=
uart1_mxc_exit
,
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
{
.
init
=
uart2_mxc_init
,
.
exit
=
uart2_mxc_exit
,
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
};
...
...
@@ -111,23 +90,6 @@ static struct platform_device flash_device = {
/*
* I2C
*/
static
int
i2c_pins
[]
=
{
PA15_PF_I2C_SDA
,
PA16_PF_I2C_SCL
,
};
static
int
i2c_init
(
struct
device
*
dev
)
{
return
mxc_gpio_setup_multiple_pins
(
i2c_pins
,
ARRAY_SIZE
(
i2c_pins
),
"I2C"
);
}
static
void
i2c_exit
(
struct
device
*
dev
)
{
mxc_gpio_release_multiple_pins
(
i2c_pins
,
ARRAY_SIZE
(
i2c_pins
));
}
static
struct
pcf857x_platform_data
pcf857x_data
[]
=
{
{
.
gpio_base
=
4
*
32
,
...
...
@@ -138,8 +100,6 @@ static struct pcf857x_platform_data pcf857x_data[] = {
static
struct
imxi2c_platform_data
mx1ads_i2c_data
=
{
.
bitrate
=
100000
,
.
init
=
i2c_init
,
.
exit
=
i2c_exit
,
};
static
struct
i2c_board_info
mx1ads_i2c_devices
[]
=
{
...
...
@@ -159,6 +119,9 @@ static struct i2c_board_info mx1ads_i2c_devices[] = {
*/
static
void
__init
mx1ads_init
(
void
)
{
mxc_gpio_setup_multiple_pins
(
mx1ads_pins
,
ARRAY_SIZE
(
mx1ads_pins
),
"mx1ads"
);
/* UART */
mxc_register_device
(
&
imx_uart1_device
,
&
uart_pdata
[
0
]);
mxc_register_device
(
&
imx_uart2_device
,
&
uart_pdata
[
1
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录