17 Jul, 2014

9 commits

  • This commit converts the PMC support code to a platform driver. Because
    the boot process needs to call into this driver very early, also set up
    a minimal environment via an early initcall.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • Rather than rely on explicit initialization order called from SoC setup
    code, use a plain initcall and rely on initcall ordering to take care of
    dependencies.

    This driver exposes some functionality (querying the chip ID) needed at
    very early stages of the boot process. An early initcall is good enough
    provided that some of the dependencies are deferred to later stages. To
    make sure any abuses are easily caught, output a warning message if the
    chip ID is queried while it can't be read yet.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • Subsequent patches will move some of the initialization code from SoC
    setup code to regular initcalls. To prevent breakage on other SoCs in
    multi-platform builds, these initcalls need to check that they indeed
    run on Tegra.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • The Tegra20 fuse driver is the only user of tegra_apb_readl_using_dma().
    Therefore we can simply the code by incorporating the APB DMA handling into
    the driver directly. tegra_apb_writel_using_dma() is dropped because there
    are no users.

    Signed-off-by: Peter De Schrijver
    Signed-off-by: Stephen Warren
    Signed-off-by: Thierry Reding

    Peter De Schrijver
     
  • Implement fuse driver for Tegra20, Tegra30, Tegra114 and Tegra124. This
    replaces functionality previously provided in arch/arm/mach-tegra, which
    is removed in this patch.

    While at it, move the only user of the global tegra_revision variable
    over to tegra_sku_info.revision and export tegra_fuse_readl() to allow
    drivers to read calibration fuses.

    Signed-off-by: Peter De Schrijver
    Signed-off-by: Stephen Warren
    Signed-off-by: Thierry Reding

    Peter De Schrijver
     
  • All fuse related functionality will move to a driver in the following
    patches. To prepare for this, export all the required functionality in a
    global header file and move all users of fuse.h to soc/tegra/fuse.h.

    While we're at it, remove tegra_bct_strapping, as its only user was
    removed in Commit a7cbe92cef27 ("ARM: tegra: remove tegra EMC scaling
    driver").

    Signed-off-by: Peter De Schrijver
    Signed-off-by: Stephen Warren
    Signed-off-by: Thierry Reding

    Peter De Schrijver
     
  • Export APB DMA readl and writel. These are needed because we can't
    access the fuses directly on Tegra20 without potentially causing a
    system hang. Also have the APB DMA readl and writel return an error in
    case of a read failure instead of just returning zero or ignore write
    failures.

    Signed-off-by: Peter De Schrijver
    Signed-off-by: Stephen Warren
    Signed-off-by: Thierry Reding

    Peter De Schrijver
     
  • Instead of using a simple variable access to get at the Tegra chip ID,
    use a function so that we can run additional code. This can be used to
    determine where the chip ID is being accessed without being available.
    That in turn will be handy for resolving boot sequence dependencies in
    order to convert more code to regular initcalls rather than a sequence
    fixed by Tegra SoC setup code.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • In order to not clutter the include/linux directory with SoC specific
    headers, move the Tegra-specific headers out into a separate directory.

    Signed-off-by: Thierry Reding

    Thierry Reding