<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應用 > s3c6410_map_io()的調(diào)用流程

          s3c6410_map_io()的調(diào)用流程

          作者: 時間:2016-11-10 來源:網(wǎng)絡(luò) 收藏
          s3c6410_map_io()調(diào)用流程:

          //arch/arm/mach-s3c6410/s3c6410.c
          void __init s3c6410_map_io(struct map_desc *mach_desc, int size)
          {
          /* register our io-tables */
          iotable_init(s3c6410_iodesc, ARRAY_SIZE(s3c6410_iodesc));
          iotable_init(mach_desc, size);

          /* set our idle function */
          s3c24xx_idle = s3c6410_idle;
          }

          static struct cpu_table cpu_ids[] __initdata = {
          .............................,
          {
          .idcode = 0x36410100,
          .idmask = 0xfffffff0,
          .map_io = s3c6410_map_io,
          .init_clocks = s3c6410_init_clocks,
          .init_uarts = s3c6410_init_uarts,
          .init = s3c6410_init,
          .name = name_s3c6410
          },
          .............................,
          };

          void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
          {
          unsigned long idcode = 0x0;

          .............................;

          cpu = s3c_lookup_cpu(idcode);

          if (cpu == NULL) {
          printk(KERN_ERR "Unknown CPU type 0x%08lxn", idcode);
          panic("Unknown S3C24XX CPU");
          }

          printk("CPU %s (id 0x%08lx)n", cpu->name, idcode);

          if (cpu->map_io == NULL || cpu->init == NULL) {
          printk(KERN_ERR "CPU %s support not enabledn", cpu->name);
          panic("Unsupported S3C24XX CPU");
          }

          (cpu->map_io)(mach_desc, size); /* s3c6410_map_io() */
          }

          //arch/arm/mach-smdk6410.c
          static void __init smdk6410_map_io(void)
          {
          s3c24xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
          ........................;
          }

          流程如下:
          先是板卡及的map_io():smdk6410_map_io()然后經(jīng)過s3c_lookup_cpu()后轉(zhuǎn)為cpu級的map_io()==s3c6410_map_io()
          start_kernel()==>setup_arch()==>
          1.mdesc=setup_machine()==>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()==>s3c6410_map_io()

          #if !defined(CONFIG_MACH_SMDK6430)
          MACHINE_START(SMDK6410, "SMDK6410")
          #else
          MACHINE_START(SMDK6430, "SMDK6430")
          #endif
          /* Maintainer: Samsung Electronics */
          .phys_io = S3C24XX_PA_UART,
          ...................,

          .init_irq = s3c_init_irq,
          .map_io = smdk6410_map_io,
          .fixup = smdk6410_fixup,
          .timer = &s3c_timer,
          .init_machine = smdk6410_machine_init,
          MACHINE_END


          關(guān)鍵詞: s3c6410map_io()調(diào)用流

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();