Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
824e2dbb
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
824e2dbb
编写于
2月 28, 2012
作者:
T
Tony Lindgren
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'hsmmc' into fixes-non-critical
上级
e9d69010
9cf793f9
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
212 addition
and
103 deletion
+212
-103
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-2430sdp.c
+1
-1
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
+4
-1
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
+2
-2
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-am3517evm.c
+1
-1
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t35.c
+3
-2
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-devkit8000.c
+3
-1
arch/arm/mach-omap2/board-flash.c
arch/arm/mach-omap2/board-flash.c
+1
-1
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-igep0020.c
+5
-1
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-ldp.c
+1
-1
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-n8x0.c
+4
-0
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3beagle.c
+7
-3
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3evm.c
+5
-2
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3logic.c
+1
-1
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3pandora.c
+4
-1
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3stalker.c
+9
-6
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap3touchbook.c
+10
-7
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-omap4panda.c
+3
-3
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-overo.c
+1
-2
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rm680.c
+1
-1
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51-peripherals.c
+1
-1
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/board-zoom-peripherals.c
+3
-1
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/devices.c
+4
-4
arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/display.c
+4
-4
arch/arm/mach-omap2/gpio.c
arch/arm/mach-omap2/gpio.c
+1
-1
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/hsmmc.c
+100
-29
arch/arm/mach-omap2/hsmmc.h
arch/arm/mach-omap2/hsmmc.h
+9
-3
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mcbsp.c
+1
-1
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/mux.c
+7
-7
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/pm.c
+1
-1
arch/arm/mach-omap2/sr_device.c
arch/arm/mach-omap2/sr_device.c
+1
-1
arch/arm/plat-omap/include/plat/omap_device.h
arch/arm/plat-omap/include/plat/omap_device.h
+7
-0
arch/arm/plat-omap/omap_device.c
arch/arm/plat-omap/omap_device.c
+7
-13
未找到文件。
arch/arm/mach-omap2/board-2430sdp.c
浏览文件 @
824e2dbb
...
@@ -279,7 +279,7 @@ static void __init omap_2430sdp_init(void)
...
@@ -279,7 +279,7 @@ static void __init omap_2430sdp_init(void)
platform_add_devices
(
sdp2430_devices
,
ARRAY_SIZE
(
sdp2430_devices
));
platform_add_devices
(
sdp2430_devices
,
ARRAY_SIZE
(
sdp2430_devices
));
omap_serial_init
();
omap_serial_init
();
omap_sdrc_init
(
NULL
,
NULL
);
omap_sdrc_init
(
NULL
,
NULL
);
omap
2
_hsmmc_init
(
mmc
);
omap_hsmmc_init
(
mmc
);
omap2_usbfs_init
(
&
sdp2430_usb_config
);
omap2_usbfs_init
(
&
sdp2430_usb_config
);
omap_mux_init_signal
(
"usb0hs_stp"
,
OMAP_PULL_ENA
|
OMAP_PULL_UP
);
omap_mux_init_signal
(
"usb0hs_stp"
,
OMAP_PULL_ENA
|
OMAP_PULL_UP
);
...
...
arch/arm/mach-omap2/board-3430sdp.c
浏览文件 @
824e2dbb
...
@@ -232,11 +232,13 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -232,11 +232,13 @@ static struct omap2_hsmmc_info mmc[] = {
*/
*/
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
gpio_wp
=
4
,
.
gpio_wp
=
4
,
.
deferred
=
true
,
},
},
{
{
.
mmc
=
2
,
.
mmc
=
2
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
gpio_wp
=
7
,
.
gpio_wp
=
7
,
.
deferred
=
true
,
},
},
{}
/* Terminator */
{}
/* Terminator */
};
};
...
@@ -249,7 +251,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
...
@@ -249,7 +251,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
*/
*/
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
1
].
gpio_cd
=
gpio
+
1
;
mmc
[
1
].
gpio_cd
=
gpio
+
1
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
/* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
gpio_request_one
(
gpio
+
7
,
GPIOF_OUT_INIT_LOW
,
"sub_lcd_en_bkl"
);
gpio_request_one
(
gpio
+
7
,
GPIOF_OUT_INIT_LOW
,
"sub_lcd_en_bkl"
);
...
@@ -606,6 +608,7 @@ static void __init omap_3430sdp_init(void)
...
@@ -606,6 +608,7 @@ static void __init omap_3430sdp_init(void)
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap_board_config
=
sdp3430_config
;
omap_board_config
=
sdp3430_config
;
omap_board_config_size
=
ARRAY_SIZE
(
sdp3430_config
);
omap_board_config_size
=
ARRAY_SIZE
(
sdp3430_config
);
omap_hsmmc_init
(
mmc
);
omap3430_i2c_init
();
omap3430_i2c_init
();
omap_display_init
(
&
sdp3430_dss_data
);
omap_display_init
(
&
sdp3430_dss_data
);
if
(
omap_rev
()
>
OMAP3430_REV_ES1_0
)
if
(
omap_rev
()
>
OMAP3430_REV_ES1_0
)
...
...
arch/arm/mach-omap2/board-4430sdp.c
浏览文件 @
824e2dbb
...
@@ -491,9 +491,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
...
@@ -491,9 +491,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
{
{
struct
omap2_hsmmc_info
*
c
;
struct
omap2_hsmmc_info
*
c
;
omap
2
_hsmmc_init
(
controllers
);
omap_hsmmc_init
(
controllers
);
for
(
c
=
controllers
;
c
->
mmc
;
c
++
)
for
(
c
=
controllers
;
c
->
mmc
;
c
++
)
omap4_twl6030_hsmmc_set_late_init
(
c
->
dev
);
omap4_twl6030_hsmmc_set_late_init
(
&
c
->
pdev
->
dev
);
return
0
;
return
0
;
}
}
...
...
arch/arm/mach-omap2/board-am3517evm.c
浏览文件 @
824e2dbb
...
@@ -504,7 +504,7 @@ static void __init am3517_evm_init(void)
...
@@ -504,7 +504,7 @@ static void __init am3517_evm_init(void)
am3517_evm_musb_init
();
am3517_evm_musb_init
();
/* MMC init function */
/* MMC init function */
omap
2
_hsmmc_init
(
mmc
);
omap_hsmmc_init
(
mmc
);
}
}
MACHINE_START
(
OMAP3517EVM
,
"OMAP3517/AM3517 EVM"
)
MACHINE_START
(
OMAP3517EVM
,
"OMAP3517/AM3517 EVM"
)
...
...
arch/arm/mach-omap2/board-cm-t35.c
浏览文件 @
824e2dbb
...
@@ -413,7 +413,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -413,7 +413,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
deferred
=
true
,
},
},
{
{
.
mmc
=
2
,
.
mmc
=
2
,
...
@@ -471,7 +471,7 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
...
@@ -471,7 +471,7 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
return
0
;
return
0
;
}
}
...
@@ -639,6 +639,7 @@ static void __init cm_t3x_common_init(void)
...
@@ -639,6 +639,7 @@ static void __init cm_t3x_common_init(void)
omap_serial_init
();
omap_serial_init
();
omap_sdrc_init
(
mt46h32m32lf6_sdrc_params
,
omap_sdrc_init
(
mt46h32m32lf6_sdrc_params
,
mt46h32m32lf6_sdrc_params
);
mt46h32m32lf6_sdrc_params
);
omap_hsmmc_init
(
mmc
);
cm_t35_init_i2c
();
cm_t35_init_i2c
();
omap_ads7846_init
(
1
,
CM_T35_GPIO_PENDOWN
,
0
,
NULL
);
omap_ads7846_init
(
1
,
CM_T35_GPIO_PENDOWN
,
0
,
NULL
);
cm_t35_init_ethernet
();
cm_t35_init_ethernet
();
...
...
arch/arm/mach-omap2/board-devkit8000.c
浏览文件 @
824e2dbb
...
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
mmc
=
1
,
.
mmc
=
1
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
gpio_wp
=
29
,
.
gpio_wp
=
29
,
.
deferred
=
true
,
},
},
{}
/* Terminator */
{}
/* Terminator */
};
};
...
@@ -228,7 +229,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
...
@@ -228,7 +229,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds
[
2
].
gpio
=
gpio
+
TWL4030_GPIO_MAX
+
1
;
gpio_leds
[
2
].
gpio
=
gpio
+
TWL4030_GPIO_MAX
+
1
;
...
@@ -636,6 +637,7 @@ static void __init devkit8000_init(void)
...
@@ -636,6 +637,7 @@ static void __init devkit8000_init(void)
omap_dm9000_init
();
omap_dm9000_init
();
omap_hsmmc_init
(
mmc
);
devkit8000_i2c_init
();
devkit8000_i2c_init
();
platform_add_devices
(
devkit8000_devices
,
platform_add_devices
(
devkit8000_devices
,
ARRAY_SIZE
(
devkit8000_devices
));
ARRAY_SIZE
(
devkit8000_devices
));
...
...
arch/arm/mach-omap2/board-flash.c
浏览文件 @
824e2dbb
...
@@ -189,7 +189,7 @@ static u8 get_gpmc0_type(void)
...
@@ -189,7 +189,7 @@ static u8 get_gpmc0_type(void)
*
*
* @return - void.
* @return - void.
*/
*/
void
board_flash_init
(
struct
flash_partitions
partition_info
[],
void
__init
board_flash_init
(
struct
flash_partitions
partition_info
[],
char
chip_sel_board
[][
GPMC_CS_NUM
],
int
nand_type
)
char
chip_sel_board
[][
GPMC_CS_NUM
],
int
nand_type
)
{
{
u8
cs
=
0
;
u8
cs
=
0
;
...
...
arch/arm/mach-omap2/board-igep0020.c
浏览文件 @
824e2dbb
...
@@ -295,6 +295,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -295,6 +295,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
deferred
=
true
,
},
},
#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
{
{
...
@@ -402,7 +403,7 @@ static int igep_twl_gpio_setup(struct device *dev,
...
@@ -402,7 +403,7 @@ static int igep_twl_gpio_setup(struct device *dev,
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
...
@@ -639,6 +640,9 @@ static void __init igep_init(void)
...
@@ -639,6 +640,9 @@ static void __init igep_init(void)
/* Get IGEP2 hardware revision */
/* Get IGEP2 hardware revision */
igep2_get_revision
();
igep2_get_revision
();
omap_hsmmc_init
(
mmc
);
/* Register I2C busses and drivers */
/* Register I2C busses and drivers */
igep_i2c_init
();
igep_i2c_init
();
platform_add_devices
(
igep_devices
,
ARRAY_SIZE
(
igep_devices
));
platform_add_devices
(
igep_devices
,
ARRAY_SIZE
(
igep_devices
));
...
...
arch/arm/mach-omap2/board-ldp.c
浏览文件 @
824e2dbb
...
@@ -424,7 +424,7 @@ static void __init omap_ldp_init(void)
...
@@ -424,7 +424,7 @@ static void __init omap_ldp_init(void)
board_nand_init
(
ldp_nand_partitions
,
board_nand_init
(
ldp_nand_partitions
,
ARRAY_SIZE
(
ldp_nand_partitions
),
ZOOM_NAND_CS
,
0
);
ARRAY_SIZE
(
ldp_nand_partitions
),
ZOOM_NAND_CS
,
0
);
omap
2
_hsmmc_init
(
mmc
);
omap_hsmmc_init
(
mmc
);
ldp_display_init
();
ldp_display_init
();
}
}
...
...
arch/arm/mach-omap2/board-n8x0.c
浏览文件 @
824e2dbb
...
@@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
...
@@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
else
else
*
openp
=
0
;
*
openp
=
0
;
#ifdef CONFIG_MMC_OMAP
omap_mmc_notify_cover_event
(
mmc_device
,
index
,
*
openp
);
omap_mmc_notify_cover_event
(
mmc_device
,
index
,
*
openp
);
#else
pr_warn
(
"MMC: notify cover event not available
\n
"
);
#endif
}
}
static
int
n8x0_mmc_late_init
(
struct
device
*
dev
)
static
int
n8x0_mmc_late_init
(
struct
device
*
dev
)
...
...
arch/arm/mach-omap2/board-omap3beagle.c
浏览文件 @
824e2dbb
...
@@ -253,6 +253,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -253,6 +253,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
mmc
=
1
,
.
mmc
=
1
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
gpio_wp
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
deferred
=
true
,
},
},
{}
/* Terminator */
{}
/* Terminator */
};
};
...
@@ -272,12 +273,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
...
@@ -272,12 +273,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
{
{
int
r
;
int
r
;
if
(
beagle_config
.
mmc1_gpio_wp
!=
-
EINVAL
)
omap_mux_init_gpio
(
beagle_config
.
mmc1_gpio_wp
,
OMAP_PIN_INPUT
);
mmc
[
0
].
gpio_wp
=
beagle_config
.
mmc1_gpio_wp
;
mmc
[
0
].
gpio_wp
=
beagle_config
.
mmc1_gpio_wp
;
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/*
/*
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
...
@@ -521,6 +520,11 @@ static void __init omap3_beagle_init(void)
...
@@ -521,6 +520,11 @@ static void __init omap3_beagle_init(void)
{
{
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap3_beagle_init_rev
();
omap3_beagle_init_rev
();
if
(
beagle_config
.
mmc1_gpio_wp
!=
-
EINVAL
)
omap_mux_init_gpio
(
beagle_config
.
mmc1_gpio_wp
,
OMAP_PIN_INPUT
);
omap_hsmmc_init
(
mmc
);
omap3_beagle_i2c_init
();
omap3_beagle_i2c_init
();
gpio_buttons
[
0
].
gpio
=
beagle_config
.
usr_button_gpio
;
gpio_buttons
[
0
].
gpio
=
beagle_config
.
usr_button_gpio
;
...
...
arch/arm/mach-omap2/board-omap3evm.c
浏览文件 @
824e2dbb
...
@@ -317,6 +317,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -317,6 +317,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_wp
=
63
,
.
gpio_wp
=
63
,
.
deferred
=
true
,
},
},
#ifdef CONFIG_WL12XX_PLATFORM_DATA
#ifdef CONFIG_WL12XX_PLATFORM_DATA
{
{
...
@@ -361,9 +362,8 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
...
@@ -361,9 +362,8 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
int
r
,
lcd_bl_en
;
int
r
,
lcd_bl_en
;
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_mux_init_gpio
(
63
,
OMAP_PIN_INPUT
);
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/*
/*
* Most GPIOs are for USB OTG. Some are mostly sent to
* Most GPIOs are for USB OTG. Some are mostly sent to
...
@@ -644,6 +644,9 @@ static void __init omap3_evm_init(void)
...
@@ -644,6 +644,9 @@ static void __init omap3_evm_init(void)
omap_board_config
=
omap3_evm_config
;
omap_board_config
=
omap3_evm_config
;
omap_board_config_size
=
ARRAY_SIZE
(
omap3_evm_config
);
omap_board_config_size
=
ARRAY_SIZE
(
omap3_evm_config
);
omap_mux_init_gpio
(
63
,
OMAP_PIN_INPUT
);
omap_hsmmc_init
(
mmc
);
omap3_evm_i2c_init
();
omap3_evm_i2c_init
();
omap_display_init
(
&
omap3_evm_dss_data
);
omap_display_init
(
&
omap3_evm_dss_data
);
...
...
arch/arm/mach-omap2/board-omap3logic.c
浏览文件 @
824e2dbb
...
@@ -128,7 +128,7 @@ static void __init board_mmc_init(void)
...
@@ -128,7 +128,7 @@ static void __init board_mmc_init(void)
return
;
return
;
}
}
omap
2
_hsmmc_init
(
board_mmc_info
);
omap_hsmmc_init
(
board_mmc_info
);
}
}
static
struct
omap_smsc911x_platform_data
__initdata
board_smsc911x_data
=
{
static
struct
omap_smsc911x_platform_data
__initdata
board_smsc911x_data
=
{
...
...
arch/arm/mach-omap2/board-omap3pandora.c
浏览文件 @
824e2dbb
...
@@ -273,6 +273,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
...
@@ -273,6 +273,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
.
gpio_cd
=
-
EINVAL
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_wp
=
126
,
.
gpio_wp
=
126
,
.
ext_clock
=
0
,
.
ext_clock
=
0
,
.
deferred
=
true
,
},
},
{
{
.
mmc
=
2
,
.
mmc
=
2
,
...
@@ -281,6 +282,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
...
@@ -281,6 +282,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
.
gpio_wp
=
127
,
.
gpio_wp
=
127
,
.
ext_clock
=
1
,
.
ext_clock
=
1
,
.
transceiver
=
true
,
.
transceiver
=
true
,
.
deferred
=
true
,
},
},
{
{
.
mmc
=
3
,
.
mmc
=
3
,
...
@@ -300,7 +302,7 @@ static int omap3pandora_twl_gpio_setup(struct device *dev,
...
@@ -300,7 +302,7 @@ static int omap3pandora_twl_gpio_setup(struct device *dev,
/* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */
/* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */
omap3pandora_mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap3pandora_mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap3pandora_mmc
[
1
].
gpio_cd
=
gpio
+
1
;
omap3pandora_mmc
[
1
].
gpio_cd
=
gpio
+
1
;
omap
2_hsmmc
_init
(
omap3pandora_mmc
);
omap
_hsmmc_late
_init
(
omap3pandora_mmc
);
/* gpio + 13 drives 32kHz buffer for wifi module */
/* gpio + 13 drives 32kHz buffer for wifi module */
gpio_32khz
=
gpio
+
13
;
gpio_32khz
=
gpio
+
13
;
...
@@ -580,6 +582,7 @@ static struct omap_board_mux board_mux[] __initdata = {
...
@@ -580,6 +582,7 @@ static struct omap_board_mux board_mux[] __initdata = {
static
void
__init
omap3pandora_init
(
void
)
static
void
__init
omap3pandora_init
(
void
)
{
{
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap_hsmmc_init
(
omap3pandora_mmc
);
omap3pandora_i2c_init
();
omap3pandora_i2c_init
();
pandora_wl1251_init
();
pandora_wl1251_init
();
platform_add_devices
(
omap3pandora_devices
,
platform_add_devices
(
omap3pandora_devices
,
...
...
arch/arm/mach-omap2/board-omap3stalker.c
浏览文件 @
824e2dbb
...
@@ -209,10 +209,11 @@ static struct regulator_init_data omap3stalker_vsim = {
...
@@ -209,10 +209,11 @@ static struct regulator_init_data omap3stalker_vsim = {
static
struct
omap2_hsmmc_info
mmc
[]
=
{
static
struct
omap2_hsmmc_info
mmc
[]
=
{
{
{
.
mmc
=
1
,
.
mmc
=
1
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_cd
=
-
EINVAL
,
.
gpio_wp
=
23
,
.
gpio_wp
=
23
,
.
deferred
=
true
,
},
},
{}
/* Terminator */
{}
/* Terminator */
};
};
...
@@ -282,9 +283,8 @@ omap3stalker_twl_gpio_setup(struct device *dev,
...
@@ -282,9 +283,8 @@ omap3stalker_twl_gpio_setup(struct device *dev,
unsigned
gpio
,
unsigned
ngpio
)
unsigned
gpio
,
unsigned
ngpio
)
{
{
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_mux_init_gpio
(
23
,
OMAP_PIN_INPUT
);
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/*
/*
* Most GPIOs are for USB OTG. Some are mostly sent to
* Most GPIOs are for USB OTG. Some are mostly sent to
...
@@ -425,6 +425,9 @@ static void __init omap3_stalker_init(void)
...
@@ -425,6 +425,9 @@ static void __init omap3_stalker_init(void)
omap_board_config
=
omap3_stalker_config
;
omap_board_config
=
omap3_stalker_config
;
omap_board_config_size
=
ARRAY_SIZE
(
omap3_stalker_config
);
omap_board_config_size
=
ARRAY_SIZE
(
omap3_stalker_config
);
omap_mux_init_gpio
(
23
,
OMAP_PIN_INPUT
);
omap_hsmmc_init
(
mmc
);
omap3_stalker_i2c_init
();
omap3_stalker_i2c_init
();
platform_add_devices
(
omap3_stalker_devices
,
platform_add_devices
(
omap3_stalker_devices
,
...
...
arch/arm/mach-omap2/board-omap3touchbook.c
浏览文件 @
824e2dbb
...
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
mmc
=
1
,
.
mmc
=
1
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
|
MMC_CAP_8_BIT_DATA
,
.
gpio_wp
=
29
,
.
gpio_wp
=
29
,
.
deferred
=
true
,
},
},
{}
/* Terminator */
{}
/* Terminator */
};
};
...
@@ -117,15 +118,9 @@ static struct gpio_led gpio_leds[];
...
@@ -117,15 +118,9 @@ static struct gpio_led gpio_leds[];
static
int
touchbook_twl_gpio_setup
(
struct
device
*
dev
,
static
int
touchbook_twl_gpio_setup
(
struct
device
*
dev
,
unsigned
gpio
,
unsigned
ngpio
)
unsigned
gpio
,
unsigned
ngpio
)
{
{
if
(
system_rev
>=
0x20
&&
system_rev
<=
0x34301000
)
{
omap_mux_init_gpio
(
23
,
OMAP_PIN_INPUT
);
mmc
[
0
].
gpio_wp
=
23
;
}
else
{
omap_mux_init_gpio
(
29
,
OMAP_PIN_INPUT
);
}
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
/* REVISIT: need ehci-omap hooks for external VBUS
/* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect
* power switch and overcurrent detect
...
@@ -351,6 +346,14 @@ static void __init omap3_touchbook_init(void)
...
@@ -351,6 +346,14 @@ static void __init omap3_touchbook_init(void)
pm_power_off
=
omap3_touchbook_poweroff
;
pm_power_off
=
omap3_touchbook_poweroff
;
if
(
system_rev
>=
0x20
&&
system_rev
<=
0x34301000
)
{
omap_mux_init_gpio
(
23
,
OMAP_PIN_INPUT
);
mmc
[
0
].
gpio_wp
=
23
;
}
else
{
omap_mux_init_gpio
(
29
,
OMAP_PIN_INPUT
);
}
omap_hsmmc_init
(
mmc
);
omap3_touchbook_i2c_init
();
omap3_touchbook_i2c_init
();
platform_add_devices
(
omap3_touchbook_devices
,
platform_add_devices
(
omap3_touchbook_devices
,
ARRAY_SIZE
(
omap3_touchbook_devices
));
ARRAY_SIZE
(
omap3_touchbook_devices
));
...
...
arch/arm/mach-omap2/board-omap4panda.c
浏览文件 @
824e2dbb
...
@@ -245,9 +245,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
...
@@ -245,9 +245,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
{
{
struct
omap2_hsmmc_info
*
c
;
struct
omap2_hsmmc_info
*
c
;
omap
2
_hsmmc_init
(
controllers
);
omap_hsmmc_init
(
controllers
);
for
(
c
=
controllers
;
c
->
mmc
;
c
++
)
for
(
c
=
controllers
;
c
->
mmc
;
c
++
)
omap4_twl6030_hsmmc_set_late_init
(
c
->
dev
);
omap4_twl6030_hsmmc_set_late_init
(
&
c
->
pdev
->
dev
);
return
0
;
return
0
;
}
}
...
@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
...
@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
.
default_device
=
&
omap4_panda_dvi_device
,
.
default_device
=
&
omap4_panda_dvi_device
,
};
};
void
omap4_panda_display_init
(
void
)
void
__init
omap4_panda_display_init
(
void
)
{
{
int
r
;
int
r
;
...
...
arch/arm/mach-omap2/board-overo.c
浏览文件 @
824e2dbb
...
@@ -407,8 +407,6 @@ static inline void __init overo_init_keys(void) { return; }
...
@@ -407,8 +407,6 @@ static inline void __init overo_init_keys(void) { return; }
static
int
overo_twl_gpio_setup
(
struct
device
*
dev
,
static
int
overo_twl_gpio_setup
(
struct
device
*
dev
,
unsigned
gpio
,
unsigned
ngpio
)
unsigned
gpio
,
unsigned
ngpio
)
{
{
omap2_hsmmc_init
(
mmc
);
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds
[
2
].
gpio
=
gpio
+
TWL4030_GPIO_MAX
+
1
;
gpio_leds
[
2
].
gpio
=
gpio
+
TWL4030_GPIO_MAX
+
1
;
...
@@ -505,6 +503,7 @@ static void __init overo_init(void)
...
@@ -505,6 +503,7 @@ static void __init overo_init(void)
int
ret
;
int
ret
;
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap3_mux_init
(
board_mux
,
OMAP_PACKAGE_CBB
);
omap_hsmmc_init
(
mmc
);
overo_i2c_init
();
overo_i2c_init
();
omap_display_init
(
&
overo_dss_data
);
omap_display_init
(
&
overo_dss_data
);
omap_serial_init
();
omap_serial_init
();
...
...
arch/arm/mach-omap2/board-rm680.c
浏览文件 @
824e2dbb
...
@@ -120,7 +120,7 @@ static void __init rm680_peripherals_init(void)
...
@@ -120,7 +120,7 @@ static void __init rm680_peripherals_init(void)
ARRAY_SIZE
(
rm680_peripherals_devices
));
ARRAY_SIZE
(
rm680_peripherals_devices
));
rm680_i2c_init
();
rm680_i2c_init
();
gpmc_onenand_init
(
board_onenand_data
);
gpmc_onenand_init
(
board_onenand_data
);
omap
2
_hsmmc_init
(
mmc
);
omap_hsmmc_init
(
mmc
);
}
}
#ifdef CONFIG_OMAP_MUX
#ifdef CONFIG_OMAP_MUX
...
...
arch/arm/mach-omap2/board-rx51-peripherals.c
浏览文件 @
824e2dbb
...
@@ -1145,7 +1145,7 @@ void __init rx51_peripherals_init(void)
...
@@ -1145,7 +1145,7 @@ void __init rx51_peripherals_init(void)
partition
=
omap_mux_get
(
"core"
);
partition
=
omap_mux_get
(
"core"
);
if
(
partition
)
if
(
partition
)
omap
2
_hsmmc_init
(
mmc
);
omap_hsmmc_init
(
mmc
);
rx51_charger_init
();
rx51_charger_init
();
}
}
...
...
arch/arm/mach-omap2/board-zoom-peripherals.c
浏览文件 @
824e2dbb
...
@@ -205,6 +205,7 @@ static struct omap2_hsmmc_info mmc[] = {
...
@@ -205,6 +205,7 @@ static struct omap2_hsmmc_info mmc[] = {
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
caps
=
MMC_CAP_4_BIT_DATA
,
.
gpio_wp
=
-
EINVAL
,
.
gpio_wp
=
-
EINVAL
,
.
power_saving
=
true
,
.
power_saving
=
true
,
.
deferred
=
true
,
},
},
{
{
.
name
=
"internal"
,
.
name
=
"internal"
,
...
@@ -233,7 +234,7 @@ static int zoom_twl_gpio_setup(struct device *dev,
...
@@ -233,7 +234,7 @@ static int zoom_twl_gpio_setup(struct device *dev,
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
mmc
[
0
].
gpio_cd
=
gpio
+
0
;
omap
2_hsmmc
_init
(
mmc
);
omap
_hsmmc_late
_init
(
mmc
);
ret
=
gpio_request_one
(
LCD_PANEL_ENABLE_GPIO
,
GPIOF_OUT_INIT_LOW
,
ret
=
gpio_request_one
(
LCD_PANEL_ENABLE_GPIO
,
GPIOF_OUT_INIT_LOW
,
"lcd enable"
);
"lcd enable"
);
...
@@ -301,6 +302,7 @@ void __init zoom_peripherals_init(void)
...
@@ -301,6 +302,7 @@ void __init zoom_peripherals_init(void)
if
(
ret
)
if
(
ret
)
pr_err
(
"error setting wl12xx data: %d
\n
"
,
ret
);
pr_err
(
"error setting wl12xx data: %d
\n
"
,
ret
);
omap_hsmmc_init
(
mmc
);
omap_i2c_init
();
omap_i2c_init
();
platform_device_register
(
&
omap_vwlan_device
);
platform_device_register
(
&
omap_vwlan_device
);
usb_musb_init
(
NULL
);
usb_musb_init
(
NULL
);
...
...
arch/arm/mach-omap2/devices.c
浏览文件 @
824e2dbb
...
@@ -276,7 +276,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
...
@@ -276,7 +276,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
}
}
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
static
inline
void
omap_init_mbox
(
void
)
static
inline
void
__init
omap_init_mbox
(
void
)
{
{
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
oh
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
@@ -337,7 +337,7 @@ static inline void omap_init_audio(void) {}
...
@@ -337,7 +337,7 @@ static inline void omap_init_audio(void) {}
#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
static
void
omap_init_mcpdm
(
void
)
static
void
__init
omap_init_mcpdm
(
void
)
{
{
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
oh
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
@@ -358,7 +358,7 @@ static inline void omap_init_mcpdm(void) {}
...
@@ -358,7 +358,7 @@ static inline void omap_init_mcpdm(void) {}
#if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
#if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
static
void
omap_init_dmic
(
void
)
static
void
__init
omap_init_dmic
(
void
)
{
{
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
oh
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
@@ -380,7 +380,7 @@ static inline void omap_init_dmic(void) {}
...
@@ -380,7 +380,7 @@ static inline void omap_init_dmic(void) {}
#include <plat/mcspi.h>
#include <plat/mcspi.h>
static
int
omap_mcspi_init
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
static
int
__init
omap_mcspi_init
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
{
{
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
char
*
name
=
"omap2_mcspi"
;
char
*
name
=
"omap2_mcspi"
;
...
...
arch/arm/mach-omap2/display.c
浏览文件 @
824e2dbb
...
@@ -124,7 +124,7 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
...
@@ -124,7 +124,7 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
}
}
}
}
static
int
omap4_dsi_mux_pads
(
int
dsi_id
,
unsigned
lanes
)
static
int
__init
omap4_dsi_mux_pads
(
int
dsi_id
,
unsigned
lanes
)
{
{
u32
enable_mask
,
enable_shift
;
u32
enable_mask
,
enable_shift
;
u32
pipd_mask
,
pipd_shift
;
u32
pipd_mask
,
pipd_shift
;
...
@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
...
@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
return
0
;
return
0
;
}
}
int
omap_hdmi_init
(
enum
omap_hdmi_flags
flags
)
int
__init
omap_hdmi_init
(
enum
omap_hdmi_flags
flags
)
{
{
if
(
cpu_is_omap44xx
())
if
(
cpu_is_omap44xx
())
omap4_hdmi_mux_pads
(
flags
);
omap4_hdmi_mux_pads
(
flags
);
...
@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags)
...
@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags)
return
0
;
return
0
;
}
}
static
int
omap_dsi_enable_pads
(
int
dsi_id
,
unsigned
lane_mask
)
static
int
__init
omap_dsi_enable_pads
(
int
dsi_id
,
unsigned
lane_mask
)
{
{
if
(
cpu_is_omap44xx
())
if
(
cpu_is_omap44xx
())
return
omap4_dsi_mux_pads
(
dsi_id
,
lane_mask
);
return
omap4_dsi_mux_pads
(
dsi_id
,
lane_mask
);
...
@@ -173,7 +173,7 @@ static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
...
@@ -173,7 +173,7 @@ static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
return
0
;
return
0
;
}
}
static
void
omap_dsi_disable_pads
(
int
dsi_id
,
unsigned
lane_mask
)
static
void
__init
omap_dsi_disable_pads
(
int
dsi_id
,
unsigned
lane_mask
)
{
{
if
(
cpu_is_omap44xx
())
if
(
cpu_is_omap44xx
())
omap4_dsi_mux_pads
(
dsi_id
,
0
);
omap4_dsi_mux_pads
(
dsi_id
,
0
);
...
...
arch/arm/mach-omap2/gpio.c
浏览文件 @
824e2dbb
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include <plat/omap_hwmod.h>
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
#include <plat/omap_device.h>
static
int
omap2_gpio_dev_init
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
static
int
__init
omap2_gpio_dev_init
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
{
{
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
struct
omap_gpio_platform_data
*
pdata
;
struct
omap_gpio_platform_data
*
pdata
;
...
...
arch/arm/mach-omap2/hsmmc.c
浏览文件 @
824e2dbb
...
@@ -293,8 +293,8 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
...
@@ -293,8 +293,8 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
}
}
}
}
static
int
omap_hsmmc_pdata_init
(
struct
omap2_hsmmc_info
*
c
,
static
int
__init
omap_hsmmc_pdata_init
(
struct
omap2_hsmmc_info
*
c
,
struct
omap_mmc_platform_data
*
mmc
)
struct
omap_mmc_platform_data
*
mmc
)
{
{
char
*
hc_name
;
char
*
hc_name
;
...
@@ -428,69 +428,140 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
...
@@ -428,69 +428,140 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
return
0
;
return
0
;
}
}
static
int
omap_hsmmc_done
;
void
omap_hsmmc_late_init
(
struct
omap2_hsmmc_info
*
c
)
{
struct
platform_device
*
pdev
;
struct
omap_mmc_platform_data
*
mmc_pdata
;
int
res
;
if
(
omap_hsmmc_done
!=
1
)
return
;
omap_hsmmc_done
++
;
for
(;
c
->
mmc
;
c
++
)
{
if
(
!
c
->
deferred
)
continue
;
pdev
=
c
->
pdev
;
if
(
!
pdev
)
continue
;
mmc_pdata
=
pdev
->
dev
.
platform_data
;
if
(
!
mmc_pdata
)
continue
;
mmc_pdata
->
slots
[
0
].
switch_pin
=
c
->
gpio_cd
;
mmc_pdata
->
slots
[
0
].
gpio_wp
=
c
->
gpio_wp
;
res
=
omap_device_register
(
pdev
);
if
(
res
)
pr_err
(
"Could not late init MMC %s
\n
"
,
c
->
name
);
}
}
#define MAX_OMAP_MMC_HWMOD_NAME_LEN 16
#define MAX_OMAP_MMC_HWMOD_NAME_LEN 16
void
omap_init_hsmmc
(
struct
omap2_hsmmc_info
*
hsmmcinfo
,
int
ctrl_nr
)
static
void
omap_hsmmc_init_one
(
struct
omap2_hsmmc_info
*
hsmmcinfo
,
int
ctrl_nr
)
{
{
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
ohs
[
1
];
struct
omap_device
*
od
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
char
oh_name
[
MAX_OMAP_MMC_HWMOD_NAME_LEN
];
char
oh_name
[
MAX_OMAP_MMC_HWMOD_NAME_LEN
];
struct
omap_mmc_platform_data
*
mmc_data
;
struct
omap_mmc_platform_data
*
mmc_data
;
struct
omap_mmc_dev_attr
*
mmc_dev_attr
;
struct
omap_mmc_dev_attr
*
mmc_dev_attr
;
char
*
name
;
char
*
name
;
int
l
;
int
res
;
mmc_data
=
kzalloc
(
sizeof
(
struct
omap_mmc_platform_data
),
GFP_KERNEL
);
mmc_data
=
kzalloc
(
sizeof
(
struct
omap_mmc_platform_data
),
GFP_KERNEL
);
if
(
!
mmc_data
)
{
if
(
!
mmc_data
)
{
pr_err
(
"Cannot allocate memory for mmc device!
\n
"
);
pr_err
(
"Cannot allocate memory for mmc device!
\n
"
);
goto
done
;
return
;
}
}
if
(
omap_hsmmc_pdata_init
(
hsmmcinfo
,
mmc_data
)
<
0
)
{
res
=
omap_hsmmc_pdata_init
(
hsmmcinfo
,
mmc_data
);
pr_err
(
"%s fails!
\n
"
,
__func__
);
if
(
res
<
0
)
goto
done
;
goto
free_mmc
;
}
omap_hsmmc_mux
(
mmc_data
,
(
ctrl_nr
-
1
));
omap_hsmmc_mux
(
mmc_data
,
(
ctrl_nr
-
1
));
name
=
"omap_hsmmc"
;
name
=
"omap_hsmmc"
;
res
=
snprintf
(
oh_name
,
MAX_OMAP_MMC_HWMOD_NAME_LEN
,
l
=
snprintf
(
oh_name
,
MAX_OMAP_MMC_HWMOD_NAME_LEN
,
"mmc%d"
,
ctrl_nr
);
"mmc%d"
,
ctrl_nr
);
WARN
(
l
>=
MAX_OMAP_MMC_HWMOD_NAME_LEN
,
WARN
(
res
>=
MAX_OMAP_MMC_HWMOD_NAME_LEN
,
"String buffer overflow in MMC%d device setup
\n
"
,
ctrl_nr
);
"String buffer overflow in MMC%d device setup
\n
"
,
ctrl_nr
);
oh
=
omap_hwmod_lookup
(
oh_name
);
oh
=
omap_hwmod_lookup
(
oh_name
);
if
(
!
oh
)
{
if
(
!
oh
)
{
pr_err
(
"Could not look up %s
\n
"
,
oh_name
);
pr_err
(
"Could not look up %s
\n
"
,
oh_name
);
kfree
(
mmc_data
->
slots
[
0
].
name
);
goto
free_name
;
goto
done
;
}
}
ohs
[
0
]
=
oh
;
if
(
oh
->
dev_attr
!=
NULL
)
{
if
(
oh
->
dev_attr
!=
NULL
)
{
mmc_dev_attr
=
oh
->
dev_attr
;
mmc_dev_attr
=
oh
->
dev_attr
;
mmc_data
->
controller_flags
=
mmc_dev_attr
->
flags
;
mmc_data
->
controller_flags
=
mmc_dev_attr
->
flags
;
}
}
pdev
=
omap_device_build
(
name
,
ctrl_nr
-
1
,
oh
,
mmc_data
,
pdev
=
platform_device_alloc
(
name
,
ctrl_nr
-
1
);
sizeof
(
struct
omap_mmc_platform_data
),
NULL
,
0
,
false
);
if
(
!
pdev
)
{
if
(
IS_ERR
(
pdev
))
{
pr_err
(
"Could not allocate pdev for %s
\n
"
,
name
);
WARN
(
1
,
"Can't build omap_device for %s:%s.
\n
"
,
name
,
oh
->
name
);
goto
free_name
;
kfree
(
mmc_data
->
slots
[
0
].
name
);
goto
done
;
}
}
/*
dev_set_name
(
&
pdev
->
dev
,
"%s.%d"
,
pdev
->
name
,
pdev
->
id
);
* return device handle to board setup code
* required to populate for regulator framework structure
od
=
omap_device_alloc
(
pdev
,
ohs
,
1
,
NULL
,
0
);
*/
if
(
!
od
)
{
hsmmcinfo
->
dev
=
&
pdev
->
dev
;
pr_err
(
"Could not allocate od for %s
\n
"
,
name
);
goto
put_pdev
;
}
res
=
platform_device_add_data
(
pdev
,
mmc_data
,
sizeof
(
struct
omap_mmc_platform_data
));
if
(
res
)
{
pr_err
(
"Could not add pdata for %s
\n
"
,
name
);
goto
put_pdev
;
}
hsmmcinfo
->
pdev
=
pdev
;
if
(
hsmmcinfo
->
deferred
)
goto
free_mmc
;
done:
res
=
omap_device_register
(
pdev
);
if
(
res
)
{
pr_err
(
"Could not register od for %s
\n
"
,
name
);
goto
free_od
;
}
goto
free_mmc
;
free_od:
omap_device_delete
(
od
);
put_pdev:
platform_device_put
(
pdev
);
free_name:
kfree
(
mmc_data
->
slots
[
0
].
name
);
free_mmc:
kfree
(
mmc_data
);
kfree
(
mmc_data
);
}
}
void
omap2
_hsmmc_init
(
struct
omap2_hsmmc_info
*
controllers
)
void
__init
omap
_hsmmc_init
(
struct
omap2_hsmmc_info
*
controllers
)
{
{
u32
reg
;
u32
reg
;
if
(
omap_hsmmc_done
)
return
;
omap_hsmmc_done
=
1
;
if
(
!
cpu_is_omap44xx
())
{
if
(
!
cpu_is_omap44xx
())
{
if
(
cpu_is_omap2430
())
{
if
(
cpu_is_omap2430
())
{
control_pbias_offset
=
OMAP243X_CONTROL_PBIAS_LITE
;
control_pbias_offset
=
OMAP243X_CONTROL_PBIAS_LITE
;
...
@@ -515,7 +586,7 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
...
@@ -515,7 +586,7 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
}
}
for
(;
controllers
->
mmc
;
controllers
++
)
for
(;
controllers
->
mmc
;
controllers
++
)
omap_
init_hsmmc
(
controllers
,
controllers
->
mmc
);
omap_
hsmmc_init_one
(
controllers
,
controllers
->
mmc
);
}
}
...
...
arch/arm/mach-omap2/hsmmc.h
浏览文件 @
824e2dbb
...
@@ -21,10 +21,11 @@ struct omap2_hsmmc_info {
...
@@ -21,10 +21,11 @@ struct omap2_hsmmc_info {
bool
no_off
;
/* power_saving and power is not to go off */
bool
no_off
;
/* power_saving and power is not to go off */
bool
no_off_init
;
/* no power off when not in MMC sleep state */
bool
no_off_init
;
/* no power off when not in MMC sleep state */
bool
vcc_aux_disable_is_sleep
;
/* Regulator off remapped to sleep */
bool
vcc_aux_disable_is_sleep
;
/* Regulator off remapped to sleep */
bool
deferred
;
/* mmc needs a deferred probe */
int
gpio_cd
;
/* or -EINVAL */
int
gpio_cd
;
/* or -EINVAL */
int
gpio_wp
;
/* or -EINVAL */
int
gpio_wp
;
/* or -EINVAL */
char
*
name
;
/* or NULL for default */
char
*
name
;
/* or NULL for default */
struct
device
*
dev
;
/* returned: pointer to mmc adapter
*/
struct
platform_device
*
pdev
;
/* mmc controller instance
*/
int
ocr_mask
;
/* temporary HACK */
int
ocr_mask
;
/* temporary HACK */
/* Remux (pad configuration) when powering on/off */
/* Remux (pad configuration) when powering on/off */
void
(
*
remux
)(
struct
device
*
dev
,
int
slot
,
int
power_on
);
void
(
*
remux
)(
struct
device
*
dev
,
int
slot
,
int
power_on
);
...
@@ -34,11 +35,16 @@ struct omap2_hsmmc_info {
...
@@ -34,11 +35,16 @@ struct omap2_hsmmc_info {
#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
void
omap2_hsmmc_init
(
struct
omap2_hsmmc_info
*
);
void
omap_hsmmc_init
(
struct
omap2_hsmmc_info
*
);
void
omap_hsmmc_late_init
(
struct
omap2_hsmmc_info
*
);
#else
#else
static
inline
void
omap2_hsmmc_init
(
struct
omap2_hsmmc_info
*
info
)
static
inline
void
omap_hsmmc_init
(
struct
omap2_hsmmc_info
*
info
)
{
}
static
inline
void
omap_hsmmc_late_init
(
struct
omap2_hsmmc_info
*
info
)
{
{
}
}
...
...
arch/arm/mach-omap2/mcbsp.c
浏览文件 @
824e2dbb
...
@@ -122,7 +122,7 @@ static int omap3_enable_st_clock(unsigned int id, bool enable)
...
@@ -122,7 +122,7 @@ static int omap3_enable_st_clock(unsigned int id, bool enable)
return
0
;
return
0
;
}
}
static
int
omap_init_mcbsp
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
static
int
__init
omap_init_mcbsp
(
struct
omap_hwmod
*
oh
,
void
*
unused
)
{
{
int
id
,
count
=
1
;
int
id
,
count
=
1
;
char
*
name
=
"omap-mcbsp"
;
char
*
name
=
"omap-mcbsp"
;
...
...
arch/arm/mach-omap2/mux.c
浏览文件 @
824e2dbb
...
@@ -100,8 +100,8 @@ void omap_mux_write_array(struct omap_mux_partition *partition,
...
@@ -100,8 +100,8 @@ void omap_mux_write_array(struct omap_mux_partition *partition,
static
char
*
omap_mux_options
;
static
char
*
omap_mux_options
;
static
int
_omap_mux_init_gpio
(
struct
omap_mux_partition
*
partition
,
static
int
_
_init
_
omap_mux_init_gpio
(
struct
omap_mux_partition
*
partition
,
int
gpio
,
int
val
)
int
gpio
,
int
val
)
{
{
struct
omap_mux_entry
*
e
;
struct
omap_mux_entry
*
e
;
struct
omap_mux
*
gpio_mux
=
NULL
;
struct
omap_mux
*
gpio_mux
=
NULL
;
...
@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition,
...
@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition,
return
0
;
return
0
;
}
}
int
omap_mux_init_gpio
(
int
gpio
,
int
val
)
int
__init
omap_mux_init_gpio
(
int
gpio
,
int
val
)
{
{
struct
omap_mux_partition
*
partition
;
struct
omap_mux_partition
*
partition
;
int
ret
;
int
ret
;
...
@@ -159,9 +159,9 @@ int omap_mux_init_gpio(int gpio, int val)
...
@@ -159,9 +159,9 @@ int omap_mux_init_gpio(int gpio, int val)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
static
int
_omap_mux_get_by_name
(
struct
omap_mux_partition
*
partition
,
static
int
_
_init
_
omap_mux_get_by_name
(
struct
omap_mux_partition
*
partition
,
const
char
*
muxname
,
const
char
*
muxname
,
struct
omap_mux
**
found_mux
)
struct
omap_mux
**
found_mux
)
{
{
struct
omap_mux
*
mux
=
NULL
;
struct
omap_mux
*
mux
=
NULL
;
struct
omap_mux_entry
*
e
;
struct
omap_mux_entry
*
e
;
...
@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname,
...
@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname,
return
-
ENODEV
;
return
-
ENODEV
;
}
}
int
omap_mux_init_signal
(
const
char
*
muxname
,
int
val
)
int
__init
omap_mux_init_signal
(
const
char
*
muxname
,
int
val
)
{
{
struct
omap_mux_partition
*
partition
=
NULL
;
struct
omap_mux_partition
*
partition
=
NULL
;
struct
omap_mux
*
mux
=
NULL
;
struct
omap_mux
*
mux
=
NULL
;
...
...
arch/arm/mach-omap2/pm.c
浏览文件 @
824e2dbb
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
static
struct
omap_device_pm_latency
*
pm_lats
;
static
struct
omap_device_pm_latency
*
pm_lats
;
static
int
_init_omap_device
(
char
*
name
)
static
int
_
_init
_
init_omap_device
(
char
*
name
)
{
{
struct
omap_hwmod
*
oh
;
struct
omap_hwmod
*
oh
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
...
arch/arm/mach-omap2/sr_device.c
浏览文件 @
824e2dbb
...
@@ -69,7 +69,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
...
@@ -69,7 +69,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
sr_data
->
nvalue_count
=
count
;
sr_data
->
nvalue_count
=
count
;
}
}
static
int
sr_dev_init
(
struct
omap_hwmod
*
oh
,
void
*
user
)
static
int
__init
sr_dev_init
(
struct
omap_hwmod
*
oh
,
void
*
user
)
{
{
struct
omap_sr_data
*
sr_data
;
struct
omap_sr_data
*
sr_data
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
...
arch/arm/plat-omap/include/plat/omap_device.h
浏览文件 @
824e2dbb
...
@@ -100,6 +100,13 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
...
@@ -100,6 +100,13 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct
omap_device_pm_latency
*
pm_lats
,
struct
omap_device_pm_latency
*
pm_lats
,
int
pm_lats_cnt
,
int
is_early_device
);
int
pm_lats_cnt
,
int
is_early_device
);
struct
omap_device
*
omap_device_alloc
(
struct
platform_device
*
pdev
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
struct
omap_device_pm_latency
*
pm_lats
,
int
pm_lats_cnt
);
void
omap_device_delete
(
struct
omap_device
*
od
);
int
omap_device_register
(
struct
platform_device
*
pdev
);
void
__iomem
*
omap_device_get_rt_va
(
struct
omap_device
*
od
);
void
__iomem
*
omap_device_get_rt_va
(
struct
omap_device
*
od
);
struct
device
*
omap_device_get_by_hwmod_name
(
const
char
*
oh_name
);
struct
device
*
omap_device_get_by_hwmod_name
(
const
char
*
oh_name
);
...
...
arch/arm/plat-omap/omap_device.c
浏览文件 @
824e2dbb
/*
/*
* omap_device implementation
* omap_device implementation
*
*
...
@@ -97,14 +98,7 @@
...
@@ -97,14 +98,7 @@
#define USE_WAKEUP_LAT 0
#define USE_WAKEUP_LAT 0
#define IGNORE_WAKEUP_LAT 1
#define IGNORE_WAKEUP_LAT 1
static
int
omap_device_register
(
struct
platform_device
*
pdev
);
static
int
omap_early_device_register
(
struct
platform_device
*
pdev
);
static
int
omap_early_device_register
(
struct
platform_device
*
pdev
);
static
struct
omap_device
*
omap_device_alloc
(
struct
platform_device
*
pdev
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
struct
omap_device_pm_latency
*
pm_lats
,
int
pm_lats_cnt
);
static
void
omap_device_delete
(
struct
omap_device
*
od
);
static
struct
omap_device_pm_latency
omap_default_latency
[]
=
{
static
struct
omap_device_pm_latency
omap_default_latency
[]
=
{
{
{
...
@@ -509,7 +503,7 @@ static int omap_device_fill_resources(struct omap_device *od,
...
@@ -509,7 +503,7 @@ static int omap_device_fill_resources(struct omap_device *od,
*
*
* Returns an struct omap_device pointer or ERR_PTR() on error;
* Returns an struct omap_device pointer or ERR_PTR() on error;
*/
*/
st
atic
st
ruct
omap_device
*
omap_device_alloc
(
struct
platform_device
*
pdev
,
struct
omap_device
*
omap_device_alloc
(
struct
platform_device
*
pdev
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
struct
omap_device_pm_latency
*
pm_lats
,
struct
omap_device_pm_latency
*
pm_lats
,
int
pm_lats_cnt
)
int
pm_lats_cnt
)
...
@@ -591,7 +585,7 @@ static struct omap_device *omap_device_alloc(struct platform_device *pdev,
...
@@ -591,7 +585,7 @@ static struct omap_device *omap_device_alloc(struct platform_device *pdev,
return
ERR_PTR
(
ret
);
return
ERR_PTR
(
ret
);
}
}
static
void
omap_device_delete
(
struct
omap_device
*
od
)
void
omap_device_delete
(
struct
omap_device
*
od
)
{
{
if
(
!
od
)
if
(
!
od
)
return
;
return
;
...
@@ -619,7 +613,7 @@ static void omap_device_delete(struct omap_device *od)
...
@@ -619,7 +613,7 @@ static void omap_device_delete(struct omap_device *od)
* information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
* information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
* passes along the return value of omap_device_build_ss().
* passes along the return value of omap_device_build_ss().
*/
*/
struct
platform_device
*
omap_device_build
(
const
char
*
pdev_name
,
int
pdev_id
,
struct
platform_device
__init
*
omap_device_build
(
const
char
*
pdev_name
,
int
pdev_id
,
struct
omap_hwmod
*
oh
,
void
*
pdata
,
struct
omap_hwmod
*
oh
,
void
*
pdata
,
int
pdata_len
,
int
pdata_len
,
struct
omap_device_pm_latency
*
pm_lats
,
struct
omap_device_pm_latency
*
pm_lats
,
...
@@ -652,7 +646,7 @@ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
...
@@ -652,7 +646,7 @@ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
* platform_device record. Returns an ERR_PTR() on error, or passes
* platform_device record. Returns an ERR_PTR() on error, or passes
* along the return value of omap_device_register().
* along the return value of omap_device_register().
*/
*/
struct
platform_device
*
omap_device_build_ss
(
const
char
*
pdev_name
,
int
pdev_id
,
struct
platform_device
__init
*
omap_device_build_ss
(
const
char
*
pdev_name
,
int
pdev_id
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
struct
omap_hwmod
**
ohs
,
int
oh_cnt
,
void
*
pdata
,
int
pdata_len
,
void
*
pdata
,
int
pdata_len
,
struct
omap_device_pm_latency
*
pm_lats
,
struct
omap_device_pm_latency
*
pm_lats
,
...
@@ -717,7 +711,7 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
...
@@ -717,7 +711,7 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
* platform_early_add_device() on the underlying platform_device.
* platform_early_add_device() on the underlying platform_device.
* Returns 0 by default.
* Returns 0 by default.
*/
*/
static
int
omap_early_device_register
(
struct
platform_device
*
pdev
)
static
int
__init
omap_early_device_register
(
struct
platform_device
*
pdev
)
{
{
struct
platform_device
*
devices
[
1
];
struct
platform_device
*
devices
[
1
];
...
@@ -817,7 +811,7 @@ static struct dev_pm_domain omap_device_pm_domain = {
...
@@ -817,7 +811,7 @@ static struct dev_pm_domain omap_device_pm_domain = {
* platform_device_register() on the underlying platform_device.
* platform_device_register() on the underlying platform_device.
* Returns the return value of platform_device_register().
* Returns the return value of platform_device_register().
*/
*/
static
int
omap_device_register
(
struct
platform_device
*
pdev
)
int
omap_device_register
(
struct
platform_device
*
pdev
)
{
{
pr_debug
(
"omap_device: %s: registering
\n
"
,
pdev
->
name
);
pr_debug
(
"omap_device: %s: registering
\n
"
,
pdev
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录