您的位置 首页 电源

s3c6410_init()被调用的流程

1.s3c6410_init()被调用的流程:cpu赋值流程:1).定义cpu,__mach_desc_MACH_TYPE_SMDK6410staticstructcpu_table*cpu;#def

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()

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/dianyuan/275518.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部