Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
854bf596
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
854bf596
编写于
1月 06, 2011
作者:
K
Kukjin Kim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next-s3c24xx' into for-next
上级
ab10f1dd
13d27f05
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
261 addition
and
18 deletion
+261
-18
arch/arm/mach-s3c2410/include/mach/irqs.h
arch/arm/mach-s3c2410/include/mach/irqs.h
+2
-2
arch/arm/mach-s3c2410/include/mach/map.h
arch/arm/mach-s3c2410/include/mach/map.h
+2
-2
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
+1
-0
arch/arm/mach-s3c2416/Kconfig
arch/arm/mach-s3c2416/Kconfig
+12
-0
arch/arm/mach-s3c2416/Makefile
arch/arm/mach-s3c2416/Makefile
+4
-0
arch/arm/mach-s3c2416/clock.c
arch/arm/mach-s3c2416/clock.c
+13
-5
arch/arm/mach-s3c2416/mach-smdk2416.c
arch/arm/mach-s3c2416/mach-smdk2416.c
+23
-0
arch/arm/mach-s3c2416/s3c2416.c
arch/arm/mach-s3c2416/s3c2416.c
+5
-0
arch/arm/mach-s3c2416/setup-sdhci-gpio.c
arch/arm/mach-s3c2416/setup-sdhci-gpio.c
+34
-0
arch/arm/mach-s3c2416/setup-sdhci.c
arch/arm/mach-s3c2416/setup-sdhci.c
+61
-0
arch/arm/mach-s3c2443/Kconfig
arch/arm/mach-s3c2443/Kconfig
+2
-1
arch/arm/mach-s3c2443/clock.c
arch/arm/mach-s3c2443/clock.c
+2
-2
arch/arm/mach-s3c2443/mach-smdk2443.c
arch/arm/mach-s3c2443/mach-smdk2443.c
+8
-1
arch/arm/mach-s3c2443/s3c2443.c
arch/arm/mach-s3c2443/s3c2443.c
+7
-0
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/devs.c
+0
-1
arch/arm/plat-s3c24xx/s3c2443-clock.c
arch/arm/plat-s3c24xx/s3c2443-clock.c
+1
-1
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Kconfig
+6
-0
arch/arm/plat-samsung/dev-nand.c
arch/arm/plat-samsung/dev-nand.c
+0
-2
arch/arm/plat-samsung/gpio-config.c
arch/arm/plat-samsung/gpio-config.c
+42
-0
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
+1
-1
arch/arm/plat-samsung/include/plat/sdhci.h
arch/arm/plat-samsung/include/plat/sdhci.h
+35
-0
未找到文件。
arch/arm/mach-s3c2410/include/mach/irqs.h
浏览文件 @
854bf596
...
...
@@ -152,8 +152,8 @@
#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21)
/* S3C2416/S3C2450 */
#define IRQ_HSMMC0 IRQ_S3C24
43_HSMMC
#define IRQ_HSMMC1 IRQ_S3C24
16_HSMMC0
#define IRQ_HSMMC0 IRQ_S3C24
16_HSMMC0
#define IRQ_HSMMC1 IRQ_S3C24
43_HSMMC
#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
...
...
arch/arm/mach-s3c2410/include/mach/map.h
浏览文件 @
854bf596
...
...
@@ -112,8 +112,8 @@
#define S3C_PA_IIC S3C2410_PA_IIC
#define S3C_PA_UART S3C24XX_PA_UART
#define S3C_PA_USBHOST S3C2410_PA_USBHOST
#define S3C_PA_HSMMC0 S3C24
43_PA_HSMMC
#define S3C_PA_HSMMC1 S3C24
16_PA_HSMMC0
#define S3C_PA_HSMMC0 S3C24
16_PA_HSMMC0
#define S3C_PA_HSMMC1 S3C24
43_PA_HSMMC
#define S3C_PA_WDT S3C2410_PA_WATCHDOG
#define S3C_PA_NAND S3C24XX_PA_NAND
...
...
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
浏览文件 @
854bf596
...
...
@@ -86,6 +86,7 @@
#define S3C2443_HCLKCON_LCDC (1<<9)
#define S3C2443_HCLKCON_USBH (1<<11)
#define S3C2443_HCLKCON_USBD (1<<12)
#define S3C2416_HCLKCON_HSMMC0 (1<<15)
#define S3C2443_HCLKCON_HSMMC (1<<16)
#define S3C2443_HCLKCON_CFC (1<<17)
#define S3C2443_HCLKCON_SSMC (1<<18)
...
...
arch/arm/mach-s3c2416/Kconfig
浏览文件 @
854bf596
...
...
@@ -31,6 +31,17 @@ config S3C2416_PM
help
Internal config node to apply S3C2416 power management
config S3C2416_SETUP_SDHCI
bool
select S3C2416_SETUP_SDHCI_GPIO
help
Internal helper functions for S3C2416 based SDHCI systems
config S3C2416_SETUP_SDHCI_GPIO
bool
help
Common setup code for SDHCI gpio.
menu "S3C2416 Machines"
config MACH_SMDK2416
...
...
@@ -42,6 +53,7 @@ config MACH_SMDK2416
select S3C_DEV_HSMMC1
select S3C_DEV_NAND
select S3C_DEV_USB_HOST
select S3C2416_SETUP_SDHCI
select S3C2416_PM if PM
help
Say Y here if you are using an SMDK2416
...
...
arch/arm/mach-s3c2416/Makefile
浏览文件 @
854bf596
...
...
@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o
obj-$(CONFIG_S3C2416_PM)
+=
pm.o
#obj-$(CONFIG_S3C2416_DMA) += dma.o
# Device setup
obj-$(CONFIG_S3C2416_SETUP_SDHCI)
+=
setup-sdhci.o
obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)
+=
setup-sdhci-gpio.o
# Machine support
obj-$(CONFIG_MACH_SMDK2416)
+=
mach-smdk2416.o
arch/arm/mach-s3c2416/clock.c
浏览文件 @
854bf596
...
...
@@ -38,12 +38,11 @@ static unsigned int armdiv[8] = {
[
7
]
=
8
,
};
/* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */
static
struct
clksrc_clk
hsmmc_div
[]
=
{
[
0
]
=
{
.
clk
=
{
.
name
=
"hsmmc-div"
,
.
id
=
1
,
.
id
=
0
,
.
parent
=
&
clk_esysclk
.
clk
,
},
.
reg_div
=
{
.
reg
=
S3C2416_CLKDIV2
,
.
size
=
2
,
.
shift
=
6
},
...
...
@@ -51,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = {
[
1
]
=
{
.
clk
=
{
.
name
=
"hsmmc-div"
,
.
id
=
0
,
.
id
=
1
,
.
parent
=
&
clk_esysclk
.
clk
,
},
.
reg_div
=
{
.
reg
=
S3C2443_CLKDIV1
,
.
size
=
2
,
.
shift
=
6
},
...
...
@@ -61,7 +60,7 @@ static struct clksrc_clk hsmmc_div[] = {
static
struct
clksrc_clk
hsmmc_mux
[]
=
{
[
0
]
=
{
.
clk
=
{
.
id
=
1
,
.
id
=
0
,
.
name
=
"hsmmc-if"
,
.
ctrlbit
=
(
1
<<
6
),
.
enable
=
s3c2443_clkcon_enable_s
,
...
...
@@ -77,7 +76,7 @@ static struct clksrc_clk hsmmc_mux[] = {
},
[
1
]
=
{
.
clk
=
{
.
id
=
0
,
.
id
=
1
,
.
name
=
"hsmmc-if"
,
.
ctrlbit
=
(
1
<<
12
),
.
enable
=
s3c2443_clkcon_enable_s
,
...
...
@@ -93,6 +92,13 @@ static struct clksrc_clk hsmmc_mux[] = {
},
};
static
struct
clk
hsmmc0_clk
=
{
.
name
=
"hsmmc"
,
.
id
=
0
,
.
parent
=
&
clk_h
,
.
enable
=
s3c2443_clkcon_enable_h
,
.
ctrlbit
=
S3C2416_HCLKCON_HSMMC0
,
};
static
inline
unsigned
int
s3c2416_fclk_div
(
unsigned
long
clkcon0
)
{
...
...
@@ -130,6 +136,8 @@ void __init s3c2416_init_clocks(int xtal)
for
(
ptr
=
0
;
ptr
<
ARRAY_SIZE
(
clksrcs
);
ptr
++
)
s3c_register_clksrc
(
clksrcs
[
ptr
],
1
);
s3c24xx_register_clock
(
&
hsmmc0_clk
);
s3c_pwmclk_init
();
}
arch/arm/mach-s3c2416/mach-smdk2416.c
浏览文件 @
854bf596
...
...
@@ -46,6 +46,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/nand.h>
#include <plat/sdhci.h>
#include <plat/regs-fb-v4.h>
#include <plat/fb.h>
...
...
@@ -110,6 +111,13 @@ static struct s3c2410_uartcfg smdk2416_uartcfgs[] __initdata = {
.
ucon
=
UCON
,
.
ulcon
=
ULCON
|
0x50
,
.
ufcon
=
UFCON
,
},
[
3
]
=
{
.
hwport
=
3
,
.
flags
=
0
,
.
ucon
=
UCON
,
.
ulcon
=
ULCON
,
.
ufcon
=
UFCON
,
}
};
...
...
@@ -159,6 +167,18 @@ static struct s3c_fb_platdata smdk2416_fb_platdata = {
.
vidcon1
=
VIDCON1_INV_HSYNC
|
VIDCON1_INV_VSYNC
,
};
static
struct
s3c_sdhci_platdata
smdk2416_hsmmc0_pdata
__initdata
=
{
.
max_width
=
4
,
.
cd_type
=
S3C_SDHCI_CD_GPIO
,
.
ext_cd_gpio
=
S3C2410_GPF
(
1
),
.
ext_cd_gpio_invert
=
1
,
};
static
struct
s3c_sdhci_platdata
smdk2416_hsmmc1_pdata
__initdata
=
{
.
max_width
=
4
,
.
cd_type
=
S3C_SDHCI_CD_NONE
,
};
static
struct
platform_device
*
smdk2416_devices
[]
__initdata
=
{
&
s3c_device_fb
,
&
s3c_device_wdt
,
...
...
@@ -180,6 +200,9 @@ static void __init smdk2416_machine_init(void)
s3c_i2c0_set_platdata
(
NULL
);
s3c_fb_set_platdata
(
&
smdk2416_fb_platdata
);
s3c_sdhci0_set_platdata
(
&
smdk2416_hsmmc0_pdata
);
s3c_sdhci1_set_platdata
(
&
smdk2416_hsmmc1_pdata
);
gpio_request
(
S3C2410_GPB
(
4
),
"USBHost Power"
);
gpio_direction_output
(
S3C2410_GPB
(
4
),
1
);
...
...
arch/arm/mach-s3c2416/s3c2416.c
浏览文件 @
854bf596
...
...
@@ -53,6 +53,7 @@
#include <plat/s3c2416.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/sdhci.h>
#include <plat/iic-core.h>
#include <plat/fb-core.h>
...
...
@@ -115,6 +116,10 @@ void __init s3c2416_map_io(void)
s3c24xx_gpiocfg_default
.
set_pull
=
s3c_gpio_setpull_updown
;
s3c24xx_gpiocfg_default
.
get_pull
=
s3c_gpio_getpull_updown
;
/* initialize device information early */
s3c2416_default_sdhci0
();
s3c2416_default_sdhci1
();
iotable_init
(
s3c2416_iodesc
,
ARRAY_SIZE
(
s3c2416_iodesc
));
}
...
...
arch/arm/mach-s3c2416/setup-sdhci-gpio.c
0 → 100644
浏览文件 @
854bf596
/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c
*
* Copyright 2010 Promwad Innovation Company
* Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
*
* S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
*
* Based on mach-s3c64xx/setup-sdhci-gpio.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <mach/regs-gpio.h>
#include <plat/gpio-cfg.h>
void
s3c2416_setup_sdhci0_cfg_gpio
(
struct
platform_device
*
dev
,
int
width
)
{
s3c_gpio_cfgrange_nopull
(
S3C2410_GPE
(
5
),
2
+
width
,
S3C_GPIO_SFN
(
2
));
}
void
s3c2416_setup_sdhci1_cfg_gpio
(
struct
platform_device
*
dev
,
int
width
)
{
s3c_gpio_cfgrange_nopull
(
S3C2410_GPL
(
0
),
width
,
S3C_GPIO_SFN
(
2
));
s3c_gpio_cfgrange_nopull
(
S3C2410_GPL
(
8
),
2
,
S3C_GPIO_SFN
(
2
));
}
arch/arm/mach-s3c2416/setup-sdhci.c
0 → 100644
浏览文件 @
854bf596
/* linux/arch/arm/mach-s3c2416/setup-sdhci.c
*
* Copyright 2010 Promwad Innovation Company
* Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
*
* S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC)
*
* Based on mach-s3c64xx/setup-sdhci.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
#include <plat/regs-sdhci.h>
#include <plat/sdhci.h>
/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */
char
*
s3c2416_hsmmc_clksrcs
[
4
]
=
{
[
0
]
=
"hsmmc"
,
[
1
]
=
"hsmmc"
,
[
2
]
=
"hsmmc-if"
,
/* [3] = "48m", - note not successfully used yet */
};
void
s3c2416_setup_sdhci_cfg_card
(
struct
platform_device
*
dev
,
void
__iomem
*
r
,
struct
mmc_ios
*
ios
,
struct
mmc_card
*
card
)
{
u32
ctrl2
,
ctrl3
;
ctrl2
=
__raw_readl
(
r
+
S3C_SDHCI_CONTROL2
);
ctrl2
&=
S3C_SDHCI_CTRL2_SELBASECLK_MASK
;
ctrl2
|=
(
S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR
|
S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK
|
S3C_SDHCI_CTRL2_ENFBCLKRX
|
S3C_SDHCI_CTRL2_DFCNT_NONE
|
S3C_SDHCI_CTRL2_ENCLKOUTHOLD
);
if
(
ios
->
clock
<
25
*
1000000
)
ctrl3
=
(
S3C_SDHCI_CTRL3_FCSEL3
|
S3C_SDHCI_CTRL3_FCSEL2
|
S3C_SDHCI_CTRL3_FCSEL1
|
S3C_SDHCI_CTRL3_FCSEL0
);
else
ctrl3
=
(
S3C_SDHCI_CTRL3_FCSEL1
|
S3C_SDHCI_CTRL3_FCSEL0
);
__raw_writel
(
ctrl2
,
r
+
S3C_SDHCI_CONTROL2
);
__raw_writel
(
ctrl3
,
r
+
S3C_SDHCI_CONTROL3
);
}
arch/arm/mach-s3c2443/Kconfig
浏览文件 @
854bf596
...
...
@@ -10,6 +10,7 @@ config CPU_S3C2443
select CPU_LLSERIAL_S3C2440
select SAMSUNG_CLKSRC
select S3C2443_CLOCK
select S3C_GPIO_PULL_S3C2443
help
Support for the S3C2443 SoC from the S3C24XX line
...
...
@@ -25,7 +26,7 @@ config MACH_SMDK2443
bool "SMDK2443"
select CPU_S3C2443
select MACH_SMDK
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC
1
help
Say Y here if you are using an SMDK2443
...
...
arch/arm/mach-s3c2443/clock.c
浏览文件 @
854bf596
...
...
@@ -196,7 +196,7 @@ static struct clksrc_clk clk_hsspi = {
static
struct
clksrc_clk
clk_hsmmc_div
=
{
.
clk
=
{
.
name
=
"hsmmc-div"
,
.
id
=
-
1
,
.
id
=
1
,
.
parent
=
&
clk_esysclk
.
clk
,
},
.
reg_div
=
{
.
reg
=
S3C2443_CLKDIV1
,
.
size
=
2
,
.
shift
=
6
},
...
...
@@ -231,7 +231,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
static
struct
clk
clk_hsmmc
=
{
.
name
=
"hsmmc-if"
,
.
id
=
-
1
,
.
id
=
1
,
.
parent
=
&
clk_hsmmc_div
.
clk
,
.
enable
=
s3c2443_enable_hsmmc
,
.
ops
=
&
(
struct
clk_ops
)
{
...
...
arch/arm/mach-s3c2443/mach-smdk2443.c
浏览文件 @
854bf596
...
...
@@ -99,13 +99,20 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {
.
ucon
=
0x3c5
,
.
ulcon
=
0x43
,
.
ufcon
=
0x51
,
},
[
3
]
=
{
.
hwport
=
3
,
.
flags
=
0
,
.
ucon
=
0x3c5
,
.
ulcon
=
0x03
,
.
ufcon
=
0x51
,
}
};
static
struct
platform_device
*
smdk2443_devices
[]
__initdata
=
{
&
s3c_device_wdt
,
&
s3c_device_i2c0
,
&
s3c_device_hsmmc
0
,
&
s3c_device_hsmmc
1
,
#ifdef CONFIG_SND_SOC_SMDK2443_WM9710
&
s3c_device_ac97
,
#endif
...
...
arch/arm/mach-s3c2443/s3c2443.c
浏览文件 @
854bf596
...
...
@@ -16,6 +16,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/sysdev.h>
...
...
@@ -32,6 +33,9 @@
#include <mach/regs-s3c2443-clock.h>
#include <mach/reset.h>
#include <plat/gpio-core.h>
#include <plat/gpio-cfg.h>
#include <plat/gpio-cfg-helpers.h>
#include <plat/s3c2443.h>
#include <plat/devs.h>
#include <plat/cpu.h>
...
...
@@ -86,6 +90,9 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no)
void
__init
s3c2443_map_io
(
void
)
{
s3c24xx_gpiocfg_default
.
set_pull
=
s3c_gpio_setpull_s3c2443
;
s3c24xx_gpiocfg_default
.
get_pull
=
s3c_gpio_getpull_s3c2443
;
iotable_init
(
s3c2443_iodesc
,
ARRAY_SIZE
(
s3c2443_iodesc
));
}
...
...
arch/arm/plat-s3c24xx/devs.c
浏览文件 @
854bf596
...
...
@@ -194,7 +194,6 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_
memcpy
(
&
s3c2410ts_info
,
hard_s3c2410ts_info
,
sizeof
(
struct
s3c2410_ts_mach_info
));
s3c_device_ts
.
dev
.
platform_data
=
&
s3c2410ts_info
;
}
EXPORT_SYMBOL
(
s3c24xx_ts_set_platdata
);
/* USB Device (Gadget)*/
...
...
arch/arm/plat-s3c24xx/s3c2443-clock.c
浏览文件 @
854bf596
...
...
@@ -271,7 +271,7 @@ static struct clk init_clocks[] = {
.
ctrlbit
=
S3C2443_HCLKCON_DMA5
,
},
{
.
name
=
"hsmmc"
,
.
id
=
0
,
.
id
=
1
,
.
parent
=
&
clk_h
,
.
enable
=
s3c2443_clkcon_enable_h
,
.
ctrlbit
=
S3C2443_HCLKCON_HSMMC
,
...
...
arch/arm/plat-samsung/Kconfig
浏览文件 @
854bf596
...
...
@@ -95,6 +95,12 @@ config S3C_GPIO_PULL_UPDOWN
help
Internal configuration to enable the correct GPIO pull helper
config S3C_GPIO_PULL_S3C2443
bool
select S3C_GPIO_PULL_UPDOWN
help
Internal configuration to enable the correct GPIO pull helper for S3C2443-style GPIO
config S3C_GPIO_PULL_DOWN
bool
help
...
...
arch/arm/plat-samsung/dev-nand.c
浏览文件 @
854bf596
...
...
@@ -126,5 +126,3 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
s3c_device_nand
.
dev
.
platform_data
=
npd
;
}
EXPORT_SYMBOL_GPL
(
s3c_nand_set_platdata
);
arch/arm/plat-samsung/gpio-config.c
浏览文件 @
854bf596
...
...
@@ -278,6 +278,48 @@ s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip,
pup
&=
0x3
;
return
(
__force
s3c_gpio_pull_t
)
pup
;
}
#ifdef CONFIG_S3C_GPIO_PULL_S3C2443
int
s3c_gpio_setpull_s3c2443
(
struct
s3c_gpio_chip
*
chip
,
unsigned
int
off
,
s3c_gpio_pull_t
pull
)
{
switch
(
pull
)
{
case
S3C_GPIO_PULL_NONE
:
pull
=
0x01
;
break
;
case
S3C_GPIO_PULL_UP
:
pull
=
0x00
;
break
;
case
S3C_GPIO_PULL_DOWN
:
pull
=
0x02
;
break
;
}
return
s3c_gpio_setpull_updown
(
chip
,
off
,
pull
);
}
s3c_gpio_pull_t
s3c_gpio_getpull_s3c2443
(
struct
s3c_gpio_chip
*
chip
,
unsigned
int
off
)
{
s3c_gpio_pull_t
pull
;
pull
=
s3c_gpio_getpull_updown
(
chip
,
off
);
switch
(
pull
)
{
case
0x00
:
pull
=
S3C_GPIO_PULL_UP
;
break
;
case
0x01
:
case
0x03
:
pull
=
S3C_GPIO_PULL_NONE
;
break
;
case
0x02
:
pull
=
S3C_GPIO_PULL_DOWN
;
break
;
}
return
pull
;
}
#endif
#endif
#if defined(CONFIG_S3C_GPIO_PULL_UP) || defined(CONFIG_S3C_GPIO_PULL_DOWN)
...
...
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
浏览文件 @
854bf596
...
...
@@ -244,7 +244,7 @@ extern int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip,
* This helper function reads the state of the pull-{up,down} resistor for the
* given GPIO in the same case as s3c_gpio_setpull_upown.
*/
extern
s3c_gpio_pull_t
s3c_gpio_getpull_s3c24
xx
(
struct
s3c_gpio_chip
*
chip
,
extern
s3c_gpio_pull_t
s3c_gpio_getpull_s3c24
43
(
struct
s3c_gpio_chip
*
chip
,
unsigned
int
off
);
#endif
/* __PLAT_GPIO_CFG_HELPERS_H */
...
...
arch/arm/plat-samsung/include/plat/sdhci.h
浏览文件 @
854bf596
...
...
@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
/* Helper function availablity */
extern
void
s3c2416_setup_sdhci0_cfg_gpio
(
struct
platform_device
*
,
int
w
);
extern
void
s3c2416_setup_sdhci1_cfg_gpio
(
struct
platform_device
*
,
int
w
);
extern
void
s3c64xx_setup_sdhci0_cfg_gpio
(
struct
platform_device
*
,
int
w
);
extern
void
s3c64xx_setup_sdhci1_cfg_gpio
(
struct
platform_device
*
,
int
w
);
extern
void
s5pc100_setup_sdhci0_cfg_gpio
(
struct
platform_device
*
,
int
w
);
...
...
@@ -122,6 +124,39 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
extern
void
s5pv310_setup_sdhci2_cfg_gpio
(
struct
platform_device
*
,
int
w
);
extern
void
s5pv310_setup_sdhci3_cfg_gpio
(
struct
platform_device
*
,
int
w
);
/* S3C2416 SDHCI setup */
#ifdef CONFIG_S3C2416_SETUP_SDHCI
extern
char
*
s3c2416_hsmmc_clksrcs
[
4
];
extern
void
s3c2416_setup_sdhci_cfg_card
(
struct
platform_device
*
dev
,
void
__iomem
*
r
,
struct
mmc_ios
*
ios
,
struct
mmc_card
*
card
);
static
inline
void
s3c2416_default_sdhci0
(
void
)
{
#ifdef CONFIG_S3C_DEV_HSMMC
s3c_hsmmc0_def_platdata
.
clocks
=
s3c2416_hsmmc_clksrcs
;
s3c_hsmmc0_def_platdata
.
cfg_gpio
=
s3c2416_setup_sdhci0_cfg_gpio
;
s3c_hsmmc0_def_platdata
.
cfg_card
=
s3c2416_setup_sdhci_cfg_card
;
#endif
/* CONFIG_S3C_DEV_HSMMC */
}
static
inline
void
s3c2416_default_sdhci1
(
void
)
{
#ifdef CONFIG_S3C_DEV_HSMMC1
s3c_hsmmc1_def_platdata
.
clocks
=
s3c2416_hsmmc_clksrcs
;
s3c_hsmmc1_def_platdata
.
cfg_gpio
=
s3c2416_setup_sdhci1_cfg_gpio
;
s3c_hsmmc1_def_platdata
.
cfg_card
=
s3c2416_setup_sdhci_cfg_card
;
#endif
/* CONFIG_S3C_DEV_HSMMC1 */
}
#else
static
inline
void
s3c2416_default_sdhci0
(
void
)
{
}
static
inline
void
s3c2416_default_sdhci1
(
void
)
{
}
#endif
/* CONFIG_S3C2416_SETUP_SDHCI */
/* S3C64XX SDHCI setup */
#ifdef CONFIG_S3C64XX_SETUP_SDHCI
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录