Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5a5c419f
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看板
提交
5a5c419f
编写于
5月 19, 2010
作者:
B
Ben Dooks
浏览文件
操作
浏览文件
下载
差异文件
ARM: Merge for-2635/acer-n35
Merge branch 'for-2635/acer-n35' into for-linus/samsung2
上级
71b44396
0c3767b1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
77 addition
and
10 deletion
+77
-10
arch/arm/mach-s3c2410/Kconfig
arch/arm/mach-s3c2410/Kconfig
+7
-0
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2410/mach-n30.c
+70
-10
未找到文件。
arch/arm/mach-s3c2410/Kconfig
浏览文件 @
5a5c419f
...
...
@@ -95,12 +95,19 @@ config PM_H1940
config MACH_N30
bool "Acer N30 family"
select CPU_S3C2410
select MACH_N35
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
help
Say Y here if you want suppt for the Acer N30, Acer N35,
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
config MACH_N35
bool
help
Internal node in order to enable support for Acer N35 if Acer N30 is
selected.
config ARCH_BAST
bool "Simtec Electronics BAST (EB2410ITX)"
select CPU_S3C2410
...
...
arch/arm/mach-s3c2410/mach-n30.c
浏览文件 @
5a5c419f
...
...
@@ -26,6 +26,7 @@
#include <linux/serial_core.h>
#include <linux/timer.h>
#include <linux/io.h>
#include <linux/mmc/host.h>
#include <mach/hardware.h>
#include <asm/irq.h>
...
...
@@ -46,6 +47,7 @@
#include <plat/clock.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/mci.h>
#include <plat/s3c2410.h>
#include <plat/udc.h>
...
...
@@ -86,10 +88,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
{
switch
(
cmd
)
{
case
S3C2410_UDC_P_ENABLE
:
s3c2410_gpio_setpin
(
S3C2410_GPB
(
3
),
1
);
gpio_set_value
(
S3C2410_GPB
(
3
),
1
);
break
;
case
S3C2410_UDC_P_DISABLE
:
s3c2410_gpio_setpin
(
S3C2410_GPB
(
3
),
0
);
gpio_set_value
(
S3C2410_GPB
(
3
),
0
);
break
;
case
S3C2410_UDC_P_RESET
:
break
;
...
...
@@ -172,8 +174,10 @@ static struct gpio_keys_button n35_buttons[] = {
{
.
gpio
=
S3C2410_GPF
(
0
),
.
code
=
KEY_POWER
,
.
type
=
EV_PWR
,
.
desc
=
"Power"
,
.
active_low
=
0
,
.
wakeup
=
1
,
},
{
.
gpio
=
S3C2410_GPG
(
9
),
...
...
@@ -264,6 +268,14 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = {
.
def_trigger
=
""
,
};
/* This is the blue LED on the device. Originaly used to indicate GPS activity
* by flashing. */
static
struct
s3c24xx_led_platdata
n35_blue_led_pdata
=
{
.
name
=
"blue_led"
,
.
gpio
=
S3C2410_GPD
(
8
),
.
def_trigger
=
""
,
};
/* This LED is driven by the battery microcontroller, and is blinking
* red, blinking green or solid green when the battery is low,
* charging or full respectively. By driving GPD9 low, it's possible
...
...
@@ -275,6 +287,13 @@ static struct s3c24xx_led_platdata n30_warning_led_pdata = {
.
def_trigger
=
""
,
};
static
struct
s3c24xx_led_platdata
n35_warning_led_pdata
=
{
.
name
=
"warning_led"
,
.
flags
=
S3C24XX_LEDF_ACTLOW
|
S3C24XX_LEDF_TRISTATE
,
.
gpio
=
S3C2410_GPD
(
9
),
.
def_trigger
=
""
,
};
static
struct
platform_device
n30_blue_led
=
{
.
name
=
"s3c24xx_led"
,
.
id
=
1
,
...
...
@@ -283,6 +302,14 @@ static struct platform_device n30_blue_led = {
},
};
static
struct
platform_device
n35_blue_led
=
{
.
name
=
"s3c24xx_led"
,
.
id
=
1
,
.
dev
=
{
.
platform_data
=
&
n35_blue_led_pdata
,
},
};
static
struct
platform_device
n30_warning_led
=
{
.
name
=
"s3c24xx_led"
,
.
id
=
2
,
...
...
@@ -291,6 +318,14 @@ static struct platform_device n30_warning_led = {
},
};
static
struct
platform_device
n35_warning_led
=
{
.
name
=
"s3c24xx_led"
,
.
id
=
2
,
.
dev
=
{
.
platform_data
=
&
n35_warning_led_pdata
,
},
};
static
struct
s3c2410fb_display
n30_display
__initdata
=
{
.
type
=
S3C2410_LCDCON1_TFT
,
.
width
=
240
,
...
...
@@ -317,13 +352,36 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
.
lpcsel
=
0x06
,
};
static
void
n30_sdi_set_power
(
unsigned
char
power_mode
,
unsigned
short
vdd
)
{
switch
(
power_mode
)
{
case
MMC_POWER_ON
:
case
MMC_POWER_UP
:
gpio_set_value
(
S3C2410_GPG
(
4
),
1
);
break
;
case
MMC_POWER_OFF
:
default:
gpio_set_value
(
S3C2410_GPG
(
4
),
0
);
break
;
}
}
static
struct
s3c24xx_mci_pdata
n30_mci_cfg
__initdata
=
{
.
gpio_detect
=
S3C2410_GPF
(
1
),
.
gpio_wprotect
=
S3C2410_GPG
(
10
),
.
ocr_avail
=
MMC_VDD_32_33
,
.
set_power
=
n30_sdi_set_power
,
};
static
struct
platform_device
*
n30_devices
[]
__initdata
=
{
&
s3c_device_lcd
,
&
s3c_device_wdt
,
&
s3c_device_i2c0
,
&
s3c_device_iis
,
&
s3c_device_ohci
,
&
s3c_device_rtc
,
&
s3c_device_usbgadget
,
&
s3c_device_sdi
,
&
n30_button_device
,
&
n30_blue_led
,
&
n30_warning_led
,
...
...
@@ -334,8 +392,12 @@ static struct platform_device *n35_devices[] __initdata = {
&
s3c_device_wdt
,
&
s3c_device_i2c0
,
&
s3c_device_iis
,
&
s3c_device_rtc
,
&
s3c_device_usbgadget
,
&
s3c_device_sdi
,
&
n35_button_device
,
&
n35_blue_led
,
&
n35_warning_led
,
};
static
struct
s3c2410_platform_i2c
__initdata
n30_i2ccfg
=
{
...
...
@@ -490,17 +552,15 @@ static void __init n30_map_io(void)
s3c24xx_init_uarts
(
n30_uartcfgs
,
ARRAY_SIZE
(
n30_uartcfgs
));
}
static
void
__init
n30_init_irq
(
void
)
{
s3c24xx_init_irq
();
}
/* GPB3 is the line that controls the pull-up for the USB D+ line */
static
void
__init
n30_init
(
void
)
{
WARN_ON
(
gpio_request
(
S3C2410_GPG
(
4
),
"mmc power"
));
s3c24xx_fb_set_platdata
(
&
n30_fb_info
);
s3c24xx_udc_set_platdata
(
&
n30_udc_cfg
);
s3c24xx_mci_set_platdata
(
&
n30_mci_cfg
);
s3c_i2c0_set_platdata
(
&
n30_i2ccfg
);
/* Turn off suspend on both USB ports, and switch the
...
...
@@ -532,7 +592,7 @@ static void __init n30_init(void)
s3c2410_modify_misccr
(
S3C2410_MISCCR_USBHOST
|
S3C2410_MISCCR_USBSUSPND0
|
S3C2410_MISCCR_USBSUSPND1
,
S3C2410_MISCCR_USBSUSPND
1
);
S3C2410_MISCCR_USBSUSPND
0
);
platform_add_devices
(
n35_devices
,
ARRAY_SIZE
(
n35_devices
));
}
...
...
@@ -547,7 +607,7 @@ MACHINE_START(N30, "Acer-N30")
.
boot_params
=
S3C2410_SDRAM_PA
+
0x100
,
.
timer
=
&
s3c24xx_timer
,
.
init_machine
=
n30_init
,
.
init_irq
=
n30
_init_irq
,
.
init_irq
=
s3c24xx
_init_irq
,
.
map_io
=
n30_map_io
,
MACHINE_END
...
...
@@ -559,6 +619,6 @@ MACHINE_START(N35, "Acer-N35")
.
boot_params
=
S3C2410_SDRAM_PA
+
0x100
,
.
timer
=
&
s3c24xx_timer
,
.
init_machine
=
n30_init
,
.
init_irq
=
n30
_init_irq
,
.
init_irq
=
s3c24xx
_init_irq
,
.
map_io
=
n30_map_io
,
MACHINE_END
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录