1. 13 8月, 2013 4 次提交
    • J
      ARM: tegra: add LP1 suspend support for Tegra30 · e7a932b1
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * storing some EMC registers, DPD (deep power down) status, clk source of
        mselect and SCLK burst policy
      * putting SDRAM into self-refresh
      * switching CPU to CLK_M (12MHz OSC)
      * tunning off PLLM, PLLP, PLLA, PLLC and PLLX
      * switching SCLK to CLK_S (32KHz OSC)
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX
      * restoring the clk source of mselect and SCLK burst policy
      * setting up CCLK burst policy to PLLX
      * restoring DPD status and some EMC registers
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored, CCLK burst policy be set in PLLX. Then jumping to
      "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore
      CPU context and back to kernel.
      
      Based on the work by: Scott Williams <scwilliams@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e7a932b1
    • J
      ARM: tegra: add common LP1 suspend support · 95872f42
      Joseph Lo 提交于
      The LP1 suspending mode on Tegra means CPU rail off, devices and PLLs are
      clock gated and SDRAM in self-refresh mode. That means the low level LP1
      suspending and resuming code couldn't be run on DRAM and the CPU must
      switch to the always on clock domain (a.k.a. CLK_M 12MHz oscillator). And
      the system clock (SCLK) would be switched to CLK_S, a 32KHz oscillator.
      The LP1 low level handling code need to be moved to IRAM area first. And
      marking the LP1 mask for indicating the Tegra device is in LP1. The CPU
      power timer needs to be re-calculated based on 32KHz that was originally
      based on PCLK.
      
      When resuming from LP1, the LP1 reset handler will resume PLLs and then
      put DRAM to normal mode. Then jumping to the "tegra_resume" that will
      restore full context before back to kernel. The "tegra_resume" handler
      was expected to be found in PMC_SCRATCH41 register.
      
      This is common LP1 procedures for Tegra, so we do these jobs mainly in
      this patch:
      * moving LP1 low level handling code to IRAM
      * marking LP1 mask
      * copying the physical address of "tegra_resume" to PMC_SCRATCH41
      * re-calculate the CPU power timer based on 32KHz
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      [swarren, replaced IRAM_CODE macro with IO_ADDRESS(TEGRA_IRAM_CODE_AREA)]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      95872f42
    • J
      ARM: tegra: config the polarity of the request of sys clock · 444f9a80
      Joseph Lo 提交于
      When suspending to LP1 mode, the SYSCLK will be clock gated. And different
      board may have different polarity of the request of SYSCLK, this patch
      configure the polarity from the DT for the board.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      444f9a80
    • J
      ARM: tegra: add common resume handling code for LP1 resuming · 5b795d05
      Joseph Lo 提交于
      Add support to the Tegra CPU reset vector to detect whether the CPU is
      resuming from LP1 suspend state. If it is, branch to the LP1-specific
      resume code.
      
      When Tegra enters the LP1 suspend state, the SDRAM controller is placed
      into a self-refresh state. For this reason, we must place the LP1 resume
      code into IRAM, so that it is accessible before SDRAM access has been
      re-enabled.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      5b795d05
  2. 09 8月, 2013 1 次提交
    • S
      ARM: tegra: unify Tegra's Kconfig a bit more · 20984c44
      Stephen Warren 提交于
      Move all common select clauses from ARCH_TEGRA_*_SOC to ARCH_TEGRA to
      eliminate duplication. The USB-related selects all should have been
      common too, but were missing from Tegra114 previously. Move these to
      ARCH_TEGRA too. The latter fixes a build break when only Tegra114
      support was enabled, but not Tegra20 or Tegra30 support.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      20984c44
  3. 20 7月, 2013 12 次提交
  4. 16 7月, 2013 1 次提交
  5. 13 7月, 2013 2 次提交
  6. 12 7月, 2013 2 次提交
  7. 11 7月, 2013 1 次提交
  8. 10 7月, 2013 8 次提交
  9. 09 7月, 2013 4 次提交
    • R
      ARM: mm: fix boot on SA1110 Assabet · 319e0b4f
      Russell King 提交于
      Commit 83db0384 (mm/ARM: use common help functions to free reserved
      pages) broke booting on the Assabet by trying to convert a PFN to
      a virtual address using the __va() macro.  This macro takes the
      physical address, not a PFN.  Fix this.
      
      Cc: <stable@vger.kernel.org> # 3.10
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      319e0b4f
    • S
      ARM: 7781/1: mmu: Add debug_ll_io_init() mappings to early mappings · ee4de5d9
      Stephen Boyd 提交于
      Failure to add the mapping created in debug_ll_io_init() can lead
      to the BUG_ON() triggering in lib/ioremap.c:27 if the static
      virtual address decided for the debug_ll mapping overlaps with
      another mapping that is created later. This happens because the
      generic ioremap code has no idea there is a mapping there and it
      tries to place a mapping in the same location and blows up when
      it sees that there is a pte already present.
      
      kernel BUG at lib/ioremap.c:27!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-rc2-00042-g2af0c67-dirty #316
      task: ef088000 ti: ef082000 task.ti: ef082000
      PC is at ioremap_page_range+0x16c/0x198
      LR is at ioremap_page_range+0xf0/0x198
      pc : [<c04cb874>]    lr : [<c04cb7f8>]    psr: 20000113
      sp : ef083e78  ip : af140000  fp : ef083ebc
      r10: ef7fc100  r9 : ef7fc104  r8 : 000af174
      r7 : 00000647  r6 : beffffff  r5 : f004c000  r4 : f0040000
      r3 : af173417  r2 : 16440653  r1 : af173e07  r0 : ef7fc8fc
      Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5787d  Table: 8020406a  DAC: 00000015
      Process swapper/0 (pid: 1, stack limit = 0xef082238)
      Stack: (0xef083e78 to 0xef084000)
      3e60:                                                       00040000 ef083eec
      3e80: bf134000 f004bfff c0207c00 f004c000 c02fc120 f000c000 c15e7800 00040000
      3ea0: ef083eec 00000647 c098ba9c c0953544 ef083edc ef083ec0 c021b82c c04cb714
      3ec0: c09cdc50 00000040 ef0f1e00 ef1003c0 ef083f14 ef083ee0 c09535bc c021b7bc
      3ee0: c0953544 c04d0c6c c094e2cc c1600be4 c07440c4 c09a6888 00000002 c0a15f00
      3f00: ef082000 00000000 ef083f54 ef083f18 c0208728 c0953550 00000002 c1600bfc
      3f20: c08e3fac c0839918 ef083f54 c1600b80 c09a6888 c0a15f00 0000008b c094e2cc
      3f40: c098ba9c c098bab8 ef083f94 ef083f58 c094ea0c c020865c 00000002 00000002
      3f60: c094e2cc 00000000 c025b674 00000000 c06ff860 00000000 00000000 00000000
      3f80: 00000000 00000000 ef083fac ef083f98 c06ff878 c094e910 00000000 00000000
      3fa0: 00000000 ef083fb0 c020efe8 c06ff86c 00000000 00000000 00000000 00000000
      3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 c0595108
      [<c04cb874>] (ioremap_page_range+0x16c/0x198) from [<c021b82c>] (__alloc_remap_buffer.isra.18+0x7c/0xc4)
      [<c021b82c>] (__alloc_remap_buffer.isra.18+0x7c/0xc4) from [<c09535bc>] (atomic_pool_init+0x78/0x128)
      [<c09535bc>] (atomic_pool_init+0x78/0x128) from [<c0208728>] (do_one_initcall+0xd8/0x198)
      [<c0208728>] (do_one_initcall+0xd8/0x198) from [<c094ea0c>] (kernel_init_freeable+0x108/0x1d0)
      [<c094ea0c>] (kernel_init_freeable+0x108/0x1d0) from [<c06ff878>] (kernel_init+0x18/0xf4)
      [<c06ff878>] (kernel_init+0x18/0xf4) from [<c020efe8>] (ret_from_fork+0x14/0x20)
      Code: e50b0040 ebf54b2f e51b0040 eaffffee (e7f001f2)
      
      Fix it by telling generic layers about the static mapping via
      iotable_init().  This also has the nice side effect of letting
      you see the mapping in procfs' vmallocinfo file.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ee4de5d9
    • S
      ARM: 7780/1: add missing linker section markup to head-common.S · 8c69d7af
      Stephen Warren 提交于
      Macro __INIT is used to place various code in head-common.S into the init
      section. This should be matched by a closing __FINIT. Also, add an
      explicit ".text" to ensure subsequent code is placed into the correct
      section; __FINIT is simply a closing marker to match __INIT and doesn't
      guarantee to revert to .text.
      
      This historically caused no problem, because macro __CPUINIT was used at
      the exact location where __FINIT was missing, which then placed following
      code into the cpuinit section. However, with commit 22f0a273 "init.h:
      remove __cpuinit sections from the kernel" applied, __CPUINIT becomes a
      no-op, thus leaving all this code in the init section, rather than the
      regular text section. This caused issues such as secondary CPU boot
      failures or crashes.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      8c69d7af
    • O
      ARM: omap2: add select of TI_PRIV_EDMA · 9d8812df
      Olof Johansson 提交于
      "ARM: OMAP: build mach-omap code only if needed" moved around the
      ARCH_OMAP2PLUS stanza, but accidentally dropped the seleciton of
      TI_PRIV_EDMA in the process. Add it back.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      9d8812df
  10. 06 7月, 2013 5 次提交
    • A
      ARM: exynos: select PM_GENERIC_DOMAINS only when used · c1fe55e0
      Arnd Bergmann 提交于
      This fixes building exynos kernels with CONFIG_PM disabled.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      c1fe55e0
    • A
      ARM: ixp4xx: avoid circular header dependency · 39f1601c
      Arnd Bergmann 提交于
      With the new linux/reboot.h header file dependency added, we can no
      longer build ixp4xx. The easiest way to avoid that is to remove the
      inclusion of mach/hardware.h from mach/timex.h, which does not need
      that header anyway.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Imre Kaloz <kaloz@openwrt.org>
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Cc: Jason Cooper <jason@lakedaemon.net>
      39f1601c
    • A
      ARM: OMAP: omap_common_late_init may be unused · 069d0a78
      Arnd Bergmann 提交于
      Some OMAP SoCs use this function while others do not, and that
      causes a warning when building multi_v7_defconfig. Marking the
      function __maybe_unused silences the harmless warning without the
      need to add complex #ifdef logic.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Tony Lindgren <tony@atomide.com>
      069d0a78
    • A
      ARM: sti: move DEBUG_STI_UART into alphabetical order · 5562b800
      Arnd Bergmann 提交于
      This was accidentally added in the wrong place, messing
      up the ordering of the file.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5562b800
    • A
      ARM: OMAP: build mach-omap code only if needed · 59d92875
      Arnd Bergmann 提交于
      If we build a kernel with CONFIG_ARCH_OMAP2PLUS enabled but all of the
      individual SoCs disabled, we run into a large number of link errors
      because if incorrect dependencies:
      
      arch/arm/mach-omap2/built-in.o: In function `_add_initiator_dep':
      arch/arm/mach-omap2/omap_hwmod.c:691: undefined reference to `clkdm_add_sleepdep' arch/arm/mach-omap2/built-in.o: In function `_del_initiator_dep':
      arch/arm/mach-omap2/omap_hwmod.c:720: undefined reference to `clkdm_del_sleepdep' arch/arm/mach-omap2/built-in.o: In function `_enable':
      arch/arm/mach-omap2/omap_hwmod.c:2145: undefined reference to `clkdm_in_hwsup'
      arch/arm/mach-omap2/omap_hwmod.c:2147: undefined reference to `clkdm_hwmod_enable'
      arch/arm/mach-omap2/omap_hwmod.c:2191: undefined reference to `clkdm_hwmod_disable'
      arch/arm/mach-omap2/omap_hwmod.c:2146: undefined reference to `clkdm_missing_idle_reporting' arch/arm/mach-omap2/built-in.o: In function `_idle':
      arch/arm/mach-omap2/omap_hwmod.c:2235: undefined reference to `clkdm_hwmod_disable' arch/arm/mach-omap2/built-in.o: In function `_shutdown':
      arch/arm/mach-omap2/omap_hwmod.c:2338: undefined reference to `clkdm_hwmod_disable' arch/arm/mach-omap2/built-in.o: In function `omap_hwmod_get_context_loss_count':
      arch/arm/mach-omap2/omap_hwmod.c:4071: undefined reference to `pwrdm_get_context_loss_count' arch/arm/mach-omap2/built-in.o: In function `omap_pm_clkdms_setup':
      arch/arm/mach-omap2/pm.c:114: undefined reference to `clkdm_allow_idle'
      arch/arm/mach-omap2/pm.c:117: undefined reference to `clkdm_sleep' arch/arm/mach-omap2/built-in.o: In function `omap2_common_pm_late_init':
      arch/arm/mach-omap2/pm.c:294: undefined reference to `omap_voltage_late_init' arch/arm/mach-omap2/built-in.o: In function `omap2_gpio_dev_init':
      arch/arm/mach-omap2/gpio.c:133: undefined reference to `pwrdm_can_ever_lose_context'
      
      We can avoid this if we make CONFIG_ARCH_OMAP2PLUS a silent option that
      gets enabled any time that one of the SoC versions is enabled.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      59d92875