Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
cc9f9aef
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
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看板
提交
cc9f9aef
编写于
9月 19, 2011
作者:
J
Jean-Christophe PLAGNIOL-VILLARD
提交者:
Arnd Bergmann
11月 29, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: at91/soc: use gpio_is_valid to check the gpio
Signed-off-by:
N
Jean-Christophe PLAGNIOL-VILLARD
<
plagnioj@jcrosoft.com
>
上级
63b4c296
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
72 addition
and
72 deletion
+72
-72
arch/arm/mach-at91/at91cap9_devices.c
arch/arm/mach-at91/at91cap9_devices.c
+10
-10
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91rm9200_devices.c
+11
-11
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9260_devices.c
+13
-13
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9261_devices.c
+7
-7
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9263_devices.c
+13
-13
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9g45_devices.c
+10
-10
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91sam9rl_devices.c
+8
-8
未找到文件。
arch/arm/mach-at91/at91cap9_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -76,7 +76,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for
(
i
=
0
;
i
<
data
->
ports
;
i
++
)
{
if
(
data
->
vbus_pin
[
i
]
)
if
(
gpio_is_valid
(
data
->
vbus_pin
[
i
])
)
at91_set_gpio_output
(
data
->
vbus_pin
[
i
],
0
);
}
...
...
@@ -179,7 +179,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
usba_udc_data
.
pdata
.
num_ep
=
ARRAY_SIZE
(
usba_udc_ep
);
memcpy
(
usba_udc_data
.
ep
,
usba_udc_ep
,
sizeof
(
usba_udc_ep
));
if
(
data
&&
data
->
vbus_pin
>
0
)
{
if
(
data
&&
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
usba_udc_data
.
pdata
.
vbus_pin
=
data
->
vbus_pin
;
...
...
@@ -232,7 +232,7 @@ void __init at91_add_device_eth(struct macb_platform_data *data)
if
(
!
data
)
return
;
if
(
data
->
phy_irq_pin
)
{
if
(
gpio_is_valid
(
data
->
phy_irq_pin
)
)
{
at91_set_gpio_input
(
data
->
phy_irq_pin
,
0
);
at91_set_deglitch
(
data
->
phy_irq_pin
,
1
);
}
...
...
@@ -332,13 +332,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
if
(
mmc_id
==
0
)
{
/* MCI0 */
...
...
@@ -425,15 +425,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
|
AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
nand_data
=
*
data
;
...
...
@@ -816,7 +816,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
at91_set_A_periph
(
AT91_PIN_PA9
,
0
);
/* AC97RX */
/* reset */
if
(
data
->
reset_pin
)
if
(
gpio_is_valid
(
data
->
reset_pin
)
)
at91_set_gpio_output
(
data
->
reset_pin
,
0
);
ac97_data
=
*
data
;
...
...
arch/arm/mach-at91/at91rm9200_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -114,11 +114,11 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
if
(
!
data
)
return
;
if
(
data
->
vbus_pin
)
{
if
(
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
}
if
(
data
->
pullup_pin
)
if
(
gpio_is_valid
(
data
->
pullup_pin
)
)
at91_set_gpio_output
(
data
->
pullup_pin
,
0
);
udc_data
=
*
data
;
...
...
@@ -167,7 +167,7 @@ void __init at91_add_device_eth(struct macb_platform_data *data)
if
(
!
data
)
return
;
if
(
data
->
phy_irq_pin
)
{
if
(
gpio_is_valid
(
data
->
phy_irq_pin
)
)
{
at91_set_gpio_input
(
data
->
phy_irq_pin
,
0
);
at91_set_deglitch
(
data
->
phy_irq_pin
,
1
);
}
...
...
@@ -260,7 +260,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
);
/* input/irq */
if
(
data
->
irq_pin
)
{
if
(
gpio_is_valid
(
data
->
irq_pin
)
)
{
at91_set_gpio_input
(
data
->
irq_pin
,
1
);
at91_set_deglitch
(
data
->
irq_pin
,
1
);
}
...
...
@@ -268,7 +268,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
at91_set_deglitch
(
data
->
det_pin
,
1
);
/* outputs, initially off */
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
at91_set_gpio_output
(
data
->
rst_pin
,
0
);
...
...
@@ -328,13 +328,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
/* CLK */
...
...
@@ -419,15 +419,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_A_periph
(
AT91_PIN_PC1
,
0
);
/* SMOE */
...
...
arch/arm/mach-at91/at91sam9260_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -115,7 +115,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
if
(
!
data
)
return
;
if
(
data
->
vbus_pin
)
{
if
(
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
}
...
...
@@ -168,7 +168,7 @@ void __init at91_add_device_eth(struct macb_platform_data *data)
if
(
!
data
)
return
;
if
(
data
->
phy_irq_pin
)
{
if
(
gpio_is_valid
(
data
->
phy_irq_pin
)
)
{
at91_set_gpio_input
(
data
->
phy_irq_pin
,
0
);
at91_set_deglitch
(
data
->
phy_irq_pin
,
1
);
}
...
...
@@ -243,13 +243,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
/* CLK */
...
...
@@ -330,11 +330,11 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
for
(
i
=
0
;
i
<
ATMCI_MAX_NR_SLOTS
;
i
++
)
{
if
(
data
->
slot
[
i
].
bus_width
)
{
/* input/irq */
if
(
data
->
slot
[
i
].
detect_pin
)
{
if
(
gpio_is_valid
(
data
->
slot
[
i
].
detect_pin
)
)
{
at91_set_gpio_input
(
data
->
slot
[
i
].
detect_pin
,
1
);
at91_set_deglitch
(
data
->
slot
[
i
].
detect_pin
,
1
);
}
if
(
data
->
slot
[
i
].
wp_pin
)
if
(
gpio_is_valid
(
data
->
slot
[
i
].
wp_pin
)
)
at91_set_gpio_input
(
data
->
slot
[
i
].
wp_pin
,
1
);
switch
(
i
)
{
...
...
@@ -426,15 +426,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
|
AT91_MATRIX_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
nand_data
=
*
data
;
...
...
@@ -1290,17 +1290,17 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
);
if
(
data
->
rst_pin
)
{
if
(
gpio_is_valid
(
data
->
rst_pin
)
)
{
at91_set_multi_drive
(
data
->
rst_pin
,
0
);
at91_set_gpio_output
(
data
->
rst_pin
,
1
);
}
if
(
data
->
irq_pin
)
{
if
(
gpio_is_valid
(
data
->
irq_pin
)
)
{
at91_set_gpio_input
(
data
->
irq_pin
,
0
);
at91_set_deglitch
(
data
->
irq_pin
,
1
);
}
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
0
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
...
...
arch/arm/mach-at91/at91sam9261_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -118,7 +118,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
if
(
!
data
)
return
;
if
(
data
->
vbus_pin
)
{
if
(
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
}
...
...
@@ -171,13 +171,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
/* CLK */
...
...
@@ -240,15 +240,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
|
AT91_MATRIX_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_A_periph
(
AT91_PIN_PC0
,
0
);
/* NANDOE */
...
...
arch/arm/mach-at91/at91sam9263_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -70,7 +70,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for
(
i
=
0
;
i
<
data
->
ports
;
i
++
)
{
if
(
data
->
vbus_pin
[
i
]
)
if
(
gpio_is_valid
(
data
->
vbus_pin
[
i
])
)
at91_set_gpio_output
(
data
->
vbus_pin
[
i
],
0
);
}
...
...
@@ -123,7 +123,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
if
(
!
data
)
return
;
if
(
data
->
vbus_pin
)
{
if
(
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
}
...
...
@@ -176,7 +176,7 @@ void __init at91_add_device_eth(struct macb_platform_data *data)
if
(
!
data
)
return
;
if
(
data
->
phy_irq_pin
)
{
if
(
gpio_is_valid
(
data
->
phy_irq_pin
)
)
{
at91_set_gpio_input
(
data
->
phy_irq_pin
,
0
);
at91_set_deglitch
(
data
->
phy_irq_pin
,
1
);
}
...
...
@@ -276,13 +276,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
if
(
mmc_id
==
0
)
{
/* MCI0 */
...
...
@@ -430,17 +430,17 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
}
at91_sys_write
(
AT91_MATRIX_EBI0CSA
,
ebi0_csa
);
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
irq_pin
)
{
if
(
gpio_is_valid
(
data
->
irq_pin
)
)
{
at91_set_gpio_input
(
data
->
irq_pin
,
1
);
at91_set_deglitch
(
data
->
irq_pin
,
1
);
}
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
/* initially off */
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
...
...
@@ -500,15 +500,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBI0CSA
,
csa
|
AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
nand_data
=
*
data
;
...
...
@@ -749,7 +749,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
at91_set_A_periph
(
AT91_PIN_PB3
,
0
);
/* AC97RX */
/* reset */
if
(
data
->
reset_pin
)
if
(
gpio_is_valid
(
data
->
reset_pin
)
)
at91_set_gpio_output
(
data
->
reset_pin
,
0
);
ac97_data
=
*
data
;
...
...
arch/arm/mach-at91/at91sam9g45_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -120,7 +120,7 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for
(
i
=
0
;
i
<
data
->
ports
;
i
++
)
{
if
(
data
->
vbus_pin
[
i
]
)
if
(
gpio_is_valid
(
data
->
vbus_pin
[
i
])
)
at91_set_gpio_output
(
data
->
vbus_pin
[
i
],
0
);
}
...
...
@@ -181,7 +181,7 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
/* Enable VBus control for UHP ports */
for
(
i
=
0
;
i
<
data
->
ports
;
i
++
)
{
if
(
data
->
vbus_pin
[
i
]
)
if
(
gpio_is_valid
(
data
->
vbus_pin
[
i
])
)
at91_set_gpio_output
(
data
->
vbus_pin
[
i
],
0
);
}
...
...
@@ -263,7 +263,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
usba_udc_data
.
pdata
.
num_ep
=
ARRAY_SIZE
(
usba_udc_ep
);
memcpy
(
usba_udc_data
.
ep
,
usba_udc_ep
,
sizeof
(
usba_udc_ep
));
if
(
data
&&
data
->
vbus_pin
>
0
)
{
if
(
data
&&
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
usba_udc_data
.
pdata
.
vbus_pin
=
data
->
vbus_pin
;
...
...
@@ -316,7 +316,7 @@ void __init at91_add_device_eth(struct macb_platform_data *data)
if
(
!
data
)
return
;
if
(
data
->
phy_irq_pin
)
{
if
(
gpio_is_valid
(
data
->
phy_irq_pin
)
)
{
at91_set_gpio_input
(
data
->
phy_irq_pin
,
0
);
at91_set_deglitch
(
data
->
phy_irq_pin
,
1
);
}
...
...
@@ -449,11 +449,11 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
/* input/irq */
if
(
data
->
slot
[
0
].
detect_pin
)
{
if
(
gpio_is_valid
(
data
->
slot
[
0
].
detect_pin
)
)
{
at91_set_gpio_input
(
data
->
slot
[
0
].
detect_pin
,
1
);
at91_set_deglitch
(
data
->
slot
[
0
].
detect_pin
,
1
);
}
if
(
data
->
slot
[
0
].
wp_pin
)
if
(
gpio_is_valid
(
data
->
slot
[
0
].
wp_pin
)
)
at91_set_gpio_input
(
data
->
slot
[
0
].
wp_pin
,
1
);
if
(
mmc_id
==
0
)
{
/* MCI0 */
...
...
@@ -556,15 +556,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
|
AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
nand_data
=
*
data
;
...
...
@@ -859,7 +859,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
at91_set_A_periph
(
AT91_PIN_PD6
,
0
);
/* AC97RX */
/* reset */
if
(
data
->
reset_pin
)
if
(
gpio_is_valid
(
data
->
reset_pin
)
)
at91_set_gpio_output
(
data
->
reset_pin
,
0
);
ac97_data
=
*
data
;
...
...
arch/arm/mach-at91/at91sam9rl_devices.c
浏览文件 @
cc9f9aef
...
...
@@ -147,7 +147,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data)
usba_udc_data
.
pdata
.
num_ep
=
ARRAY_SIZE
(
usba_udc_ep
);
memcpy
(
usba_udc_data
.
ep
,
usba_udc_ep
,
sizeof
(
usba_udc_ep
));
if
(
data
&&
data
->
vbus_pin
>
0
)
{
if
(
data
&&
gpio_is_valid
(
data
->
vbus_pin
)
)
{
at91_set_gpio_input
(
data
->
vbus_pin
,
0
);
at91_set_deglitch
(
data
->
vbus_pin
,
1
);
usba_udc_data
.
pdata
.
vbus_pin
=
data
->
vbus_pin
;
...
...
@@ -201,13 +201,13 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
return
;
/* input/irq */
if
(
data
->
det_pin
)
{
if
(
gpio_is_valid
(
data
->
det_pin
)
)
{
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_deglitch
(
data
->
det_pin
,
1
);
}
if
(
data
->
wp_pin
)
if
(
gpio_is_valid
(
data
->
wp_pin
)
)
at91_set_gpio_input
(
data
->
wp_pin
,
1
);
if
(
data
->
vcc_pin
)
if
(
gpio_is_valid
(
data
->
vcc_pin
)
)
at91_set_gpio_output
(
data
->
vcc_pin
,
0
);
/* CLK */
...
...
@@ -275,15 +275,15 @@ void __init at91_add_device_nand(struct atmel_nand_data *data)
at91_sys_write
(
AT91_MATRIX_EBICSA
,
csa
|
AT91_MATRIX_CS3A_SMC_SMARTMEDIA
);
/* enable pin */
if
(
data
->
enable_pin
)
if
(
gpio_is_valid
(
data
->
enable_pin
)
)
at91_set_gpio_output
(
data
->
enable_pin
,
1
);
/* ready/busy pin */
if
(
data
->
rdy_pin
)
if
(
gpio_is_valid
(
data
->
rdy_pin
)
)
at91_set_gpio_input
(
data
->
rdy_pin
,
1
);
/* card detect pin */
if
(
data
->
det_pin
)
if
(
gpio_is_valid
(
data
->
det_pin
)
)
at91_set_gpio_input
(
data
->
det_pin
,
1
);
at91_set_A_periph
(
AT91_PIN_PB4
,
0
);
/* NANDOE */
...
...
@@ -483,7 +483,7 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
at91_set_A_periph
(
AT91_PIN_PD4
,
0
);
/* AC97RX */
/* reset */
if
(
data
->
reset_pin
)
if
(
gpio_is_valid
(
data
->
reset_pin
)
)
at91_set_gpio_output
(
data
->
reset_pin
,
0
);
ac97_data
=
*
data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录