This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: How to set I2C at High Speed in uboot in AM3359

Part Number: AM3359

Hi All,

Currently, we are using our custom board based on Ti-AM3359 sitara ICEv2, However we just want to know : How to set the I2C speed at max supported speed which is 400Kbits.

We are willing to do this at Uboot for this we are using SDKv7 which has uboot 13.2.

Also here, we are checking the speed in chipscope as our slave is a FPGA I2C device.

We also tried changing the MACRO at include/configs/ti_armv7_common.h   --- CONFIG_SYS_I2C_SPEED       400000 but seems that it is not getting reflected.

Any comments will be appreciated..

Awaiting Reply,

Thanks & Regards,

Chinmay

  • Hi Chinmay.
    Driver Model (DM) is used for i2c ports in SPL/u-boot in newer AM335x SDK.
    I'm using the SDK 6.3 u-boot device tree configuration for i2c0 & i2c1 nodes for AM335 EVM as an example:

    /arch/arm/dts/am335x-evm.dts
    &i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins>;
    
    	status = "okay";
    	clock-frequency = <400000>;
    ...
    &i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c1_pins>;
    
    	status = "okay";
    	clock-frequency = <100000>;
    ...

    I'm listing below the matching u-boot log (full log in attachment) for your reference:

    => i2c dev 0
    Setting bus to 0
    => i2c probe 0
    Valid chip addresses:
    => i2c speed
    Current bus speed=400000
    
    => i2c b dev 1
    Setting bus to 1
    => i2c probe 1
    Valid chip addresses:
    => i2c speed
    Current bus speed=100000

    Best,

    -Hong

    => i2c - I2C sub-system
    Usage:
    i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info
    i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum
    i2c dev [dev] - show or set current I2C bus
    i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device
    i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device
    i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)
    i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)
    i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)
    i2c probe [address] - test for and show device(s) on the I2C bus
    i2c read chip address[.0, .1, .2] length memaddress - read to memory
    i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory
              to I2C; the -s option selects bulk write in a single transaction
    i2c flags chip [flags] - set or get chip flags
    i2c olen chip [offset_length] - set or get chip offset length
    i2c reset - re-init the I2C Controller
    i2c speed [speed] - show or set I2C bus speed
    => dm tree
     Class    index  Probed  Driver                Name
    -----------------------------------------------------------
     root        0  [ + ]   root_driver           root_driver
     rsa_mod_ex  0  [   ]   mod_exp_sw            |-- mod_exp_sw
     simple_bus  0  [ + ]   generic_simple_bus    `-- ocp
     simple_bus  1  [   ]   generic_simple_bus        |-- l4_wkup@44c00000
     simple_bus  2  [   ]   generic_simple_bus        |   |-- prcm@200000
     simple_bus  3  [   ]   generic_simple_bus        |   `-- scm@210000
     simple_bus  4  [   ]   generic_simple_bus        |       `-- scm_conf@0
     gpio        0  [ + ]   gpio_omap                 |-- gpio@44e07000
     gpio        1  [   ]   gpio_omap                 |-- gpio@4804c000
     gpio        2  [   ]   gpio_omap                 |-- gpio@481ac000
     gpio        3  [   ]   gpio_omap                 |-- gpio@481ae000
     serial      0  [ + ]   omap_serial               |-- serial@44e09000
     serial      1  [   ]   omap_serial               |-- serial@48022000
     i2c         0  [ + ]   i2c_omap                  |-- i2c@44e0b000
     i2c         1  [ + ]   i2c_omap                  |-- i2c@4802a000
     mmc         0  [ + ]   omap_hsmmc                |-- mmc@48060000
     blk         0  [ + ]   mmc_blk                   |   `-- mmc@48060000.blk
     timer       0  [ + ]   omap_timer                |-- timer@48040000
     timer       1  [   ]   omap_timer                |-- timer@48042000
     timer       2  [   ]   omap_timer                |-- timer@48044000
     timer       3  [   ]   omap_timer                |-- timer@48046000
     timer       4  [   ]   omap_timer                |-- timer@48048000
     timer       5  [   ]   omap_timer                |-- timer@4804a000
     misc        0  [ + ]   ti-musb-wrapper           |-- usb@47400000
     usb         0  [ + ]   ti-musb-peripheral        |   |-- usb@47401000
     eth         1  [ + ]   usb_ether                 |   |   `-- usb_ether
     usb         0  [   ]   ti-musb-host              |   `-- usb@47401800
     eth         0  [ + ]   eth_cpsw                  `-- ethernet@4a100000
    => i2c dev 0
    Setting bus to 0
    => i2c probe 0
    Valid chip addresses:
    => i2c speed
    Current bus speed=400000
    
    => i2c b dev 1
    Setting bus to 1
    => i2c probe 1
    Valid chip addresses:
    => i2c speed
    Current bus speed=100000
    => 

  • Hi Hong,

    Thanks for the reply, here  we are not able to see any am335x_evm.dts in SDKv7 U-boot (U-boot 2013).
    Could  you please help us with this as we have done our bring up on Uboot 2013.

    Regards,
    Chinmay

  • Hi Chinmay,
    For earlier SDK (for example, your case of u-boot 2013), DM was not enabled in u-boot.
    You may still refer to the u-boot i2c driver code "/drivers/i2c/omap24xx_i2c.c, & omap24xx_i2c.h".
    Specifically you may refer to the function omap24_i2c_findpsc() as listed below on how i2c timing parameters such as psc, sscl, ssch...are calculated. Note that the omap24_i2c_findpsc() is common for DM based and non-DM based u-boot i2c drivers.

    static int omap24_i2c_findpsc(u32 *pscl, u32 *psch, uint speed)
    {
    ...
    	debug("%s: speed [kHz]: %d psc: 0x%x sscl: 0x%x ssch: 0x%x\n",
    	      __func__, speed, prescaler, *pscl, *psch);
    ...
    }

    I'm attaching the call flow I captured with SDK6.3 on AM335x EVM, where DM is enabled in u-boot i2c driver, and i2c0 is 400kbps, and
    hoping the timing parameters in the attached log file are useful for you.

    Best,

    -Hong

    B::area_log1
    
    
    
    
    
    
    
    ===================================================
    15. Mar 2021
    18:17:28
    ===================================================
    B::Register
    N _  R0         18  R8   BDF54A90  ^S+ ^Stack_+
    Z _  R1       3200  R9   BDF46EB8
    C C  R2          8  R10         3
    V _  R3          8  R11         4
    Q _  R4          9  R12         0
         R5   44E0B000  R13  BDF386E0
    0 _  R6   00061A80  R14  BFF87883
    1 _  R7          1  PC   BFF87898
    2 _  SPSR        0  CPSR 200001B3
    3 _
    4 _  USR:           FIQ:
         R8   BDF54A90  R8          0
         R9   BDF46EB8  R9   40000408
    I I  R10         3  R10  20000000
    F _  R11         4  R11  00010002
         R12         0  R12         0
    T T  R13         0  R13         0
    J _  R14         0  R14         0
    svc                 SPSR        0
    nsec
         SVC:           IRQ:
    A A  R13  BDF386E0  R13  00A02508
    E _  R14  BFF87883  R14  04101003
         SPSR        0  SPSR        0
    0 _
    1 _  UND:           ABT:
    2 _  R13  EC0E25FC  R13         0
    3 _  R14  04CA8189  R14         0
         SPSR        0  SPSR        0
    
         MON:
         R13
         R14
         SPSR
    B::Var.Frame_%DECIMAL_%OPEN.1_/Locals_/Caller
    -000|omap24_i2c_findpsc(inline)
    -000|__omap24_i2c_setspeed(
        |    i2c_base = 0x44E0B000 -> ,
        |    ip_rev = 1 = 0x1,
        |    speed = 400000 = 0x00061A80,
        |    waitdelay = 0xBDF54A90 -> 0 = 0x0)
        |  fsscll = 0 = 0x0
        |  fssclh = 0 = 0x0
        |  hsscll = 0 = 0x0
        |  hssclh = 0 = 0x0
        |  scll = 9 = 0x9
        |  sclh = 3 = 0x3
        |  speed = 53124 = 0xCF84
        |  psch = ?
        |  pscl = ?
        |  internal_clk = 9600 = 0x2580
        |  fclk = 48000 = 0xBB80
        |  prescaler = 4 = 0x4
        |
    -001|__omap24_i2c_init(inline)
    -001|omap_i2c_probe(
        |  ?)
        |  priv = 0xBDF54A80 -> (
        |    clk = 0x0,
        |    ip_rev = 1 = 0x1,
        |    regs = 0x44E0B000,
        |    speed = 400000 = 0x00061A80,
        |    waitdelay = 0 = 0x0,
        |    clk_id = 0 = 0x0)
        |  waitdelay = 0xBDF54A90 -> 0 = 0x0
        |  speed = 400000 = 0x00061A80
        |  ip_rev = 1 = 0x1
        |  i2c_base = 0x44E0B000 ->
        |  __v = 2 = 0x2
        |  reg = 9 = 0x9
        |  val = 32768 = 0x8000
        |  base = 0x44E0B000 ->
        |  __v = 32768 = 0x8000
        |  __v = 0 = 0x0
        |  __v = 65535 = 0xFFFF
        |
        |        }
        |
        |        if (__omap24_i2c_setspeed(i2c_base, ip_rev, speed, waitdelay)) {
    -002|device_probe(inline)
    -002|device_probe(
        |    dev = 0xBDF476F0 -> (
        |      driver = 0xBFFD2694,
        |      name = 0xBDF3D4EC,
        |      platdata = 0xBDF47758,
        |      parent_platdata = 0x0,
        |      uclass_platdata = 0x0,
        |      node = (np = 0x4BD8, of_offset = 19416 = 0x4BD8),
        |      driver_data = 1 = 0x1,
        |      parent = 0xBDF47148,
        |      priv = 0xBDF54A80,
        |      uclass = 0xBDF476D0,
        |      uclass_priv = 0xBDF54AA0,
        |      parent_priv = 0x0,
        |      uclass_node = (next = 0xBDF47798, prev = 0xBDF476D8),
        |      child_head = (next = 0xBDF47728, prev = 0xBDF47728),
        |      sibling_node = (next = 0xBDF477A8, prev = 0xBDF47688),
        |      flags = 67 = 0x43,
        |      req_seq = 0 = 0x0,
        |      seq = 0 = 0x0,
        |      pd = (dev = 0x0, id = 0 = 0x0, priv = 0x0)))
        |__size = 0 = 0x0
        |omdev = 0xBDF476F0 -> (
        |    driver = 0xBFFD2694,
        |    name = 0xBDF3D4EC,
        |    platdata = 0xBDF47758,
        |    parent_platdata = 0x0,
        |    uclass_platdata = 0x0,
        |    node = (np = 0x4BD8, of_offset = 19416 = 0x4BD8),
        |    driver_data = 1 = 0x1,
        |    parent = 0xBDF47148,
        |    priv = 0xBDF54A80,
        |    uclass = 0xBDF476D0,
        |    uclass_priv = 0xBDF54AA0,
        |    parent_priv = 0x0,
        |    uclass_node = (next = 0xBDF47798, prev = 0xBDF476D8),
        |    child_head = (next = 0xBDF47728, prev = 0xBDF47728),
        |    sibling_node = (next = 0xBDF477A8, prev = 0xBDF47688),
        |    flags = 67 = 0x43,
        |    req_seq = 0 = 0x0,
        |    seq = 0 = 0x0,
        |    pd = (dev = 0x0, id = 0 = 0x0, priv = 0x0))
        |  drv = 0xBFFD2694 -> (
        |    name = 0xBFFC7729,
        |    id = UCLASS_I2C = 32 = 0x20,
        |    of_match = 0xBFFB38A0,
        |    bind = 0x0,
        |    probe = 0xBFF87D75,
        |    remove = 0x0,
        |    unbind = 0x0,
        |    ofdata_to_platdata = 0xBFF87AF9,
        |    child_post_bind = 0x0,
        |    child_pre_probe = 0x0,
        |    child_post_remove = 0x0,
        |    priv_auto_alloc_size = 24 = 0x18,
        |    platdata_auto_alloc_size = 12 = 0x0C,
        |    per_child_auto_alloc_size = 0 = 0x0,
        |    per_child_platdata_auto_alloc_size = 0 = 0x0,
        |    ops = 0xBFFB38B8,
        |    flags = 0 = 0x0)
        |  ret = 24 = 0x18
        |
        |                ret = drv->probe(dev);
    -003|uclass_get_device_tail(inline)
    -003|uclass_get_device_tail(
        |    dev = 0xBDF476F0 -> (
        |      driver = 0xBFFD2694,
        |      name = 0xBDF3D4EC,
        |      platdata = 0xBDF47758,
        |      parent_platdata = 0x0,
        |      uclass_platdata = 0x0,
        |      node = (np = 0x4BD8, of_offset = 19416 = 0x4BD8),
        |      driver_data = 1 = 0x1,
        |      parent = 0xBDF47148,
        |      priv = 0xBDF54A80,
        |      uclass = 0xBDF476D0,
        |      uclass_priv = 0xBDF54AA0,
        |      parent_priv = 0x0,
        |      uclass_node = (next = 0xBDF47798, prev = 0xBDF476D8),
        |      child_head = (next = 0xBDF47728, prev = 0xBDF47728),
        |      sibling_node = (next = 0xBDF477A8, prev = 0xBDF47688),
        |      flags = 67 = 0x43,
        |      req_seq = 0 = 0x0,
        |      seq = 0 = 0x0,
        |      pd = (dev = 0x0, id = 0 = 0x0, priv = 0x0)),
        |  ?,
        |    devp = 0xBDF3876C -> 0x0 -> NULL
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |                                    )
        |  ret = 24 = 0x18
        |  devp = 0xBDF3876C -> 0x0 -> NULL
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |  dev = 0xBDF476F0 -> (
        |    driver = 0xBFFD2694,
        |    name = 0xBDF3D4EC,
        |    platdata = 0xBDF47758,
        |    parent_platdata = 0x0,
        |    uclass_platdata = 0x0,
        |    node = (np = 0x4BD8, of_offset = 19416 = 0x4BD8),
        |    driver_data = 1 = 0x1,
        |    parent = 0xBDF47148,
        |    priv = 0xBDF54A80,
        |    uclass = 0xBDF476D0,
        |    uclass_priv = 0xBDF54AA0,
        |    parent_priv = 0x0,
        |    uclass_node = (next = 0xBDF47798, prev = 0xBDF476D8),
        |    child_head = (next = 0xBDF47728, prev = 0xBDF47728),
        |    sibling_node = (next = 0xBDF477A8, prev = 0xBDF47688),
        |    flags = 67 = 0x43,
        |    req_seq = 0 = 0x0,
        |    seq = 0 = 0x0,
        |    pd = (dev = 0x0, id = 0 = 0x0, priv = 0x0))
        |
        |...
        |        uclass_foreach_dev(dev, uc) {
        |                if (dev->driver == find_drv)
        |                        return uclass_get_device_tail(dev, 0, devp);
        |        }
        |
        |        return -ENODEV;
        |}
        |
        |int uclass_get_device_tail(struct udevice *dev, int ret, struct udevice **devp)
        |                return ret;
        |
        |        assert(dev);
        |        ret = device_probe(dev);
    -004|uclass_get_device_by_seq(
        |    id = UCLASS_I2C = 32 = 0x20,
        |    seq = 0 = 0x0,
        |    devp = 0xBDF3876C -> 0x0 -> NULL
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |                                    )
        |  return = 24 = 0x18
        |  dev = 0xBDF476F0 -> (
        |    driver = 0xBFFD2694,
        |    name = 0xBDF3D4EC,
        |    platdata = 0xBDF47758,
        |    parent_platdata = 0x0,
        |    uclass_platdata = 0x0,
        |    node = (np = 0x4BD8, of_offset = 19416 = 0x4BD8),
        |    driver_data = 1 = 0x1,
        |    parent = 0xBDF47148,
        |    priv = 0xBDF54A80,
        |    uclass = 0xBDF476D0,
        |    uclass_priv = 0xBDF54AA0,
        |    parent_priv = 0x0,
        |    uclass_node = (next = 0xBDF47798, prev = 0xBDF476D8),
        |    child_head = (next = 0xBDF47728, prev = 0xBDF47728),
        |    sibling_node = (next = 0xBDF477A8, prev = 0xBDF47688),
        |    flags = 67 = 0x43,
        |    req_seq = 0 = 0x0,
        |    seq = 0 = 0x0,
        |    pd = (dev = 0x0, id = 0 = 0x0, priv = 0x0))
        |
        |        }
        |        return uclass_get_device_tail(dev, ret, devp);
    -005|cmd_i2c_set_bus_num(inline)
    -005|do_i2c_bus_num(
        |  ?,
        |  ?,
        |  ?,
        |  ?)
        |  bus_no = 0 = 0x0
        |  busnum = 0 = 0x0
        |  bus = 0x0 -> NULL
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |  ret = 24 = 0x18
        |
        |...
        |#define DEFAULT_ADDR_LEN        (-1)
        |#else
        |#define DEFAULT_ADDR_LEN        1
        |#endif
        |
        |#ifdef CONFIG_DM_I2C
        |static struct udevice *i2c_cur_bus;
        |
        |static int cmd_i2c_set_bus_num(unsigned int busnum)
        |{
        |        struct udevice *bus;
        |        int ret;
        |
        |        ret = uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus);
        |#ifdef CONFIG_DM_I2C
        |                ret = cmd_i2c_set_bus_num(bus_no);
    -006|cmd_call(inline)
    -006|cmd_process(
        |  ?,
        |  ?,argc = 3 = 0x3,
        |  ?,argv = 0xBDF549D8 -> 0xBDF54988 -> 105 = 0x69,
        |  ?)repeatable = 0xBFFD3AD4 -> 1 = 0x1,
        |  buticks = 0x0 -> NULL)
        |  cmdtp = 0xBFFD1F18 -> (
        |    name = 0xBFFC8385,
        |    maxargs = 7 = 0x7,
        |    repeatable = 1 = 0x1,
        |    cmd = 0xBFF6B395,
        |    usage = 0xBFFC4440,
        |    help = 0xBFFCAA90,
        |    complete = 0x0)
        |  argv = 0xBDF549D8 -> 0xBDF54988 -> 105 = 0x69
        |  argc = 3 = 0x3
        |  flag = 0 = 0x0
        |  cmdtp = 0xBFFD1F18 -> (
        |    name = 0xBFFC8385,
        |    maxargs = 7 = 0x7,
        |    repeatable = 1 = 0x1,
        |    cmd = 0xBFF6B395,
        |    usage = 0xBFFC4440,
        |    help = 0xBFFCAA90,
        |    complete = 0x0)
        |
        |...
        | * executing a command.
        | *
        | * @param cmdtp         Pointer to the command to execute
        | * @param flag          Some flags normally 0 (see CMD_FLAG_.. above)
        | * @param argc          Number of arguments (arg 0 must be the command text)
        | * @param argv          Arguments
        | * @return 0 if command succeeded, else non-zero (CMD_RET_...)
        | */
        |static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        |{
        |        int result;
        |
        |        result = (cmdtp->cmd)(cmdtp, flag, argc, argv);
        |                rc = cmd_call(cmdtp, flag, argc, argv);
    -007|run_pipe_real(inline)
    -007|run_list_real(inline)
    -007|run_list_real(
        |  ?)
        |  save_name = 0x0 -> NULL
        |cmlist = 0x0 -> NULL
        |cmsave_list = 0x0 -> NULL
        |  flag_rep = 0 = 0x0
        |  rcode = 0 = 0x0
        |  flag_skip = 1 = 0x1
        |  flag_restore = 0 = 0x0
        |  if_code = 0 = 0x0
        |  next_if_code = 0 = 0x0
        |  skip_more_in_this_rmode = RES_XXXX = 11 = 0x0B
        |  pi = 0xBDF548E0 -> (
        |    num_progs = 1 = 0x1,
        |    progs = 0xBDF549F0,
        |    next = 0xBDF548F8,
        |    followup = PIPE_SEQ = 1 = 0x1,
        |    r_mode = RES_NONE = 0 = 0x0)
        |  save_name = 0x0 -> NULL
        |  save_list = 0x0 -> NULL
        |  rpipe = 0x0 -> NULL
        |
        |
        |
        |
        |
        |  flag_rep = 0 = 0x0
        |  flag_restore = 0 = 0x0
        |  if_code = 0 = 0x0
        |  next_if_code = 0 = 0x0
        |..rmode = RES_NONE = 0 = 0x0
        | *pi = 0xBDF548E0 -> (
        |    num_progs = 1 = 0x1,
        |    progs = 0xBDF549F0,
        |    next = 0xBDF548F8,
        |    followup = PIPE_SEQ = 1 = 0x1,
        |    r_mode = RES_NONE = 0 = 0x0)
        | *child = 0xBDF549F0 -> (
        |    argv = 0xBDF549D8,
        |    argv_nonnull = 0xBDF54998,
        |    argc = 3 = 0x3,
        |    group = 0x0,
        |    sp = 0 = 0x0,
        |    type = 2 = 0x2)
        |
        |                }
        |                /* Process the command */
        |                return cmd_process(flag, child->argc, child->argv,
    -008|run_list(inline)
    -008|parse_stream_outer(
        |  liinp = 0xBDF3884C -> (
        |      p = 0xBFFD3BEA,
        |      __promptme = 1 = 0x1,
        |      promptmode = 2 = 0x2,
        |      get = 0xBFF74D95,
        |      peek = 0xBFF74FE5),
        |  ifflag = 2 = 0x2)
        |  ctx = (
        |    child = 0xBDF54A60,
        |    list_head = 0xBDF548E0,
        |    pipe = 0xBDF54A48,
        |    w = RES_NONE = 0 = 0x0,
        |    old_flag = 0 = 0x0,
        |    stack = 0x0,
        |    type = 2 = 0x2)
        |  temp = (
        |    data = 0xBDF54918,
        |    length = 0 = 0x0,
        |    maxlen = 100 = 0x64,
        |    quote = 0 = 0x0,
        |    nonnull = 0 = 0x0)
        |  rcode = 0 = 0x0
        |  pi = 0xBDF548E0 -> (
        |    num_progs = 1 = 0x1,
        |    progs = 0xBDF549F0,
        |    next = 0xBDF548F8,
        |    followup = PIPE_SEQ = 1 = 0x1,
        |    r_mode = RES_NONE = 0 = 0x0)
        |
        |}
        |
        |/* Select which version we will use */
        |static int run_list(struct pipe *pi)
        |{
        |        int rcode=0;
        |#ifndef __U_BOOT__
        |        if (fake_mode==0) {
        |#endif
        |                rcode = run_list_real(pi);
    -009|parse_file_outer()
        |  rcode = 24 = 0x18
        |  input = (
        |    p = 0xBFFD3BEA,
        |    __promptme = 1 = 0x1,
        |    promptmode = 2 = 0x2,
        |    get = 0xBFF74D95,
        |    peek = 0xBFF74FE5)
        |
        |#endif
        |        rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
    -010|cli_loop()
        |
        |}
        |#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
        |
        |void cli_loop(void)
        |{
        |#ifdef CONFIG_HUSH_PARSER
        |        parse_file_outer();
    -011|bootstage_mark_name(inline)
    -011|main_loop()
        |  s = 0xBDF508F0 -> 105 = 0x69
        |
        |        cli_loop();
    -012|run_main_loop()
        |  return = 24 = 0x18
        |
        |        for (;;)
        |                main_loop();
        |        return 0;
        |}
        |
        |/*
    -013|initcall_run_list(
        |    init_sequence = 0xBFFCBF54 -> 0xBFF762E9 -> )
        |  init_fnc_ptr = 0xBFFCBFEC -> 0xBFF76301 ->
        |} ret = 24 = 0x18
        |
        |                if (ret) {
    -014|board_init_r(
        |  ?,
        |  ?)
        |
        |#endif
        |
        |        if (initcall_run_list(init_sequence_r))
        |                hang();
        |
        |        /* NOTREACHED - run_main_loop() does not return */
        |        hang();