Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
895532a1
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
895532a1
编写于
10月 12, 2007
作者:
P
Paul Mackerras
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-2.6.24' of
git://git.secretlab.ca/git/linux-2.6-mpc52xx
into for-2.6.24
上级
ad656887
e1eea9fa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
68 addition
and
99 deletion
+68
-99
MAINTAINERS
MAINTAINERS
+2
-0
arch/powerpc/platforms/52xx/efika.c
arch/powerpc/platforms/52xx/efika.c
+1
-18
arch/powerpc/platforms/52xx/lite5200.c
arch/powerpc/platforms/52xx/lite5200.c
+50
-45
arch/powerpc/platforms/52xx/mpc52xx_common.c
arch/powerpc/platforms/52xx/mpc52xx_common.c
+13
-25
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
+1
-10
include/asm-powerpc/mpc52xx.h
include/asm-powerpc/mpc52xx.h
+1
-1
未找到文件。
MAINTAINERS
浏览文件 @
895532a1
...
...
@@ -2288,6 +2288,8 @@ S: Maintained
LINUX FOR POWERPC EMBEDDED MPC52XX
P: Sylvain Munaut
M: tnt@246tNt.com
P: Grant Likely
M: grant.likely@secretlab.ca
W: http://www.246tNt.com/mpc52xx/
W: http://www.penguinppc.org/
L: linuxppc-dev@ozlabs.org
...
...
arch/powerpc/platforms/52xx/efika.c
浏览文件 @
895532a1
...
...
@@ -9,33 +9,16 @@
* kind, whether express or implied.
*/
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/utsrelease.h>
#include <linux/seq_file.h>
#include <linux/string.h>
#include <linux/root_dev.h>
#include <linux/initrd.h>
#include <linux/timer.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/sections.h>
#include <asm/pci-bridge.h>
#include <asm/pgtable.h>
#include <linux/of.h>
#include <asm/prom.h>
#include <asm/time.h>
#include <asm/machdep.h>
#include <asm/rtas.h>
#include <asm/of_device.h>
#include <asm/of_platform.h>
#include <asm/mpc52xx.h>
#define EFIKA_PLATFORM_NAME "Efika"
...
...
arch/powerpc/platforms/52xx/lite5200.c
浏览文件 @
895532a1
...
...
@@ -15,32 +15,13 @@
#undef DEBUG
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/major.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/initrd.h>
#include <asm/system.h>
#include <asm/atomic.h>
#include <linux/of.h>
#include <asm/time.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/ipic.h>
#include <asm/irq.h>
#include <asm/prom.h>
#include <asm/udbg.h>
#include <sysdev/fsl_soc.h>
#include <asm/of_platform.h>
#include <asm/mpc52xx.h>
/* ************************************************************************
...
...
@@ -49,19 +30,56 @@
*
*/
/*
* Fix clock configuration.
*
* Firmware is supposed to be responsible for this. If you are creating a
* new board port, do *NOT* duplicate this code. Fix your boot firmware
* to set it correctly in the first place
*/
static
void
__init
lite5200_setup_cpu
(
void
)
lite5200_fix_clock_config
(
void
)
{
struct
mpc52xx_cdm
__iomem
*
cdm
;
/* Map zones */
cdm
=
mpc52xx_find_and_map
(
"mpc5200-cdm"
);
if
(
!
cdm
)
{
printk
(
KERN_ERR
"%s() failed; expect abnormal behaviour
\n
"
,
__FUNCTION__
);
return
;
}
/* Use internal 48 Mhz */
out_8
(
&
cdm
->
ext_48mhz_en
,
0x00
);
out_8
(
&
cdm
->
fd_enable
,
0x01
);
if
(
in_be32
(
&
cdm
->
rstcfg
)
&
0x40
)
/* Assumes 33Mhz clock */
out_be16
(
&
cdm
->
fd_counters
,
0x0001
);
else
out_be16
(
&
cdm
->
fd_counters
,
0x5555
);
/* Unmap the regs */
iounmap
(
cdm
);
}
/*
* Fix setting of port_config register.
*
* Firmware is supposed to be responsible for this. If you are creating a
* new board port, do *NOT* duplicate this code. Fix your boot firmware
* to set it correctly in the first place
*/
static
void
__init
lite5200_fix_port_config
(
void
)
{
struct
mpc52xx_gpio
__iomem
*
gpio
;
u32
port_config
;
/* Map zones */
gpio
=
mpc52xx_find_and_map
(
"mpc5200-gpio"
);
if
(
!
gpio
)
{
printk
(
KERN_ERR
__FILE__
": "
"Error while mapping GPIO register for port config. "
"Expect some abnormal behavior
\n
"
);
goto
error
;
printk
(
KERN_ERR
"%s() failed. expect abnormal behavior
\n
"
,
__FUNCTION__
);
return
;
}
/* Set port config */
...
...
@@ -80,7 +98,6 @@ lite5200_setup_cpu(void)
out_be32
(
&
gpio
->
port_config
,
port_config
);
/* Unmap zone */
error:
iounmap
(
gpio
);
}
...
...
@@ -119,9 +136,12 @@ static void __init lite5200_setup_arch(void)
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
"lite5200_setup_arch()"
,
0
);
/* CPU & Port mux setup */
mpc52xx_setup_cpu
();
/* Generic */
lite5200_setup_cpu
();
/* Platorm specific */
/* Fix things that firmware should have done. */
lite5200_fix_clock_config
();
lite5200_fix_port_config
();
/* Some mpc5200 & mpc5200b related configuration */
mpc5200_setup_xlb_arbiter
();
#ifdef CONFIG_PM
mpc52xx_suspend
.
board_suspend_prepare
=
lite5200_suspend_prepare
;
...
...
@@ -150,20 +170,6 @@ static void __init lite5200_setup_arch(void)
}
static
void
lite5200_show_cpuinfo
(
struct
seq_file
*
m
)
{
struct
device_node
*
np
=
of_find_all_nodes
(
NULL
);
const
char
*
model
=
NULL
;
if
(
np
)
model
=
of_get_property
(
np
,
"model"
,
NULL
);
seq_printf
(
m
,
"vendor
\t\t
: Freescale Semiconductor
\n
"
);
seq_printf
(
m
,
"machine
\t\t
: %s
\n
"
,
model
?
model
:
"unknown"
);
of_node_put
(
np
);
}
/*
* Called very early, MMU is off, device-tree isn't unflattened
*/
...
...
@@ -187,6 +193,5 @@ define_machine(lite5200) {
.
init
=
mpc52xx_declare_of_platform_devices
,
.
init_IRQ
=
mpc52xx_init_irq
,
.
get_irq
=
mpc52xx_get_irq
,
.
show_cpuinfo
=
lite5200_show_cpuinfo
,
.
calibrate_decr
=
generic_calibrate_decr
,
};
arch/powerpc/platforms/52xx/mpc52xx_common.c
浏览文件 @
895532a1
...
...
@@ -13,10 +13,9 @@
#undef DEBUG
#include <linux/kernel.h>
#include <linux/of_platform.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_platform.h>
#include <asm/mpc52xx.h>
...
...
@@ -76,44 +75,33 @@ mpc52xx_find_ipb_freq(struct device_node *node)
EXPORT_SYMBOL
(
mpc52xx_find_ipb_freq
);
/*
* Configure the XLB arbiter settings to match what Linux expects.
*/
void
__init
mpc52
xx_setup_cpu
(
void
)
mpc52
00_setup_xlb_arbiter
(
void
)
{
struct
mpc52xx_cdm
__iomem
*
cdm
;
struct
mpc52xx_xlb
__iomem
*
xlb
;
/* Map zones */
cdm
=
mpc52xx_find_and_map
(
"mpc5200-cdm"
);
xlb
=
mpc52xx_find_and_map
(
"mpc5200-xlb"
);
if
(
!
cdm
||
!
xlb
)
{
if
(
!
xlb
)
{
printk
(
KERN_ERR
__FILE__
": "
"Error
while mapping CDM/XLB during mpc52xx_setup_cpu.
"
"Error
mapping XLB in mpc52xx_setup_cpu().
"
"Expect some abnormal behavior
\n
"
);
goto
unmap_regs
;
return
;
}
/* Use internal 48 Mhz */
out_8
(
&
cdm
->
ext_48mhz_en
,
0x00
);
out_8
(
&
cdm
->
fd_enable
,
0x01
);
if
(
in_be32
(
&
cdm
->
rstcfg
)
&
0x40
)
/* Assumes 33Mhz clock */
out_be16
(
&
cdm
->
fd_counters
,
0x0001
);
else
out_be16
(
&
cdm
->
fd_counters
,
0x5555
);
/* Configure the XLB Arbiter priorities */
out_be32
(
&
xlb
->
master_pri_enable
,
0xff
);
out_be32
(
&
xlb
->
master_priority
,
0x11111111
);
/* Disable XLB pipelining */
/* (cfr errate 292. We could do this only just before ATA PIO
transaction and re-enable it afterwards ...) */
/* Disable XLB pipelining
* (cfr errate 292. We could do this only just before ATA PIO
* transaction and re-enable it afterwards ...)
*/
out_be32
(
&
xlb
->
config
,
in_be32
(
&
xlb
->
config
)
|
MPC52xx_XLB_CFG_PLDIS
);
/* Unmap zones */
unmap_regs:
if
(
cdm
)
iounmap
(
cdm
);
if
(
xlb
)
iounmap
(
xlb
);
iounmap
(
xlb
);
}
void
__init
...
...
arch/powerpc/platforms/52xx/mpc52xx_pic.c
浏览文件 @
895532a1
...
...
@@ -18,18 +18,9 @@
#undef DEBUG
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/hardirq.h>
#include <linux/of.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/prom.h>
#include <asm/mpc52xx.h>
#include "mpc52xx_pic.h"
...
...
include/asm-powerpc/mpc52xx.h
浏览文件 @
895532a1
...
...
@@ -243,7 +243,7 @@ struct mpc52xx_cdm {
extern
void
__iomem
*
mpc52xx_find_and_map
(
const
char
*
);
extern
unsigned
int
mpc52xx_find_ipb_freq
(
struct
device_node
*
node
);
extern
void
mpc52
xx_setup_cpu
(
void
);
extern
void
mpc52
00_setup_xlb_arbiter
(
void
);
extern
void
mpc52xx_declare_of_platform_devices
(
void
);
extern
void
mpc52xx_init_irq
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录