zoukankan      html  css  js  c++  java
  • uboot的devices_init函数分析

    一、函数说明

    函数功能: 完成设备的初始化

    函数位置: common/devices.c

    二、程序分析

     1 int devices_init (void)
     2 {
     3 #ifndef CONFIG_ARM     /* already relocated for current ARM implementation */
     4     ulong relocation_offset = gd->reloc_off;
     5     int i;
     6 
     7     /* relocate device name pointers */
     8     for (i = 0; i < (sizeof (stdio_names) / sizeof (char *)); ++i) {
     9         stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
    10                         relocation_offset);
    11     }//重定位设备输入输出设备名字指针
    12 #endif
    13 
    14     /* Initialize the list */
    15     devlist = ListCreate (sizeof (device_t));//初始化列表
    16 
    17     if (devlist == NULL) {
    18         eputs ("Cannot initialize the list of devices!
    ");
    19         return -1;
    20     }
    21 #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
    22     i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
    23 #endif
    24 #ifdef CONFIG_LCD
    25     drv_lcd_init ();
    26 #endif
    27 #if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
    28     drv_video_init ();
    29 #endif
    30 #ifdef CONFIG_KEYBOARD
    31     drv_keyboard_init ();
    32 #endif
    33 #ifdef CONFIG_LOGBUFFER
    34     drv_logbuff_init ();
    35 #endif
    36     drv_system_init ();
    37 #ifdef CONFIG_SERIAL_MULTI
    38     serial_devices_init ();
    39 #endif
    40 #ifdef CONFIG_USB_TTY
    41     drv_usbtty_init ();
    42 #endif
    43 #ifdef CONFIG_NETCONSOLE
    44     drv_nc_init ();
    45 #endif
    46 
    47     return (0);
    48 }
  • 相关阅读:
    Docker+Jenkins更换国内插件源
    招聘java工程师
    Apache seaTunnel 数据集成平台
    DBeaver连接MySQL问题的解决
    iphone的mov文件复制到电脑的方法
    IDEA中RestfulToolkit插件的安装及使用
    lwm2m 的notify 的机制
    ALI云接入学习
    CAT1 UIS8910模组对接阿里云平台
    任务的堆栈究竟有何魔力
  • 原文地址:https://www.cnblogs.com/amanlikethis/p/3509040.html
Copyright © 2011-2022 走看看