1. 02 2月, 2016 5 次提交
    • J
      clk: tegra: Fix warning caused by pll_u failing to lock · 0649c323
      Jon Hunter 提交于
      If the pll_u is not configured by the bootloader, then on kernel boot the
      following warning is seen:
      
       clk_pll_wait_for_lock: Timed out waiting for pll pll_u_vco lock
       tegra_init_from_table: Failed to enable pll_u_out1
       ------------[ cut here ]------------
       WARNING: at drivers/clk/tegra/clk.c:269
       Modules linked in:
      
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-next-20151214+ #1
       Hardware name: NVIDIA Tegra210 P2371 reference board (E.1) (DT)
       task: ffffffc0bc0a0000 ti: ffffffc0bc0a8000 task.ti: ffffffc0bc0a8000
       PC is at tegra_init_from_table+0x140/0x164
       LR is at tegra_init_from_table+0x140/0x164
       pc : [<ffffffc0008fee78>] lr : [<ffffffc0008fee78>] pstate: 80000045
       sp : ffffffc0bc0abd50
       x29: ffffffc0bc0abd50 x28: ffffffc00090b8a8
       x27: ffffffc000a06000 x26: ffffffc0bc019780
       x25: ffffffc00086a708 x24: ffffffc00086a790
       x23: ffffffc0006d7188 x22: ffffffc0bc010000
       x21: 000000000000016e x20: ffffffc0bc00d100
       x19: ffffffc000944178 x18: 0000000000000007
       x17: 000000000000000e x16: 0000000000000001
       x15: 0000000000000007 x14: 000000000000000e
       x13: 0000000000000013 x12: 000000000000001a
       x11: 000000000000004d x10: 0000000000000750
       x9 : ffffffc0bc0a8000 x8 : ffffffc0bc0a07b0
       x7 : 0000000000000001 x6 : 0000000002d5f0f8
       x5 : 0000000000000000 x4 : 0000000000000000
       x3 : 0000000000000002 x2 : ffffffc000996724
       x1 : 0000000000000000 x0 : 0000000000000032
      
       ---[ end trace cbd20ae519e92ced ]---
       Call trace:
       [<ffffffc0008fee78>] tegra_init_from_table+0x140/0x164
       [<ffffffc000900ac8>] tegra210_clock_apply_init_table+0x20/0x28
       [<ffffffc0008fec40>] tegra_clocks_apply_init_table+0x18/0x24
       [<ffffffc00008291c>] do_one_initcall+0x90/0x194
       [<ffffffc0008cfab0>] kernel_init_freeable+0x148/0x1e8
       [<ffffffc000636bb0>] kernel_init+0x10/0xdc
       [<ffffffc000085cd0>] ret_from_fork+0x10/0x40
       clk_pll_wait_for_lock: Timed out waiting for pll pll_u_vco lock
       tegra_init_from_table: Failed to enable pll_u_out2
       ------------[ cut here ]------------
      
      pll_u can be either controlled by software or hardware and this is
      selected via the OVERRIDE bit in the pll_u base register. In the function
      tegra210_pll_init(), the OVERRIDE bit for pll_u is cleared, which selects
      hardware control of the pll. However, at the same time the pll_u clocks
      are populated in the init_table for tegra210 and so software will try to
      configure the pll_u if it is not already configured and hence, the above
      warning is seen when the pll fails to lock. Remove the pll_u clocks from
      the init_table so that software does not try to configure this pll on
      boot.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      0649c323
    • J
      clk: tegra: Fix clock sources for Tegra210 EMC · 4f8d4440
      Jon Hunter 提交于
      The EMC clock sources for Tegra210 currently incorrectly include pll_c2
      and pll_c3. However, both of these should have been pll_mb as shown in
      the TRM. If Tegra210 happens to be configured such that the pll_mb is the
      default clock for the EMC, as configured by the bootloader, then this will
      cause a system hang on boot. This is because the kernel will disable the
      pll_mb when disabling unused clock as it appears to be unused when it is
      not.
      
      Also add the additional pll_p clock source for the EMC.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Acked-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      4f8d4440
    • J
      clk: tegra: Add the APB2APE audio clock on Tegra210 · 29569941
      Jon Hunter 提交于
      The APB2APE clock for the audio subsystem is required for powering up the
      audio power domain and accessing the various modules in this subsystem on
      Tegra210 devices. Add this clock for Tegra210.
      Signed-off-by: NJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      29569941
    • R
      clk: tegra: Fix pllx dyn step calculation · 3dad5c5f
      Rhyland Klein 提交于
      The logic for calculating the input rate used when figuring out the
      proper dynamic steps for pllx was incorrect. It is supposed to be
      calculated using parent_rate / m but it was just using the parent rate
      directly, therefore using the wrong step values.
      Signed-off-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      3dad5c5f
    • R
      clk: tegra: Fix naming of MISC registers · 474f2ba2
      Rhyland Klein 提交于
      Some register for PLLM and PLLMB were named MISC0 but according to the
      TRM, they have different names. Sync up the names to make it easier to
      understand which register they are really referring to.
      Signed-off-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      474f2ba2
  2. 25 1月, 2016 1 次提交
    • R
      clk: tegra: Remove improper flags for lock_enable · 14050118
      Rhyland Klein 提交于
      Most PLL's don't actually have LOCK_ENABLE bits. However, most PLL's
      also had that flag set, which meant that the clk code was trying to
      enable locks, and inadvertantly flipping bits in other fields.
      
      For PLLM, ensure the correct register is used for the misc_register.
      PLL_MISC0 contains the EN_LCKDET bit which should be used for enabling
      the lock, and PLLM_MISC1 shouldn't be used at all.
      
      Lastly, remove some of the settings which would point to the EN_LCKDET
      bits for some PLLs. There is no need to enable the locks, and that is
      done as part of the set_defaults logic already.
      Signed-off-by: NRhyland Klein <rklein@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      14050118
  3. 17 12月, 2015 1 次提交