微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > s3c6410_init()被调用的流程

s3c6410_init()被调用的流程

时间:11-10 来源:互联网 点击:
1.s3c6410_init()被调用的流程:
cpu赋值流程:
1).定义cpu, __mach_desc_MACH_TYPE_SMDK6410
static struct cpu_table *cpu;

#define MACHINE_START(_type,_name) \
static const struct machine_desc __mach_desc_##_type \
__used \
__attribute__((__section__(".arch.info.init"))) = { \
.nr = MACH_TYPE_##_type, \
.name = _name,

#define MACHINE_END \
};

static const struct machine_desc __mach_desc_SMDK6410
.nr = MACH_TYPE_SMDK6410
.name = "SMDK6410"

2).
machine_arch_type==MACH_TYPE_SMDK6410==1626

MACHINE_START(SMDK6410, "SMDK6410")
......................,
.init_irq = s3c_init_irq,
.map_io = smdk6410_map_io,
.fixup = smdk6410_fixup,
.timer = &s3c_timer,
.init_machine = smdk6410_machine_init,
MACHINE_END

start_kernel()==>setup_arch()===>
1.mdesc=setup_machine(machine_arch_type)==>lookup_machine_types(MACH_TYPE_SMDK6410) == __mach_desc_SMDK6410
2.paging_init(mdesc) ==>devicemaps_init(mdesc) ==> mdesc->map_io()==>__mach_desc_SMDK6410->map_io()
==>smdk6410_map_io() ==> s3c24xx_init_io() ==> cpu = s3c_lookup_cpu(idcode);

调用流程:
arch_initcall(s3c_arch_init)==>s3c_arch_init()==>(cpu->init)()==>s3c6410_init()

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top