[U-Boot] [PATCH v2 00/31] dm: tegra: Move nyan-big and beaver to livetree
Simon Glass
sjg at chromium.org
Sat Jun 3 03:03:55 UTC 2017
This moves an entire board to use a live device tree as an example of the
impact.
Nyan-big was chosen because I can easily and boot U-Boot without any
media swapping, etc. Beaver is enabled as well since it failed to boot
with serial v1 due to a disabled console node.
Total code size impact on this board is approximately 9KB on U-Boot and
64 bytes on SPL:
27: dm: tegra: nyan-big: Move to livetree
arm: (for 1/1 boards) all +9264.0 bss -16.0 data +44.0 rodata +92.0
spl/u-boot-spl:all +326.0 spl/u-boot-spl:rodata +262.0
spl/u-boot-spl:text +64.0 text +9144.0
Tegra does not use Thumb2, which would likely reduce the code size by about
25%, indicating a code-size impact of perhaps 7KB.
Boot time is affected slightly. For nyan-big the times with flat tree are:
2,108 dm_r
7,924 dm_spl
120,724 dm_f
171,816 lcd
With the livetree:
721 dm_r
3,764 of_live
7,990 dm_spl
120,736 dm_f
168,215 lcd
As expected the spl and pre-relocation times are not affected. In the
post-relocation case, the live tree must be built, which here takes about
3.8ms. Driver-model device creation takes a bit of 1ms less time with the
livetree, so all up the cost is about 2.4ms. After DM init there appears
to be a slight reduction in the time taken to set up devices (from 327ms
to 319ms) so overall the live tree does not appear to be any slower. This
is because pre-parsing the device tree makes reading it later faster.
The use of livetree is controlled by a the CONFIG_OF_LIVE option. When
enabled, U-Boot builds a livetree immediately after relocation and uses
it from then on.
This series is available at u-boot-dm/livet-working
Changes in v2:
- Add new patch to enable bootstage for nyan-big
- Add new patch to ensure that the console UART is enabled
- Enable livetree for beaver also
- Add timing information
Simon Glass (31):
tegra: video: Time the LCD init
tegra: nyan-big: Enable the debug UART
dm: Fix error handling when unflattening the DT
tegra: nyan-big: Enable bootstage
dm: video: Sync display on backspace
dm: video: Update pwm_backlight to support livetree
video: simple-panel: Add a little more debugging
tegra: Fix up include file ordering
tegra: spl: Enable debug UART
tegra: nyan: Add a PMC syscon driver
dm: tegra: Convert USB setup to livetree
dm: tegra: Convert clock_decode_periph_id() to support livetree
dm: video: tegra124: Convert to livetree
tegra: Don't set up the UART clocks again in U-Boot
tegra: dts: Move stdout-path to /chosen
dm: tegra: gpio: Convert to support livetree
dm: tegra: usb: Convert to livetree
dm: tegra: spi: Convert to livetree
dm: tegra: i2c: Convert to livetree
dm: tegra: pwm: Convert to livetree
dm: tegra: mmc: Convert to livetree
power: Add a regulator driver for the as3722 PMIC
power: Add a GPIO driver for the as3722 PMIC
dm: power: Convert as3722 to driver model
dm: serial: ns16550: Convert to livetree
dm: serial: Separate out the core serial-device finding code
dm: serial: Add livetree support
tegra: Show a debug message if the LCD PMIC fails to start
fdtdec: Drop old compatible values
tegra: fdt: Ensure that the console UART is enabled
dm: tegra: Move nyan-big and beaver to livetree
arch/arm/dts/tegra114-dalmore.dts | 4 +
arch/arm/dts/tegra124-cei-tk1-som.dts | 4 +
arch/arm/dts/tegra124-jetson-tk1.dts | 4 +
arch/arm/dts/tegra124-nyan-big.dts | 5 +-
arch/arm/dts/tegra124-venice2.dts | 4 +
arch/arm/dts/tegra186-p2771-0000.dtsi | 4 +
arch/arm/dts/tegra20-colibri.dts | 4 +
arch/arm/dts/tegra20-harmony.dts | 4 +
arch/arm/dts/tegra20-trimslice.dts | 4 +
arch/arm/dts/tegra20-whistler.dts | 4 +
arch/arm/dts/tegra210-e2220-1170.dts | 4 +
arch/arm/dts/tegra210-p2371-0000.dts | 4 +
arch/arm/dts/tegra210-p2371-2180.dts | 4 +
arch/arm/dts/tegra210-p2571.dts | 4 +
arch/arm/dts/tegra30-apalis.dts | 4 +
arch/arm/dts/tegra30-beaver.dts | 4 +
arch/arm/dts/tegra30-cardhu.dts | 4 +
arch/arm/dts/tegra30-colibri.dts | 4 +
arch/arm/dts/tegra30-tec-ng.dts | 4 +
arch/arm/include/asm/arch-tegra/clock.h | 2 +-
arch/arm/include/asm/arch-tegra/tegra.h | 5 +
arch/arm/include/asm/arch-tegra/xusb-padctl.h | 2 +-
arch/arm/mach-tegra/board.c | 2 +
arch/arm/mach-tegra/board2.c | 34 ++-
arch/arm/mach-tegra/clock.c | 9 +-
arch/arm/mach-tegra/spl.c | 4 +
arch/arm/mach-tegra/tegra124/Makefile | 1 +
arch/arm/mach-tegra/tegra124/pmc.c | 19 ++
arch/arm/mach-tegra/tegra124/xusb-padctl.c | 36 +++-
arch/arm/mach-tegra/tegra210/xusb-padctl.c | 40 +++-
arch/arm/mach-tegra/xusb-padctl-common.c | 84 ++++----
arch/arm/mach-tegra/xusb-padctl-common.h | 11 +-
arch/arm/mach-tegra/xusb-padctl-dummy.c | 2 +-
board/cei/cei-tk1-som/cei-tk1-som.c | 2 +
board/nvidia/jetson-tk1/jetson-tk1.c | 2 +
board/nvidia/nyan-big/nyan-big.c | 22 +-
board/toradex/apalis-tk1/apalis-tk1.c | 6 +
configs/apalis-tk1_defconfig | 3 +
configs/beaver_defconfig | 1 +
configs/cei-tk1-som_defconfig | 3 +
configs/jetson-tk1_defconfig | 3 +
configs/nyan-big_defconfig | 13 ++
drivers/gpio/tegra_gpio.c | 10 +-
drivers/i2c/tegra_i2c.c | 6 +-
drivers/mmc/tegra_mmc.c | 17 +-
drivers/power/pmic/Makefile | 2 +-
drivers/power/pmic/as3722.c | 292 +++++++++-----------------
drivers/power/pmic/as3722_gpio.c | 120 +++++++++++
drivers/power/regulator/Kconfig | 9 +
drivers/power/regulator/Makefile | 1 +
drivers/power/regulator/as3722_regulator.c | 149 +++++++++++++
drivers/pwm/tegra_pwm.c | 2 +-
drivers/serial/ns16550.c | 15 +-
drivers/serial/serial-uclass.c | 92 ++++----
drivers/spi/tegra114_spi.c | 15 +-
drivers/spi/tegra20_sflash.c | 2 +-
drivers/spi/tegra20_slink.c | 2 +-
drivers/spi/tegra210_qspi.c | 2 +-
drivers/usb/host/ehci-tegra.c | 36 ++--
drivers/video/pwm_backlight.c | 22 +-
drivers/video/simple_panel.c | 2 +
drivers/video/tegra124/display.c | 10 +-
drivers/video/tegra124/dp.c | 3 +-
drivers/video/tegra124/sor.c | 25 +--
drivers/video/vidconsole-uclass.c | 1 +
include/fdtdec.h | 6 -
include/power/as3722.h | 27 ++-
lib/fdtdec.c | 6 -
lib/of_live.c | 7 +-
69 files changed, 807 insertions(+), 457 deletions(-)
create mode 100644 arch/arm/mach-tegra/tegra124/pmc.c
create mode 100644 drivers/power/pmic/as3722_gpio.c
create mode 100644 drivers/power/regulator/as3722_regulator.c
--
2.13.0.506.g27d5fe0cd-goog
More information about the U-Boot
mailing list