Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
abe48101
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
abe48101
编写于
10月 04, 2013
作者:
G
Geert Uytterhoeven
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
Signed-off-by:
N
Geert Uytterhoeven
<
geert@linux-m68k.org
>
上级
cf288bd5
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
124 addition
and
98 deletion
+124
-98
arch/m68k/amiga/config.c
arch/m68k/amiga/config.c
+9
-9
arch/m68k/apollo/config.c
arch/m68k/apollo/config.c
+8
-7
arch/m68k/atari/config.c
arch/m68k/atari/config.c
+5
-4
arch/m68k/bvme6000/config.c
arch/m68k/bvme6000/config.c
+2
-1
arch/m68k/hp300/config.c
arch/m68k/hp300/config.c
+5
-4
arch/m68k/include/uapi/asm/bootinfo-amiga.h
arch/m68k/include/uapi/asm/bootinfo-amiga.h
+7
-7
arch/m68k/include/uapi/asm/bootinfo-apollo.h
arch/m68k/include/uapi/asm/bootinfo-apollo.h
+1
-1
arch/m68k/include/uapi/asm/bootinfo-atari.h
arch/m68k/include/uapi/asm/bootinfo-atari.h
+2
-2
arch/m68k/include/uapi/asm/bootinfo-hp300.h
arch/m68k/include/uapi/asm/bootinfo-hp300.h
+3
-3
arch/m68k/include/uapi/asm/bootinfo-mac.h
arch/m68k/include/uapi/asm/bootinfo-mac.h
+1
-1
arch/m68k/include/uapi/asm/bootinfo-vme.h
arch/m68k/include/uapi/asm/bootinfo-vme.h
+10
-7
arch/m68k/include/uapi/asm/bootinfo.h
arch/m68k/include/uapi/asm/bootinfo.h
+16
-13
arch/m68k/kernel/setup_mm.c
arch/m68k/kernel/setup_mm.c
+20
-11
arch/m68k/mac/config.c
arch/m68k/mac/config.c
+17
-15
arch/m68k/mvme147/config.c
arch/m68k/mvme147/config.c
+3
-1
arch/m68k/mvme16x/config.c
arch/m68k/mvme16x/config.c
+15
-12
未找到文件。
arch/m68k/amiga/config.c
浏览文件 @
abe48101
...
...
@@ -145,37 +145,37 @@ static struct resource ram_resource[NUM_MEMINFO];
int
__init
amiga_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
int
unknown
=
0
;
const
unsigned
long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
switch
(
record
->
tag
)
{
switch
(
be16_to_cpu
(
record
->
tag
)
)
{
case
BI_AMIGA_MODEL
:
amiga_model
=
*
data
;
amiga_model
=
be32_to_cpup
(
data
)
;
break
;
case
BI_AMIGA_ECLOCK
:
amiga_eclock
=
*
data
;
amiga_eclock
=
be32_to_cpup
(
data
)
;
break
;
case
BI_AMIGA_CHIPSET
:
amiga_chipset
=
*
data
;
amiga_chipset
=
be32_to_cpup
(
data
)
;
break
;
case
BI_AMIGA_CHIP_SIZE
:
amiga_chip_size
=
*
(
const
int
*
)
data
;
amiga_chip_size
=
be32_to_cpup
(
data
)
;
break
;
case
BI_AMIGA_VBLANK
:
amiga_vblank
=
*
(
const
unsigned
char
*
)
data
;
amiga_vblank
=
*
(
const
__u8
*
)
data
;
break
;
case
BI_AMIGA_PSFREQ
:
amiga_psfreq
=
*
(
const
unsigned
char
*
)
data
;
amiga_psfreq
=
*
(
const
__u8
*
)
data
;
break
;
case
BI_AMIGA_AUTOCON
:
#ifdef CONFIG_ZORRO
if
(
zorro_num_autocon
<
ZORRO_NUM_AUTO
)
{
const
struct
ConfigDev
*
cd
=
(
struct
ConfigDev
*
)
data
;
const
struct
ConfigDev
*
cd
=
data
;
struct
zorro_dev_init
*
dev
=
&
zorro_autocon_init
[
zorro_num_autocon
++
];
dev
->
rom
=
cd
->
cd_Rom
;
dev
->
slotaddr
=
be16_to_cpu
(
cd
->
cd_SlotAddr
);
...
...
arch/m68k/apollo/config.c
浏览文件 @
abe48101
...
...
@@ -11,6 +11,7 @@
#include <asm/setup.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-apollo.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/apollohw.h>
#include <asm/irq.h>
...
...
@@ -48,15 +49,15 @@ static const char *apollo_models[] = {
int
__init
apollo_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
int
unknown
=
0
;
const
unsigned
long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
switch
(
record
->
tag
)
{
case
BI_APOLLO_MODEL
:
apollo_model
=*
data
;
break
;
switch
(
be16_to_cpu
(
record
->
tag
)
)
{
case
BI_APOLLO_MODEL
:
apollo_model
=
be32_to_cpup
(
data
)
;
break
;
default:
unknown
=
1
;
default:
unknown
=
1
;
}
return
unknown
;
...
...
arch/m68k/atari/config.c
浏览文件 @
abe48101
...
...
@@ -38,6 +38,7 @@
#include <asm/bootinfo.h>
#include <asm/bootinfo-atari.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
#include <asm/atarihw.h>
#include <asm/atariints.h>
...
...
@@ -130,14 +131,14 @@ static int __init scc_test(volatile char *ctla)
int
__init
atari_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
int
unknown
=
0
;
const
u_long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
switch
(
record
->
tag
)
{
switch
(
be16_to_cpu
(
record
->
tag
)
)
{
case
BI_ATARI_MCH_COOKIE
:
atari_mch_cookie
=
*
data
;
atari_mch_cookie
=
be32_to_cpup
(
data
)
;
break
;
case
BI_ATARI_MCH_TYPE
:
atari_mch_type
=
*
data
;
atari_mch_type
=
be32_to_cpup
(
data
)
;
break
;
default:
unknown
=
1
;
...
...
arch/m68k/bvme6000/config.c
浏览文件 @
abe48101
...
...
@@ -29,6 +29,7 @@
#include <asm/bootinfo.h>
#include <asm/bootinfo-vme.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
#include <asm/irq.h>
...
...
@@ -53,7 +54,7 @@ static irq_handler_t tick_handler;
int
__init
bvme6000_parse_bootinfo
(
const
struct
bi_record
*
bi
)
{
if
(
b
i
->
tag
==
BI_VME_TYPE
)
if
(
b
e16_to_cpu
(
bi
->
tag
)
==
BI_VME_TYPE
)
return
0
;
else
return
1
;
...
...
arch/m68k/hp300/config.c
浏览文件 @
abe48101
...
...
@@ -15,6 +15,7 @@
#include <asm/bootinfo.h>
#include <asm/bootinfo-hp300.h>
#include <asm/byteorder.h>
#include <asm/machdep.h>
#include <asm/blinken.h>
#include <asm/io.h>
/* readb() and writeb() */
...
...
@@ -71,15 +72,15 @@ extern int hp300_setup_serial_console(void) __init;
int
__init
hp300_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
int
unknown
=
0
;
const
unsigned
long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
switch
(
record
->
tag
)
{
switch
(
be16_to_cpu
(
record
->
tag
)
)
{
case
BI_HP300_MODEL
:
hp300_model
=
*
data
;
hp300_model
=
be32_to_cpup
(
data
)
;
break
;
case
BI_HP300_UART_SCODE
:
hp300_uart_scode
=
*
data
;
hp300_uart_scode
=
be32_to_cpup
(
data
)
;
break
;
case
BI_HP300_UART_ADDR
:
...
...
arch/m68k/include/uapi/asm/bootinfo-amiga.h
浏览文件 @
abe48101
...
...
@@ -10,15 +10,15 @@
* Amiga-specific tags
*/
#define BI_AMIGA_MODEL 0x8000
/* model (
u_long
) */
#define BI_AMIGA_MODEL 0x8000
/* model (
__be32
) */
#define BI_AMIGA_AUTOCON 0x8001
/* AutoConfig device */
/* (AmigaOS struct ConfigDev) */
#define BI_AMIGA_CHIP_SIZE 0x8002
/* size of Chip RAM (
u_long
) */
#define BI_AMIGA_VBLANK 0x8003
/* VBLANK frequency (
u_char
) */
#define BI_AMIGA_PSFREQ 0x8004
/* power supply frequency (
u_char
) */
#define BI_AMIGA_ECLOCK 0x8005
/* EClock frequency (
u_long
) */
#define BI_AMIGA_CHIPSET 0x8006
/* native chipset present (
u_long
) */
#define BI_AMIGA_SERPER 0x8007
/* serial port period (
u_short
) */
#define BI_AMIGA_CHIP_SIZE 0x8002
/* size of Chip RAM (
__be32
) */
#define BI_AMIGA_VBLANK 0x8003
/* VBLANK frequency (
__u8
) */
#define BI_AMIGA_PSFREQ 0x8004
/* power supply frequency (
__u8
) */
#define BI_AMIGA_ECLOCK 0x8005
/* EClock frequency (
__be32
) */
#define BI_AMIGA_CHIPSET 0x8006
/* native chipset present (
__be32
) */
#define BI_AMIGA_SERPER 0x8007
/* serial port period (
__be16
) */
/*
...
...
arch/m68k/include/uapi/asm/bootinfo-apollo.h
浏览文件 @
abe48101
...
...
@@ -10,7 +10,7 @@
* Apollo-specific tags
*/
#define BI_APOLLO_MODEL 0x8000
/* model (
u_long
) */
#define BI_APOLLO_MODEL 0x8000
/* model (
__be32
) */
/*
...
...
arch/m68k/include/uapi/asm/bootinfo-atari.h
浏览文件 @
abe48101
...
...
@@ -10,8 +10,8 @@
* Atari-specific tags
*/
#define BI_ATARI_MCH_COOKIE 0x8000
/* _MCH cookie from TOS (
u_long
) */
#define BI_ATARI_MCH_TYPE 0x8001
/* special machine type (
u_long
) */
#define BI_ATARI_MCH_COOKIE 0x8000
/* _MCH cookie from TOS (
__be32
) */
#define BI_ATARI_MCH_TYPE 0x8001
/* special machine type (
__be32
) */
/*
...
...
arch/m68k/include/uapi/asm/bootinfo-hp300.h
浏览文件 @
abe48101
...
...
@@ -10,9 +10,9 @@
* HP9000/300-specific tags
*/
#define BI_HP300_MODEL 0x8000
/* model (
u_long
) */
#define BI_HP300_UART_SCODE 0x8001
/* UART select code (
u_long
) */
#define BI_HP300_UART_ADDR 0x8002
/* phys. addr of UART (
u_long
) */
#define BI_HP300_MODEL 0x8000
/* model (
__be32
) */
#define BI_HP300_UART_SCODE 0x8001
/* UART select code (
__be32
) */
#define BI_HP300_UART_ADDR 0x8002
/* phys. addr of UART (
__be32
) */
/*
...
...
arch/m68k/include/uapi/asm/bootinfo-mac.h
浏览文件 @
abe48101
...
...
@@ -7,7 +7,7 @@
/*
* Macintosh-specific tags (all
u_long
)
* Macintosh-specific tags (all
__be32
)
*/
#define BI_MAC_MODEL 0x8000
/* Mac Gestalt ID (model type) */
...
...
arch/m68k/include/uapi/asm/bootinfo-vme.h
浏览文件 @
abe48101
...
...
@@ -6,11 +6,14 @@
#define _UAPI_ASM_M68K_BOOTINFO_VME_H
#include <linux/types.h>
/*
* VME-specific tags
*/
#define BI_VME_TYPE 0x8000
/* VME sub-architecture (
u_long
) */
#define BI_VME_TYPE 0x8000
/* VME sub-architecture (
__be32
) */
#define BI_VME_BRDINFO 0x8001
/* VME board information (struct) */
...
...
@@ -43,13 +46,13 @@
typedef
struct
{
char
bdid
[
4
];
u_char
rev
,
mth
,
day
,
yr
;
u_short
size
,
reserved
;
u_short
brdno
;
__u8
rev
,
mth
,
day
,
yr
;
__be16
size
,
reserved
;
__be16
brdno
;
char
brdsuffix
[
2
];
u_long
options
;
u_short
clun
,
dlun
,
ctype
,
dnum
;
u_long
option2
;
__be32
options
;
__be16
clun
,
dlun
,
ctype
,
dnum
;
__be32
option2
;
}
t_bdid
,
*
p_bdid
;
#endif
/* __ASSEMBLY__ */
...
...
arch/m68k/include/uapi/asm/bootinfo.h
浏览文件 @
abe48101
...
...
@@ -12,6 +12,9 @@
#define _UAPI_ASM_M68K_BOOTINFO_H
#include <linux/types.h>
#ifndef __ASSEMBLY__
/*
...
...
@@ -28,15 +31,15 @@
*/
struct
bi_record
{
unsigned
short
tag
;
/* tag ID */
unsigned
short
size
;
/* size of record (in bytes) */
unsigned
long
data
[
0
];
/* data */
__be16
tag
;
/* tag ID */
__be16
size
;
/* size of record (in bytes) */
__be32
data
[
0
];
/* data */
};
struct
mem_info
{
unsigned
long
addr
;
/* physical address of memory chunk */
unsigned
long
size
;
/* length of memory chunk (in bytes) */
__be32
addr
;
/* physical address of memory chunk */
__be32
size
;
/* length of memory chunk (in bytes) */
};
#endif
/* __ASSEMBLY__ */
...
...
@@ -50,10 +53,10 @@ struct mem_info {
*/
#define BI_LAST 0x0000
/* last record (sentinel) */
#define BI_MACHTYPE 0x0001
/* machine type (
u_long
) */
#define BI_CPUTYPE 0x0002
/* cpu type (
u_long
) */
#define BI_FPUTYPE 0x0003
/* fpu type (
u_long
) */
#define BI_MMUTYPE 0x0004
/* mmu type (
u_long
) */
#define BI_MACHTYPE 0x0001
/* machine type (
__be32
) */
#define BI_CPUTYPE 0x0002
/* cpu type (
__be32
) */
#define BI_FPUTYPE 0x0003
/* fpu type (
__be32
) */
#define BI_MMUTYPE 0x0004
/* mmu type (
__be32
) */
#define BI_MEMCHUNK 0x0005
/* memory chunk address and size */
/* (struct mem_info) */
#define BI_RAMDISK 0x0006
/* ramdisk address and size */
...
...
@@ -157,11 +160,11 @@ struct mem_info {
#ifndef __ASSEMBLY__
struct
bootversion
{
unsigned
short
branch
;
unsigned
long
magic
;
__be16
branch
;
__be32
magic
;
struct
{
unsigned
long
machtype
;
unsigned
long
version
;
__be32
machtype
;
__be32
version
;
}
machversions
[
0
];
}
__packed
;
...
...
arch/m68k/kernel/setup_mm.c
浏览文件 @
abe48101
...
...
@@ -26,6 +26,7 @@
#include <linux/initrd.h>
#include <asm/bootinfo.h>
#include <asm/byteorder.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/fpu.h>
...
...
@@ -143,11 +144,14 @@ extern void paging_init(void);
static
void
__init
m68k_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
while
(
record
->
tag
!=
BI_LAST
)
{
uint16_t
tag
;
while
((
tag
=
be16_to_cpu
(
record
->
tag
))
!=
BI_LAST
)
{
int
unknown
=
0
;
const
unsigned
long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
uint16_t
size
=
be16_to_cpu
(
record
->
size
);
switch
(
record
->
tag
)
{
switch
(
tag
)
{
case
BI_MACHTYPE
:
case
BI_CPUTYPE
:
case
BI_FPUTYPE
:
...
...
@@ -157,8 +161,11 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
case
BI_MEMCHUNK
:
if
(
m68k_num_memory
<
NUM_MEMINFO
)
{
m68k_memory
[
m68k_num_memory
].
addr
=
data
[
0
];
m68k_memory
[
m68k_num_memory
].
size
=
data
[
1
];
const
struct
mem_info
*
m
=
data
;
m68k_memory
[
m68k_num_memory
].
addr
=
be32_to_cpu
(
m
->
addr
);
m68k_memory
[
m68k_num_memory
].
size
=
be32_to_cpu
(
m
->
size
);
m68k_num_memory
++
;
}
else
pr_warn
(
"%s: too many memory chunks
\n
"
,
...
...
@@ -166,12 +173,15 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
break
;
case
BI_RAMDISK
:
m68k_ramdisk
.
addr
=
data
[
0
];
m68k_ramdisk
.
size
=
data
[
1
];
{
const
struct
mem_info
*
m
=
data
;
m68k_ramdisk
.
addr
=
be32_to_cpu
(
m
->
addr
);
m68k_ramdisk
.
size
=
be32_to_cpu
(
m
->
size
);
}
break
;
case
BI_COMMAND_LINE
:
strlcpy
(
m68k_command_line
,
(
const
char
*
)
data
,
strlcpy
(
m68k_command_line
,
data
,
sizeof
(
m68k_command_line
));
break
;
...
...
@@ -199,9 +209,8 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
}
if
(
unknown
)
pr_warn
(
"%s: unknown tag 0x%04x ignored
\n
"
,
__func__
,
record
->
tag
);
record
=
(
struct
bi_record
*
)((
unsigned
long
)
record
+
record
->
size
);
tag
);
record
=
(
struct
bi_record
*
)((
unsigned
long
)
record
+
size
);
}
m68k_realnum_memory
=
m68k_num_memory
;
...
...
arch/m68k/mac/config.c
浏览文件 @
abe48101
...
...
@@ -29,6 +29,7 @@
#include <asm/setup.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-mac.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/irq.h>
...
...
@@ -107,45 +108,46 @@ static void __init mac_sched_init(irq_handler_t vector)
int
__init
mac_parse_bootinfo
(
const
struct
bi_record
*
record
)
{
int
unknown
=
0
;
const
u_long
*
data
=
record
->
data
;
const
void
*
data
=
record
->
data
;
switch
(
record
->
tag
)
{
switch
(
be16_to_cpu
(
record
->
tag
)
)
{
case
BI_MAC_MODEL
:
mac_bi_data
.
id
=
*
data
;
mac_bi_data
.
id
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_VADDR
:
mac_bi_data
.
videoaddr
=
*
data
;
mac_bi_data
.
videoaddr
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_VDEPTH
:
mac_bi_data
.
videodepth
=
*
data
;
mac_bi_data
.
videodepth
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_VROW
:
mac_bi_data
.
videorow
=
*
data
;
mac_bi_data
.
videorow
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_VDIM
:
mac_bi_data
.
dimensions
=
*
data
;
mac_bi_data
.
dimensions
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_VLOGICAL
:
mac_bi_data
.
videological
=
VIDEOMEMBASE
+
(
*
data
&
~
VIDEOMEMMASK
);
mac_orig_videoaddr
=
*
data
;
mac_orig_videoaddr
=
be32_to_cpup
(
data
);
mac_bi_data
.
videological
=
VIDEOMEMBASE
+
(
mac_orig_videoaddr
&
~
VIDEOMEMMASK
);
break
;
case
BI_MAC_SCCBASE
:
mac_bi_data
.
sccbase
=
*
data
;
mac_bi_data
.
sccbase
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_BTIME
:
mac_bi_data
.
boottime
=
*
data
;
mac_bi_data
.
boottime
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_GMTBIAS
:
mac_bi_data
.
gmtbias
=
*
data
;
mac_bi_data
.
gmtbias
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_MEMSIZE
:
mac_bi_data
.
memsize
=
*
data
;
mac_bi_data
.
memsize
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_CPUID
:
mac_bi_data
.
cpuid
=
*
data
;
mac_bi_data
.
cpuid
=
be32_to_cpup
(
data
)
;
break
;
case
BI_MAC_ROMBASE
:
mac_bi_data
.
rombase
=
*
data
;
mac_bi_data
.
rombase
=
be32_to_cpup
(
data
)
;
break
;
default:
unknown
=
1
;
...
...
arch/m68k/mvme147/config.c
浏览文件 @
abe48101
...
...
@@ -27,6 +27,7 @@
#include <asm/bootinfo.h>
#include <asm/bootinfo-vme.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
#include <asm/irq.h>
...
...
@@ -54,7 +55,8 @@ irq_handler_t tick_handler;
int
__init
mvme147_parse_bootinfo
(
const
struct
bi_record
*
bi
)
{
if
(
bi
->
tag
==
BI_VME_TYPE
||
bi
->
tag
==
BI_VME_BRDINFO
)
uint16_t
tag
=
be16_to_cpu
(
bi
->
tag
);
if
(
tag
==
BI_VME_TYPE
||
tag
==
BI_VME_BRDINFO
)
return
0
;
else
return
1
;
...
...
arch/m68k/mvme16x/config.c
浏览文件 @
abe48101
...
...
@@ -30,6 +30,7 @@
#include <asm/bootinfo.h>
#include <asm/bootinfo-vme.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
#include <asm/irq.h>
...
...
@@ -63,7 +64,8 @@ EXPORT_SYMBOL(mvme16x_config);
int
__init
mvme16x_parse_bootinfo
(
const
struct
bi_record
*
bi
)
{
if
(
bi
->
tag
==
BI_VME_TYPE
||
bi
->
tag
==
BI_VME_BRDINFO
)
uint16_t
tag
=
be16_to_cpu
(
bi
->
tag
);
if
(
tag
==
BI_VME_TYPE
||
tag
==
BI_VME_BRDINFO
)
return
0
;
else
return
1
;
...
...
@@ -88,15 +90,15 @@ static void mvme16x_get_model(char *model)
suf
[
3
]
=
'\0'
;
suf
[
0
]
=
suf
[
1
]
?
'-'
:
'\0'
;
sprintf
(
model
,
"Motorola MVME%x%s"
,
p
->
brdno
,
suf
);
sprintf
(
model
,
"Motorola MVME%x%s"
,
be16_to_cpu
(
p
->
brdno
)
,
suf
);
}
static
void
mvme16x_get_hardware_list
(
struct
seq_file
*
m
)
{
p_bdid
p
=
&
mvme_bdid
;
uint16_t
brdno
=
be16_to_cpu
(
mvme_bdid
.
brdno
)
;
if
(
p
->
brdno
==
0x0162
||
p
->
brdno
==
0x0172
)
if
(
brdno
==
0x0162
||
brdno
==
0x0172
)
{
unsigned
char
rev
=
*
(
unsigned
char
*
)
MVME162_VERSION_REG
;
...
...
@@ -286,6 +288,7 @@ void __init config_mvme16x(void)
{
p_bdid
p
=
&
mvme_bdid
;
char
id
[
40
];
uint16_t
brdno
=
be16_to_cpu
(
p
->
brdno
);
mach_max_dma_address
=
0xffffffff
;
mach_sched_init
=
mvme16x_sched_init
;
...
...
@@ -307,18 +310,18 @@ void __init config_mvme16x(void)
}
/* Board type is only set by newer versions of vmelilo/tftplilo */
if
(
vme_brdtype
==
0
)
vme_brdtype
=
p
->
brdno
;
vme_brdtype
=
brdno
;
mvme16x_get_model
(
id
);
printk
(
"
\n
BRD_ID: %s BUG %x.%x %02x/%02x/%02x
\n
"
,
id
,
p
->
rev
>>
4
,
p
->
rev
&
0xf
,
p
->
yr
,
p
->
mth
,
p
->
day
);
if
(
p
->
brdno
==
0x0162
||
p
->
brdno
==
0x172
)
if
(
brdno
==
0x0162
||
brdno
==
0x172
)
{
unsigned
char
rev
=
*
(
unsigned
char
*
)
MVME162_VERSION_REG
;
mvme16x_config
=
rev
|
MVME16x_CONFIG_GOT_SCCA
;
printk
(
"MVME%x Hardware status:
\n
"
,
p
->
brdno
);
printk
(
"MVME%x Hardware status:
\n
"
,
brdno
);
printk
(
" CPU Type 68%s040
\n
"
,
rev
&
MVME16x_CONFIG_GOT_FPU
?
""
:
"LC"
);
printk
(
" CPU clock %dMHz
\n
"
,
...
...
@@ -348,12 +351,12 @@ void __init config_mvme16x(void)
static
irqreturn_t
mvme16x_abort_int
(
int
irq
,
void
*
dev_id
)
{
p_bdid
p
=
&
mvme_bdid
;
unsigned
long
*
new
=
(
unsigned
long
*
)
vectors
;
unsigned
long
*
old
=
(
unsigned
long
*
)
0xffe00000
;
volatile
unsigned
char
uc
,
*
ucp
;
uint16_t
brdno
=
be16_to_cpu
(
mvme_bdid
.
brdno
);
if
(
p
->
brdno
==
0x0162
||
p
->
brdno
==
0x172
)
if
(
brdno
==
0x0162
||
brdno
==
0x172
)
{
ucp
=
(
volatile
unsigned
char
*
)
0xfff42043
;
uc
=
*
ucp
|
8
;
...
...
@@ -367,7 +370,7 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
*
(
new
+
9
)
=
*
(
old
+
9
);
/* Trace */
*
(
new
+
47
)
=
*
(
old
+
47
);
/* Trap #15 */
if
(
p
->
brdno
==
0x0162
||
p
->
brdno
==
0x172
)
if
(
brdno
==
0x0162
||
brdno
==
0x172
)
*
(
new
+
0x5e
)
=
*
(
old
+
0x5e
);
/* ABORT switch */
else
*
(
new
+
0x6e
)
=
*
(
old
+
0x6e
);
/* ABORT switch */
...
...
@@ -382,7 +385,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
void
mvme16x_sched_init
(
irq_handler_t
timer_routine
)
{
p_bdid
p
=
&
mvme_bdid
;
uint16_t
brdno
=
be16_to_cpu
(
mvme_bdid
.
brdno
)
;
int
irq
;
tick_handler
=
timer_routine
;
...
...
@@ -395,7 +398,7 @@ void mvme16x_sched_init (irq_handler_t timer_routine)
"timer"
,
mvme16x_timer_int
))
panic
(
"Couldn't register timer int"
);
if
(
p
->
brdno
==
0x0162
||
p
->
brdno
==
0x172
)
if
(
brdno
==
0x0162
||
brdno
==
0x172
)
irq
=
MVME162_IRQ_ABORT
;
else
irq
=
MVME167_IRQ_ABORT
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录