Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
1e231efe
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1e231efe
编写于
9月 06, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/home/rmk/linux-2.6-arm
上级
ef88b7db
0ce7625f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
115 addition
and
74 deletion
+115
-74
arch/arm/common/scoop.c
arch/arm/common/scoop.c
+6
-0
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/corgi.c
+12
-0
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/poodle.c
+12
-0
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2410/mach-n30.c
+10
-20
drivers/pcmcia/pxa2xx_sharpsl.c
drivers/pcmcia/pxa2xx_sharpsl.c
+62
-52
include/asm-arm/hardware/scoop.h
include/asm-arm/hardware/scoop.h
+13
-0
include/asm-arm/mach/time.h
include/asm-arm/mach/time.h
+0
-2
未找到文件。
arch/arm/common/scoop.c
浏览文件 @
1e231efe
...
...
@@ -17,6 +17,12 @@
#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
/* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c
There is no easy way to link multiple scoop devices into one
single entity for the pxa2xx_pcmcia device */
int
scoop_num
;
struct
scoop_pcmcia_dev
*
scoop_devs
;
struct
scoop_dev
{
void
*
base
;
spinlock_t
scoop_lock
;
...
...
arch/arm/mach-pxa/corgi.c
浏览文件 @
1e231efe
...
...
@@ -60,6 +60,15 @@ static struct scoop_config corgi_scoop_setup = {
.
io_out
=
CORGI_SCOOP_IO_OUT
,
};
static
struct
scoop_pcmcia_dev
corgi_pcmcia_scoop
[]
=
{
{
.
dev
=
&
corgiscoop_device
.
dev
,
.
irq
=
CORGI_IRQ_GPIO_CF_IRQ
,
.
cd_irq
=
CORGI_IRQ_GPIO_CF_CD
,
.
cd_irq_str
=
"PCMCIA0 CD"
,
},
};
struct
platform_device
corgiscoop_device
=
{
.
name
=
"sharp-scoop"
,
.
id
=
-
1
,
...
...
@@ -241,6 +250,9 @@ static void __init corgi_init(void)
pxa_set_udc_info
(
&
udc_info
);
pxa_set_mci_info
(
&
corgi_mci_platform_data
);
scoop_num
=
1
;
scoop_devs
=
&
corgi_pcmcia_scoop
[
0
];
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
}
...
...
arch/arm/mach-pxa/poodle.c
浏览文件 @
1e231efe
...
...
@@ -62,6 +62,15 @@ struct platform_device poodle_scoop_device = {
.
resource
=
poodle_scoop_resources
,
};
static
struct
scoop_pcmcia_dev
poodle_pcmcia_scoop
[]
=
{
{
.
dev
=
&
poodle_scoop_device
.
dev
,
.
irq
=
POODLE_IRQ_GPIO_CF_IRQ
,
.
cd_irq
=
POODLE_IRQ_GPIO_CF_CD
,
.
cd_irq_str
=
"PCMCIA0 CD"
,
},
};
/* LoCoMo device */
static
struct
resource
locomo_resources
[]
=
{
...
...
@@ -147,6 +156,9 @@ static void __init poodle_init(void)
set_pxa_fb_info
(
&
poodle_fb_info
);
scoop_num
=
1
;
scoop_devs
=
&
poodle_pcmcia_scoop
[
0
];
ret
=
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
if
(
ret
)
{
printk
(
KERN_WARNING
"poodle: Unable to register LoCoMo device
\n
"
);
...
...
arch/arm/mach-s3c2410/mach-n30.c
浏览文件 @
1e231efe
...
...
@@ -110,34 +110,24 @@ void __init n30_init_irq(void)
s3c24xx_init_irq
();
}
static
int
n30_usbstart_thread
(
void
*
unused
)
{
/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */
writel
(
readl
(
S3C2410_MISCCR
)
&
~
0x00003008
,
S3C2410_MISCCR
);
/* Turn off the D+ pull up for 3 seconds so that the USB host
* at the other end will do a rescan of the USB bus. */
s3c2410_gpio_setpin
(
S3C2410_GPB3
,
0
);
msleep_interruptible
(
3
*
HZ
);
s3c2410_gpio_setpin
(
S3C2410_GPB3
,
1
);
return
0
;
}
/* GPB3 is the line that controls the pull-up for the USB D+ line */
void
__init
n30_init
(
void
)
{
s3c_device_i2c
.
dev
.
platform_data
=
&
n30_i2ccfg
;
kthread_run
(
n30_usbstart_thread
,
NULL
,
"n30_usbstart"
);
/* Turn off suspend on both USB ports, and switch the
* selectable USB port to USB device mode. */
s3c2410_modify_misccr
(
S3C2410_MISCCR_USBHOST
|
S3C2410_MISCCR_USBSUSPND0
|
S3C2410_MISCCR_USBSUSPND1
,
0x0
);
}
MACHINE_START
(
N30
,
"Acer-N30"
)
/* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */
/* Maintainer: Christer Weinigel <christer@weinigel.se>,
Ben Dooks <ben-linux@fluff.org>
*/
.
phys_ram
=
S3C2410_SDRAM_PA
,
.
phys_io
=
S3C2410_PA_UART
,
.
io_pg_offst
=
(((
u32
)
S3C24XX_VA_UART
)
>>
18
)
&
0xfffc
,
...
...
drivers/pcmcia/pxa2xx_sharpsl.c
浏览文件 @
1e231efe
...
...
@@ -20,27 +20,18 @@
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/hardware/scoop.h>
#include <asm/arch/corgi.h>
#include <asm/arch/pxa-regs.h>
#include "soc_common.h"
#define NO_KEEP_VS 0x0001
static
unsigned
char
keep_vs
;
static
unsigned
char
keep_rd
;
static
struct
pcmcia_irqs
irqs
[]
=
{
{
0
,
CORGI_IRQ_GPIO_CF_CD
,
"PCMCIA0 CD"
},
};
static
void
sharpsl_pcmcia_init_reset
(
void
)
static
void
sharpsl_pcmcia_init_reset
(
struct
scoop_pcmcia_dev
*
scoopdev
)
{
reset_scoop
(
&
corgiscoop_device
.
dev
);
keep_vs
=
NO_KEEP_VS
;
keep_rd
=
0
;
reset_scoop
(
scoopdev
->
dev
);
scoopdev
->
keep_vs
=
NO_KEEP_VS
;
scoopdev
->
keep_rd
=
0
;
}
static
int
sharpsl_pcmcia_hw_init
(
struct
soc_pcmcia_socket
*
skt
)
...
...
@@ -71,29 +62,35 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
pxa_gpio_mode
(
GPIO57_nIOIS16_MD
);
/* Register interrupts */
ret
=
soc_pcmcia_request_irqs
(
skt
,
irqs
,
ARRAY_SIZE
(
irqs
));
if
(
ret
)
{
printk
(
KERN_ERR
"Request for Compact Flash IRQ failed
\n
"
);
return
ret
;
if
(
scoop_devs
[
skt
->
nr
].
cd_irq
>=
0
)
{
struct
pcmcia_irqs
cd_irq
;
cd_irq
.
sock
=
skt
->
nr
;
cd_irq
.
irq
=
scoop_devs
[
skt
->
nr
].
cd_irq
;
cd_irq
.
str
=
scoop_devs
[
skt
->
nr
].
cd_irq_str
;
ret
=
soc_pcmcia_request_irqs
(
skt
,
&
cd_irq
,
1
);
if
(
ret
)
{
printk
(
KERN_ERR
"Request for Compact Flash IRQ failed
\n
"
);
return
ret
;
}
}
/* Enable interrupt */
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_IMR
,
0x00C0
);
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_MCR
,
0x0101
);
keep_vs
=
NO_KEEP_VS
;
skt
->
irq
=
CORGI_IRQ_GPIO_CF_IRQ
;
skt
->
irq
=
scoop_devs
[
skt
->
nr
].
irq
;
return
0
;
}
static
void
sharpsl_pcmcia_hw_shutdown
(
struct
soc_pcmcia_socket
*
skt
)
{
soc_pcmcia_free_irqs
(
skt
,
irqs
,
ARRAY_SIZE
(
irqs
));
if
(
scoop_devs
[
skt
->
nr
].
cd_irq
>=
0
)
{
struct
pcmcia_irqs
cd_irq
;
/* CF_BUS_OFF */
sharpsl_pcmcia_init_reset
();
cd_irq
.
sock
=
skt
->
nr
;
cd_irq
.
irq
=
scoop_devs
[
skt
->
nr
].
cd_irq
;
cd_irq
.
str
=
scoop_devs
[
skt
->
nr
].
cd_irq_str
;
soc_pcmcia_free_irqs
(
skt
,
&
cd_irq
,
1
);
}
}
...
...
@@ -101,31 +98,32 @@ static void sharpsl_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
struct
pcmcia_state
*
state
)
{
unsigned
short
cpr
,
csr
;
struct
device
*
scoop
=
scoop_devs
[
skt
->
nr
].
dev
;
cpr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CPR
);
cpr
=
read_scoop_reg
(
scoop_devs
[
skt
->
nr
]
.
dev
,
SCOOP_CPR
);
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_IRM
,
0x00FF
);
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_ISR
,
0x0000
);
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_IRM
,
0x0000
);
csr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CSR
);
write_scoop_reg
(
scoop
,
SCOOP_IRM
,
0x00FF
);
write_scoop_reg
(
scoop
,
SCOOP_ISR
,
0x0000
);
write_scoop_reg
(
scoop
,
SCOOP_IRM
,
0x0000
);
csr
=
read_scoop_reg
(
scoop
,
SCOOP_CSR
);
if
(
csr
&
0x0004
)
{
/* card eject */
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CDR
,
0x0000
);
keep_vs
=
NO_KEEP_VS
;
write_scoop_reg
(
scoop
,
SCOOP_CDR
,
0x0000
);
scoop_devs
[
skt
->
nr
].
keep_vs
=
NO_KEEP_VS
;
}
else
if
(
!
(
keep_vs
&
NO_KEEP_VS
))
{
else
if
(
!
(
scoop_devs
[
skt
->
nr
].
keep_vs
&
NO_KEEP_VS
))
{
/* keep vs1,vs2 */
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CDR
,
0x0000
);
csr
|=
keep_vs
;
write_scoop_reg
(
scoop
,
SCOOP_CDR
,
0x0000
);
csr
|=
scoop_devs
[
skt
->
nr
].
keep_vs
;
}
else
if
(
cpr
&
0x0003
)
{
/* power on */
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CDR
,
0x0000
);
keep_vs
=
(
csr
&
0x00C0
);
write_scoop_reg
(
scoop
,
SCOOP_CDR
,
0x0000
);
scoop_devs
[
skt
->
nr
].
keep_vs
=
(
csr
&
0x00C0
);
}
else
{
/* card detect */
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CDR
,
0x0002
);
write_scoop_reg
(
scoop
,
SCOOP_CDR
,
0x0002
);
}
state
->
detect
=
(
csr
&
0x0004
)
?
0
:
1
;
...
...
@@ -147,6 +145,7 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
const
socket_state_t
*
state
)
{
unsigned
long
flags
;
struct
device
*
scoop
=
scoop_devs
[
skt
->
nr
].
dev
;
unsigned
short
cpr
,
ncpr
,
ccr
,
nccr
,
mcr
,
nmcr
,
imr
,
nimr
;
...
...
@@ -166,10 +165,10 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
local_irq_save
(
flags
);
nmcr
=
(
mcr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_MCR
))
&
~
0x0010
;
ncpr
=
(
cpr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CPR
))
&
~
0x0083
;
nccr
=
(
ccr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CCR
))
&
~
0x0080
;
nimr
=
(
imr
=
read_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_IMR
))
&
~
0x003E
;
nmcr
=
(
mcr
=
read_scoop_reg
(
scoop
,
SCOOP_MCR
))
&
~
0x0010
;
ncpr
=
(
cpr
=
read_scoop_reg
(
scoop
,
SCOOP_CPR
))
&
~
0x0083
;
nccr
=
(
ccr
=
read_scoop_reg
(
scoop
,
SCOOP_CCR
))
&
~
0x0080
;
nimr
=
(
imr
=
read_scoop_reg
(
scoop
,
SCOOP_IMR
))
&
~
0x003E
;
ncpr
|=
(
state
->
Vcc
==
33
)
?
0x0001
:
(
state
->
Vcc
==
50
)
?
0x0002
:
0
;
...
...
@@ -184,22 +183,22 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
((
skt
->
status
&
SS_WRPROT
)
?
0x0008
:
0
);
if
(
!
(
ncpr
&
0x0003
))
{
keep_rd
=
0
;
}
else
if
(
!
keep_rd
)
{
scoop_devs
[
skt
->
nr
].
keep_rd
=
0
;
}
else
if
(
!
scoop_devs
[
skt
->
nr
].
keep_rd
)
{
if
(
nccr
&
0x0080
)
keep_rd
=
1
;
scoop_devs
[
skt
->
nr
].
keep_rd
=
1
;
else
nccr
|=
0x0080
;
}
if
(
mcr
!=
nmcr
)
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_MCR
,
nmcr
);
write_scoop_reg
(
scoop
,
SCOOP_MCR
,
nmcr
);
if
(
cpr
!=
ncpr
)
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CPR
,
ncpr
);
write_scoop_reg
(
scoop
,
SCOOP_CPR
,
ncpr
);
if
(
ccr
!=
nccr
)
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_CCR
,
nccr
);
write_scoop_reg
(
scoop
,
SCOOP_CCR
,
nccr
);
if
(
imr
!=
nimr
)
write_scoop_reg
(
&
corgiscoop_device
.
dev
,
SCOOP_IMR
,
nimr
);
write_scoop_reg
(
scoop
,
SCOOP_IMR
,
nimr
);
local_irq_restore
(
flags
);
...
...
@@ -208,10 +207,18 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
static
void
sharpsl_pcmcia_socket_init
(
struct
soc_pcmcia_socket
*
skt
)
{
sharpsl_pcmcia_init_reset
(
&
scoop_devs
[
skt
->
nr
]);
/* Enable interrupt */
write_scoop_reg
(
scoop_devs
[
skt
->
nr
].
dev
,
SCOOP_IMR
,
0x00C0
);
write_scoop_reg
(
scoop_devs
[
skt
->
nr
].
dev
,
SCOOP_MCR
,
0x0101
);
scoop_devs
[
skt
->
nr
].
keep_vs
=
NO_KEEP_VS
;
}
static
void
sharpsl_pcmcia_socket_suspend
(
struct
soc_pcmcia_socket
*
skt
)
{
/* CF_BUS_OFF */
sharpsl_pcmcia_init_reset
(
&
scoop_devs
[
skt
->
nr
]);
}
static
struct
pcmcia_low_level
sharpsl_pcmcia_ops
=
{
...
...
@@ -223,7 +230,7 @@ static struct pcmcia_low_level sharpsl_pcmcia_ops = {
.
socket_init
=
sharpsl_pcmcia_socket_init
,
.
socket_suspend
=
sharpsl_pcmcia_socket_suspend
,
.
first
=
0
,
.
nr
=
1
,
.
nr
=
0
,
};
static
struct
platform_device
*
sharpsl_pcmcia_device
;
...
...
@@ -232,12 +239,15 @@ static int __init sharpsl_pcmcia_init(void)
{
int
ret
;
sharpsl_pcmcia_ops
.
nr
=
scoop_num
;
sharpsl_pcmcia_device
=
kmalloc
(
sizeof
(
*
sharpsl_pcmcia_device
),
GFP_KERNEL
);
if
(
!
sharpsl_pcmcia_device
)
return
-
ENOMEM
;
memset
(
sharpsl_pcmcia_device
,
0
,
sizeof
(
*
sharpsl_pcmcia_device
));
sharpsl_pcmcia_device
->
name
=
"pxa2xx-pcmcia"
;
sharpsl_pcmcia_device
->
dev
.
platform_data
=
&
sharpsl_pcmcia_ops
;
sharpsl_pcmcia_device
->
dev
.
parent
=
scoop_devs
[
0
].
dev
;
ret
=
platform_device_register
(
sharpsl_pcmcia_device
);
if
(
ret
)
...
...
include/asm-arm/hardware/scoop.h
浏览文件 @
1e231efe
...
...
@@ -40,6 +40,19 @@ struct scoop_config {
unsigned
short
io_dir
;
};
/* Structure for linking scoop devices to PCMCIA sockets */
struct
scoop_pcmcia_dev
{
struct
device
*
dev
;
/* Pointer to this socket's scoop device */
int
irq
;
/* irq for socket */
int
cd_irq
;
const
char
*
cd_irq_str
;
unsigned
char
keep_vs
;
unsigned
char
keep_rd
;
};
extern
int
scoop_num
;
extern
struct
scoop_pcmcia_dev
*
scoop_devs
;
void
reset_scoop
(
struct
device
*
dev
);
unsigned
short
set_scoop_gpio
(
struct
device
*
dev
,
unsigned
short
bit
);
unsigned
short
reset_scoop_gpio
(
struct
device
*
dev
,
unsigned
short
bit
);
...
...
include/asm-arm/mach/time.h
浏览文件 @
1e231efe
...
...
@@ -47,9 +47,7 @@ struct sys_timer {
#ifdef CONFIG_NO_IDLE_HZ
#define DYN_TICK_SKIPPING (1 << 2)
#define DYN_TICK_ENABLED (1 << 1)
#define DYN_TICK_SUITABLE (1 << 0)
struct
dyn_tick_timer
{
unsigned
int
state
;
/* Current state */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录