]> git.dujemihanovic.xyz Git - u-boot.git/commit
ARM: imx: Enable MMU and dcache very early on i.MX8M
authorMarek Vasut <marex@denx.de>
Thu, 5 Sep 2024 15:35:00 +0000 (17:35 +0200)
committerFabio Estevam <festevam@gmail.com>
Wed, 11 Sep 2024 19:43:24 +0000 (16:43 -0300)
commitac9153c74f30c13ce773367166bcb44aa847ff67
tree8cb774c45add4e7040c36b0880b80a4d9045a94b
parent78d898eec080b02059c8dc09318b8761044fea85
ARM: imx: Enable MMU and dcache very early on i.MX8M

Enable MMU and caches very early on in the boot process on i.MX8M
in U-Boot proper. This allows board_init_f to run with icache and
dcache enabled, which saves some 700 milliseconds of boot time on
i.MX8M Plus based device.

The 'bootstage report' output is below:

Before:
```
Timer summary in microseconds (8 records):
       Mark    Elapsed  Stage
          0          0  reset
    961,363    961,363  board_init_f
  1,818,874    857,511  board_init_r
  1,921,474    102,600  eth_common_init
  2,013,702     92,228  eth_initialize
  2,015,238      1,536  main_loop

Accumulated time:
                32,775  dm_r
               289,165  dm_f
```

After:
```
Timer summary in microseconds (8 records):
       Mark    Elapsed  Stage
          0          0  reset
    989,466    989,466  board_init_f
  1,179,100    189,634  board_init_r
  1,281,456    102,356  eth_common_init
  1,373,857     92,401  eth_initialize
  1,375,396      1,539  main_loop

Accumulated time:
                12,630  dm_f
                32,635  dm_r
```

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
arch/arm/mach-imx/imx8m/soc.c