1. 24 9月, 2012 12 次提交
    • P
      ARM: OMAP3: hwmod data: add mmu data for iva and isp · 5486474c
      Paul Walmsley 提交于
      Add mmu hwmod data for iva and isp.
      
      Due to compatibility an ifdef CONFIG_OMAP_IOMMU_IVA2 needs to be
      propagated (previously on iommu resource info) to hwmod data in OMAP3,
      so users of iommu and tidspbridge can avoid issues of two modules
      managing mmu data/irqs/resets; this until tidspbridge can be migrated
      to iommu framework.
      
      Cc: Benoit Cousson <b-cousson@ti.com>
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      [paul@pwsan.com: fixed some kerneldoc and whitespace; ISP MMUs not present
       on AM35xx so restricted these hwmods to 34xx/36xx]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      5486474c
    • P
      ARM: OMAP4: hwmod data: add missing HWMOD_NO_IDLEST flags to some PRCM IP blocks · 53cce97c
      Paul Walmsley 提交于
      Some struct omap_hwmod records belonging to PRCM IP blocks are missing
      HWMOD_NO_IDLEST flags; add them.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      53cce97c
    • K
      ARM: OMAP4: hwmod data: make *phy_48m* as the main_clk of ocp2scp · 1b024d2f
      Kishon Vijay Abraham I 提交于
      Made *ocp2scp_usb_phy_phy_48m* as the main_clk for ocp2scp.
      Since this ocp2scp module does not have any fck but does have a
      single opt_clock, it is added as the main_clk for ocp2scp. Also
      removed phy_48m as the optional clock since it is now made as the
      main clock. By this the driver need not enable/disable phy_48m clk
      separately and runtime_get/runtime_put will take care of that.
      
      Cc: Benoît Cousson <b-cousson@ti.com>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Acked-by: NBenoît Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      1b024d2f
    • B
      ARM: OMAP4: hwmod data: Fix ocp2scp_usb_phy and usb_host_hs entries · 33c976ec
      Benoit Cousson 提交于
      ocp2scp_usb_phy was missing the address space data and thus
      the sysconfig was not populated either.
      The usb_host_hs address space was wrong.
      
      Fix both of them and add the missing sysconfig entry.
      Reported-by: NKishon Vijay Abraham <kishon@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      33c976ec
    • T
      ARM: OMAP3: hwmod data: add sad2d hwmod · 8f993a01
      Tero Kristo 提交于
      SAD2D stands for the die to die interface, and is used for communicating
      with the optional stacked modem. This hwmod is added in preparation for
      the d2d_idle move from pm34xx.c to hwmod data.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      [paul@pwsan.com: SAD2D presumably doesn't exist on non-OMAP34xx/OMAP36xx,
       so only add it to the OMAP34xx/OMAP36xx lists]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      8f993a01
    • O
      ARM: OMAP: hwmod: revise deassert sequence · e8e96dff
      Omar Ramirez Luna 提交于
      For a reset sequence to complete cleanly, a module needs its
      associated clocks to be enabled, otherwise the timeout check
      in prcm code can print a false failure (failed to hardreset)
      that occurs because the clocks aren't powered ON and the status
      bit checked can't transition without them.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e8e96dff
    • O
      ARM: OMAP: hwmod: partially un-reset hwmods might not be properly enabled · eb05f691
      Omar Ramirez Luna 提交于
      Some IP blocks might not be using/controlling more than one
      reset line, this check loosens the restriction to fully use
      hwmod framework for those drivers.
      
      E.g.: ipu has reset lines: mmu_cache, cpu0 and cpu1.
      - As of now cpu1 is not used and hence (with previous check) the
        IP block isn't fully enabled by hwmod code.
      - Usually ipu and dsp processors configure their mmu module first
        and then enable the processors, this involves:
          * Deasserting mmu reset line, and enabling the module.
          * Deasserting cpu0 reset line, and enabling the processor.
        The ones portrayed in this example are controlled through
        rproc_fw_boot in drivers/remoteproc/remoteproc_core.c
      
      While at it, prevent _omap4_module_disable if all the hardreset
      lines on an IP block are not under reset.
      
      This will allow the driver to:
        a. Deassert the reset line.
        b. Enable the hwmod through runtime PM default callbacks.
        c. Do its usecase.
        d. Disable hwmod through runtime PM.
        e. Assert the reset line.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      eb05f691
    • T
      ARM: OMAP4: hwmod: flag hwmods/modules not supporting module level context status · 46b3af27
      Tero Kristo 提交于
      On OMAP4 most modules/hwmods support module level context status. On
      OMAP3 and earlier, we relied on the power domain level context status.
      Identify all modules that don't support 'context_offs' by adding a
      flag bit, HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT.  Rest have a valid
      'context_offs' populated in .prcm structure already.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      [paul@pwsan.com: add flag bit rather than overloading .context_offs;
       update changelog message]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      46b3af27
    • T
      ARM: OMAP4: hwmod data: add support for lostcontext_mask · ce80979a
      Tero Kristo 提交于
      Currently hwmod only provides the offset for the context lose
      register, and if we attempt to share the same register between two or
      more hwmods, the resulting context loss counts get wrong. Thus, we
      need a way to specify which bits are used for the context loss
      information for each.  This is accomplished by adding a new field to
      the omap4 prcm struct, 'lostcontext_mask', which specifies a bit-mask
      to use for filtering the register.
      
      Mark the affected hwmods appropriately.  'l4_abe' hwmod uses the
      LOSTMEM_AESSMEM bit of RM_ABE_AESS_CONTEXT register, as l4_abe doesn't
      have its own dedicated register for this purpose. This register is
      shared with 'aess' hwmod, thus both hwmods must also specify which
      bits of the register are used for them.
      
      This patch only adds the hwmod data, but a future patch should add
      code support such that only the specified bits are read and cleared by
      the context lose counter update code. If a hwmod doesn't specify
      'lostcontext_mask' (default behavior), the whole contents of the
      context register should be used without any filtering.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      [paul@pwsan.com: updated to apply after conversion to use flag bit for
       missing module context-loss register; combined data and code patches;
       dropped code change due to serial driver breakage]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ce80979a
    • T
      ARM: OMAP4: powerdomain: add support for reading prev logic and mem states · 5b8a14be
      Tero Kristo 提交于
      On OMAP4, there is no support to read previous logic state
      or previous memory state achieved when a power domain transitions
      to RET. Instead there are module level context registers.
      
      In order to support the powerdomain level logic/mem_off_counters
      on OMAP4, instead use the previous power state achieved (RET) and
      the *programmed* logic/mem RET state to derive if a powerdomain lost
      logic or did not.
      
      If the powerdomain is programmed to enter RET state and lose logic
      in RET state, knowing that the powerdomain entered RET is good enough
      to derive that the logic was lost as well, in such cases.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      [paul@pwsan.com: removed dependency on functional power state series for now;
       bumped copyright date]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      5b8a14be
    • P
      ARM: OMAP2+: hwmod code: convert missing clockdomain warnings to debug messages · 3bb05dbf
      Paul Walmsley 提交于
      The decision was made a few months ago to allow struct omap_hwmod
      records and struct clk records to omit clockdomain information if the
      clockdomain is not software-controllable.  See for example commit
      868c157d ("ARM: OMAP2+: hwmod: remove
      prm_clkdm, cm_clkdm; allow hwmods to have no clockdomain").
      
      So convert an existing pr_warning() to a pr_debug() (regarding missing
      clockdomains in clocks), and add a pr_debug() for missing hwmod
      clockdomains.  It's still useful to enable these messages for
      debugging, since missing clockdomains can cause hard-to-debug problems
      with power management; see for example commit
      6c4a057b ("ARM: OMAP4: clock data:
      Force a DPLL clkdm/pwrdm ON before a relock").
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      3bb05dbf
    • P
      ARM: OMAP4+: hwmod code: remove clkdm requirement in _omap4_wait_target_*() · 2b026d13
      Paul Walmsley 提交于
      We're no longer requiring struct omap_hwmod records to contain a
      clockdomain.  So we shouldn't return -EINVAL any more from
      _omap4_wait_target_disable() or _omap4_wait_target_ready() if there's
      no clockdomain defined, since that just gets passed back to the
      caller.  This can result in pointless warnings under the relaxed data
      format.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      2b026d13
  2. 23 9月, 2012 11 次提交
    • V
      ARM: AM33XX: cm: Add bit-field width values · a86c0b98
      Vaibhav Hiremath 提交于
      The new common clk framework includes basic definitions for mux and
      divider clocks.  These definitions depend on shift and width values
      instead of the pre-computed masks that the OMAP/AM33XX clk framework
      has traditionally used when accessing the register to control the
      mux or divisor.
      
      To ease this transition the masks are left intact and
      the width field is simply added alongside the shift and mask data.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a86c0b98
    • M
      ARM: OMAP4: cm: add bitfield width values · f19a3022
      Mike Turquette 提交于
      The new common clk framework includes basic definitions for mux and
      divider clocks.  These definitions depend on shift and width values
      instead of the pre-computed masks that the OMAP clk framework has
      traditionally used when accessing the register to control the mux or
      divisor.
      
      To ease this transition the masks are left intact and the width field is
      simply added alongside the shift and mask data.
      Signed-off-by: NMike Turquette <mturquette@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      f19a3022
    • R
      ARM: OMAP2+: clock: Remove all direct dereferencing of struct clk · 5dcc3b97
      Rajendra Nayak 提交于
      While we move to Common Clk Framework (CCF), direct deferencing of struct
      clk wouldn't be possible anymore. Hence get rid of all such instances
      in the current clock code and use macros/helpers similar to the ones that
      are provided by CCF.
      
      While here also concatenate some strings split across multiple lines
      which seem to be needed anyway.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: simplified some compound expressions; reformatted some
       messages]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      5dcc3b97
    • R
      ARM: OMAP2+: hwmod: get rid of all omap_clk_get_by_name usage · 6ea74cb9
      Rajendra Nayak 提交于
      Moving to Common clk framework for OMAP would mean we no longer use
      internal lookup mechanism like omap_clk_get_by_name().
      get rid of all its usage mostly from hwmod and omap_device
      code.
      
      Moving to clk_get() also means the respective platforms
      need the clkdev tables updated with an entry for all clocks
      used by hwmod to have clock name same as the alias.
      
      Based on original changes from Mike Turquette.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      [paul@pwsan.com: removed IS_ERR_OR_NULL() conversion (rmk comment);
       restricted omap_96m_alwon_fck_3630 to OMAP36xx; added missing AM35xx
       clock aliases for emac_fck, emac_ick, vpfe_ick, vpfe_fck; added
       aliases rng_ick and several emulation clocks]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6ea74cb9
    • R
      ARM: omap: clk: add clk_prepare and clk_unprepare · 4d7cb45e
      Rajendra Nayak 提交于
      As part of Common Clk Framework (CCF) the clk_enable() operation
      was split into a clk_prepare() which could sleep, and a clk_enable()
      which should never sleep. Similarly the clk_disable() was
      split into clk_disable() and clk_unprepare(). This was
      needed to handle complex cases where in a clk gate/ungate
      would require a slow and a fast part to be implemented.
      None of the clocks below seem to be in the 'complex' clocks
      category and are just simple clocks which are enabled/disabled
      through simple register writes.
      Most of the instances also seem to be called in non-atomic
      context which means its safe to move all of those from
      using a clk_enable() to clk_prepare_enable() and clk_disable() to
      clk_disable_unprepare().
      
      For some others, mainly the ones handled through the hwmod framework
      there is a possibility that they get called in either an atomic
      or a non-atomic context.
      
      The way these get handled below work only as long as clk_prepare
      is implemented as a no-op (which is the case today) since this gets
      called very early at boot while most subsystems are unavailable.
      Hence these are marked with a *HACK* comment, which says we need
      to re-visit these once we start doing something meaningful with
      clk_prepare/clk_unprepare like doing voltage scaling or something
      that involves i2c.
      
      This is in preparation of OMAP moving to CCF.
      
      Based on initial changes from Mike Turquette.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4d7cb45e
    • J
      ARM: OMAP4: Add timer clock aliases for device-tree · fabcf41f
      Jon Hunter 提交于
      For OMAP4, the dmtimers are located in the Wake-up, ABE and Peripheral (PER)
      power domains. Hence, when the dmtimer is configured to use the "timer_sys_ck"
      as its functional clock the actual clock used is different depending on whether
      the clock is in the Wake-up, ABE or PER domain. So when we look-up the dmtimer's
      "timer_sys_ck" we need to specify the timer device name as well as clock alias
      to find the right clock.
      
      Currently, the device names for the timers have the format "omap_timer.X" where
      X is the timer instance number. When using to device tree, the format of the
      device name created by device-tree is different and has the format
      "<reg-address>.<device-name>" (this is assuming that the device-tree "reg"
      property is specified). This causes the look-up for the OMAP4 "timer_sys_ck" to
      fail. To fix this add new timer clock alias for using device-tree.
      
      Please note that adding a 2nd set of clock aliases for the same clocks to only
      temporary until device-tree migration is complete. Then we can remove the legacy
      aliases. Hence, I have marked the legacy aliases with a "TODO" to remove them.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      fabcf41f
    • A
      ARM: OMAP2+: AM33XX: clock data: Add clkdev alias for cpu0 · 4236bd0d
      AnilKumar Ch 提交于
      Add AM335x cpu0 clock entry to the corresponding clock data file. This
      is useful in getting the correct mpu clock pointer to change the cpu
      frequency in cpufreq driver.
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      [paul@pwsan.com: changed patch subject]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4236bd0d
    • P
      ARM: OMAP2+: clock data: add some aliases for use by CPUFreq only · c810fde2
      Paul Walmsley 提交于
      These clkdev aliases should make it possible to remove the
      cpu_is_omap*() calls and the omap_device*() call from
      drivers/cpufreq/omap-cpufreq.c during the next merge window.  Those
      are interfering with multi-subarch ARM kernels.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NKevin Hilman <khilman@ti.com>
      c810fde2
    • P
      ARM: OMAP3: clock data: Add the USB TLL clocks device name · 8fde3afb
      Paul Walmsley 提交于
      The platform device name "usbhs_tll" is added for the functional,
      interface and channel clocks of the TLL module.
      Signed-off-by: NKeshava Munegowda <keshava_mgowda@ti.com>
      Reviewed-by: NPartha Basak <parthab@india.ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      8fde3afb
    • J
      ARM: OMAP2420: Cosmetic fix for timer clock aliases · f84c3782
      Jon Hunter 提交于
      In commit c59b537d (ARM: OMAP2+: Simplify dmtimer clock aliases) new clock
      aliases were added for OMAP2+ devices. For OMAP2420, I incorrectly set the
      clock flag as CK_243X instead of CK_242X. This did not introduce a regression
      as the clock flags are not checked for OMAP2 devices. This also explains why
      I did not catch this when testing on OMAP2420.
      
      Fix the clock flags for these aliases for correctness.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      f84c3782
    • M
      ARM: OMAP3: clock data: remove obsolete comment · e5e70453
      Michael Jones 提交于
      The file is currently called 'clock3xxx_data.c', so this comment is
      out of date.
      Signed-off-by: NMichael Jones <michael.jones@matrix-vision.de>
      [paul@pwsan.com: wrote changelog]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e5e70453
  3. 18 9月, 2012 2 次提交
  4. 13 9月, 2012 10 次提交
  5. 12 9月, 2012 4 次提交
    • P
      ARM: OMAP: unwrap strings · 7852ec05
      Paul Walmsley 提交于
      Find and unwrap wrapped strings in the style:
      
      	pr_debug("clockdomain: hardware cannot set/clear wake up of "
      		 "%s when %s wakes up\n", clkdm1->name, clkdm2->name);
      
      Keeping these strings contiguous seems to be the current Linux kernel
      policy.
      
      The offending lines were found with the following command:
      
          pcregrep -rnM '"\s*$\s*"' arch/arm/*omap*
      
      While here, some messages have been clarified, some pr_warning(
      ... calls have been converted to pr_warn( ..., and some printk(KERN_*
      ... have been converted to pr_*.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7852ec05
    • P
      ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ... · a032d33b
      Paul Walmsley 提交于
      Resolve the following warnings from smatch:
      
      arch/arm/mach-omap2/gpmc.c:282 gpmc_cs_set_timings() info: why not propagate 'div' from gpmc_cs_calc_divider() instead of -1?
      arch/arm/mach-omap2/serial.c:328 omap_serial_init_port() error: 'pdev' dereferencing possible ERR_PTR()
      arch/arm/mach-omap2/timer.c:213 omap2_gp_clockevent_init() Error invalid range 4096 to -1
      arch/arm/mach-omap2/gpio.c:63 omap2_gpio_dev_init() warn: possible memory leak of 'pdata'
      arch/arm/mach-omap2/omap_hwmod.c:1478 _assert_hardreset() warn: assigning -22 to unsigned variable 'ret'
      arch/arm/mach-omap2/omap_hwmod.c:1487 _assert_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
      arch/arm/mach-omap2/omap_hwmod.c:1545 _read_hardreset() warn: assigning -22 to unsigned variable 'ret'
      arch/arm/mach-omap2/omap_hwmod.c:1554 _read_hardreset() warn: 4294963201 is more than 255 (max '(ret)' can be) so this is always the same.
      arch/arm/mach-omap2/dpll3xxx.c:629 omap3_clkoutx2_recalc() error: we previously assumed 'pclk' could be null (see line 627)
      arch/arm/mach-omap2/board-n8x0.c:422 n8x0_mmc_late_init() Error invalid range 14 to 13
      arch/arm/mach-omap1/leds-h2p2-debug.c:71 h2p2_dbg_leds_event() error: potentially derefencing uninitialized 'fpga'.
      arch/arm/plat-omap/mux.c:79 omap_cfg_reg() Error invalid range 4096 to -1
      
      Thanks to Tony Lindgren <tony@atomide.com> for pointing out that BUG()
      can be disabled.  The changes in the first version that removed the
      subsequent return() after BUG() states have been dropped.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      a032d33b
    • V
      ARM: OMAP3+: hwmod: Add AM33XX HWMOD data · a2cfc509
      Vaibhav Hiremath 提交于
      This patch adds HWMOD data for all the peripherals of
      AM335X device and also hooks up to the existing OMAP framework.
      
      hwmod data has been already been cleaned up for the recent
      changes in clocktree, where all leaf nodes have been removed,
      since with modulemode based control, both clock and hwmod
      interface does same thing. This reduces the code size to large
      extent and also avoids duplication of same control.
      So instead of specifying module's leaf node as a main_clk,
      now we are relying on parent clock of module's functional clock.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Signed-off-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      [paul@pwsan.com: removed period in hwmod device names; changed mmc2 main_clk
       to mmc_clk at Vaibhav's request; added trailing commas to structure
       records at Tony's request to deal with some rmk parsing issues; added
       OMAP_INTC_START to facilitate sparse-IRQ conversion]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      a2cfc509
    • V
      ARM: OMAP2+: hwmod: Hook-up am33xx support in omap_hwmod framework · 1688bf19
      Vaibhav Hiremath 提交于
      AM33XX PRCM architecture is different that any OMAP family
      of devices, so it is required to have separate implementation
      to handle AM33XX module enable/disable, reset assert/deassert
      functionality.
      This patch adds wrapper api's in omap_hwmod framework to
      access prm/cm for AM33XX family of devices.
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      [paul@pwsan.com: fixed checkpatch messages]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      1688bf19
  6. 11 9月, 2012 1 次提交