public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 00/20] dm: tegra: Move nyan-big, jetson-tk1, beaver to livetree
Date: Thu, 13 Jul 2017 08:38:31 +0000	[thread overview]
Message-ID: <1499935108.12417.2.camel@toradex.com> (raw)
In-Reply-To: <20170712033009.190494-1-sjg@chromium.org>

On Tue, 2017-07-11 at 21:29 -0600, Simon Glass wrote:
> This moves four entire boards 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. Jetson-TK1 is chosen
> because I found some USB problems in the v2 patches. Jetson-TX1 is
> added
> because Stephen Warren found some problems with PCI.
> 
> 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 v4:
> - Add new patch to add ofnode_read_resource()
> - Add new patch to fix up ofnode_get_addr_index() for 64-bit values
> - Update to use ofnode_read_resource()
> - Drop fdtdec.h header
> - Update to deal with rename of ofnode_read_prop()
> - Rebase to master
> - Drop changes already applied
> - Fix PCI and i2c init problems on jetson-tx1

Could you elaborate a little bit more on this as from the actual patch
set I don't seem to be able to figure out how/what exactly you did in
that respect.

Other than that it at least works for me on my Beaver and Jetson TK1 so
you may add the following to the whole series:

Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

> Changes in v3:
> - Update commit message, enable for all tegra124 boards not just
> nyan-big
> - Add new patch to convert tegra PCI to device tree
> - Enable livetree for jetson-tk1 also
> 
> Changes in v2:
> - Enable livetree for beaver also
> - Add timing information
> 
> Simon Glass (20):
>   dm: core: Add ofnode_read_resource()
>   dm: core: Fix up ofnode_get_addr_index() for 64-bit values
>   tegra: spl: Enable debug UART
>   tegra: tegra124: 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: 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
>   dm: tegra: pci: 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
>   fdtdec: Drop old compatible values
>   dm: tegra: Move nyan-big, jetson-tk1/tx1, beaver to livetree
> 
>  arch/arm/dts/tegra124-nyan-big.dts            |   5 +-
>  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/Kconfig                   |   2 +
>  arch/arm/mach-tegra/board2.c                  |   8 +-
>  arch/arm/mach-tegra/clock.c                   |   5 +-
>  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    |  42 +++-
>  arch/arm/mach-tegra/xusb-padctl-common.c      |  60 +++---
>  arch/arm/mach-tegra/xusb-padctl-common.h      |   8 +-
>  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                  |   4 +
>  configs/nyan-big_defconfig                    |   2 +
>  configs/p2371-2180_defconfig                  |   1 +
>  drivers/core/ofnode.c                         |  30 ++-
>  drivers/core/read.c                           |   5 +
>  drivers/core/read_extra.c                     |  25 +--
>  drivers/gpio/tegra_gpio.c                     |  10 +-
>  drivers/i2c/tegra_i2c.c                       |   7 +-
>  drivers/mmc/tegra_mmc.c                       |  17 +-
>  drivers/pci/pci_tegra.c                       |  53 +++--
>  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/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/tegra124/display.c              |   8 +-
>  drivers/video/tegra124/dp.c                   |   3 +-
>  drivers/video/tegra124/sor.c                  |  25 +--
>  include/dm/ofnode.h                           |   4 +
>  include/dm/read.h                             |  26 ++-
>  include/fdtdec.h                              |   6 -
>  include/power/as3722.h                        |  27 ++-
>  lib/fdtdec.c                                  |   6 -
>  52 files changed, 698 insertions(+), 433 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

  parent reply	other threads:[~2017-07-13  8:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  3:29 [U-Boot] [PATCH v4 00/20] dm: tegra: Move nyan-big, jetson-tk1, beaver to livetree Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 01/20] dm: core: Add ofnode_read_resource() Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 02/20] dm: core: Fix up ofnode_get_addr_index() for 64-bit values Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 03/20] tegra: spl: Enable debug UART Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 04/20] tegra: tegra124: Add a PMC syscon driver Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 05/20] dm: tegra: Convert USB setup to livetree Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 06/20] dm: tegra: Convert clock_decode_periph_id() to support livetree Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 07/20] dm: video: tegra124: Convert to livetree Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 08/20] tegra: dts: Move stdout-path to /chosen Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 09/20] dm: tegra: gpio: Convert to support livetree Simon Glass
2017-07-12  3:29 ` [U-Boot] [PATCH v4 10/20] dm: tegra: usb: Convert to livetree Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 11/20] dm: tegra: spi: " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 12/20] dm: tegra: i2c: " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 13/20] dm: tegra: pwm: " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 14/20] dm: tegra: mmc: " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 15/20] dm: tegra: pci: " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 16/20] power: Add a regulator driver for the as3722 PMIC Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 17/20] power: Add a GPIO " Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 18/20] dm: power: Convert as3722 to driver model Simon Glass
2017-07-13  8:38   ` Marcel Ziswiler
2017-07-25 13:21     ` Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 19/20] fdtdec: Drop old compatible values Simon Glass
2017-07-12  3:30 ` [U-Boot] [PATCH v4 20/20] dm: tegra: Move nyan-big, jetson-tk1/tx1, beaver to livetree Simon Glass
2017-07-13  8:38 ` Marcel Ziswiler [this message]
2017-07-13  9:22   ` [U-Boot] [PATCH v4 00/20] dm: tegra: Move nyan-big, jetson-tk1, " Simon Glass
2017-07-13  9:45     ` Marcel Ziswiler
2017-07-18 14:01       ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499935108.12417.2.camel@toradex.com \
    --to=marcel.ziswiler@toradex.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox