1. 02 3月, 2010 5 次提交
  2. 27 2月, 2010 4 次提交
  3. 26 2月, 2010 7 次提交
  4. 25 2月, 2010 24 次提交
    • S
      OMAP4: clock: Remove clock hacks from timer-gp.c · ad001f14
      Santosh Shilimkar 提交于
      Now the omap4 clock framework is in mainline and clk_get_rate()
      is functional. Hence reomve the hardcoded clock hacks.
      
      This patch also fixes
      Division by zero in kernel.
      Backtrace:
      [<c0025fb8>] (dump_backtrace+0x0/0x110) from [<c017febc>] (dump_stack+0x18/0x1c)
       r7:60000093 r6:c0641050 r5:c0223e78 r4:c02126b4
      [<c017fea4>] (dump_stack+0x0/0x1c) from [<c00260fc>] (__div0+0x18/0x20)
      [<c00260e4>] (__div0+0x0/0x20) from [<c01431fc>] (Ldiv0+0x8/0x10)
      [<c00318d4>] (omap_dm_timer_stop+0x0/0xb0) from [<c002c148>] (omap2_gp_timer_set_mode+0x1c/0x68)
       r5:c0223e78 r4:00000000
      [<c002c12c>] (omap2_gp_timer_set_mode+0x0/0x68) from [<c0063270>] (clockevents_set_mode+0x30/0x64)
       r5:c020cae0 r4:00000000
      [<c0063240>] (clockevents_set_mode+0x0/0x64) from [<c00632fc>] (clockevents_exchange_device+0x30/0x9c)
       r5:c020cae0 r4:c02146e0
      [<c00632cc>] (clockevents_exchange_device+0x0/0x9c) from [<c00636e0>] (tick_notify+0x17c/0x404)
       r7:00000000 r6:c0641050 r5:00000000 r4:c020cae0
      [<c0063564>] (tick_notify+0x0/0x404) from [<c005d5fc>] (notifier_call_chain+0x34/0x78)
      [<c005d5c8>] (notifier_call_chain+0x0/0x78) from [<c005d684>] (__raw_notifier_call_chain+0x1c/0x24)
      [<c005d668>] (__raw_notifier_call_chain+0x0/0x24) from [<c005d6ac>] (raw_notifier_call_chain+0x20/0x28)
      [<c005d68c>] (raw_notifier_call_chain+0x0/0x28) from [<c0062e78>] (clockevents_do_notify+0x1c/0x24)
      [<c0062e5c>] (clockevents_do_notify+0x0/0x24) from [<c0062f18>] (clockevents_register_device+0x98/0xd0)
      [<c0062e80>] (clockevents_register_device+0x0/0xd0) from [<c001a194>] (percpu_timer_setup+0x80/0x9c)
       r7:00000000 r6:00000002 r5:00000002 r4:00000003
      [<c001a114>] (percpu_timer_setup+0x0/0x9c) from [<c000e9f0>] (smp_prepare_cpus+0xb0/0xe8)
      [<c000e940>] (smp_prepare_cpus+0x0/0xe8) from [<c00084e8>] (kernel_init+0x5c/0x1fc)
       r7:00000000 r6:00000000 r5:00000000 r4:c001b8a4
      [<c000848c>] (kernel_init+0x0/0x1fc) from [<c0046c50>] (do_exit+0x0/0x604)
       r7:00000000 r6:00000000 r5:00000000 r4:00000000
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      ad001f14
    • S
      OMAP4: clock: Add dummy clock nodes for interface clocks · 7c43d547
      Santosh Shilimkar 提交于
      On OMAP4 platform the iclk control is completly under hardware control
      and no software control is available.
      
      This difference w.r.t previous OMAP's needs all the common driver
      accross OMAP's , cpu_is_xxxx() checks. To avoid poulluting the
      drivers dummy clock nodes are created (The autogeneration
      script has been updated accordingly).
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      [paul@pwsan.com: made OMAP1 dummy_ck common and edited patch to reuse that]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7c43d547
    • R
      OMAP4: clock: Rename leaf clock nodes to end with a _ick or _fck · 54776050
      Rajendra Nayak 提交于
      All leaf clock nodes are renamed for OMAP4 to have a clk name which
      end with a _ick or a _fck. This is done so that the naming convention
      is same as that followed on older OMAPs.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      54776050
    • P
      OMAP2+ clock: revise omap2_clk_{disable,enable}() · 30962d9d
      Paul Walmsley 提交于
      Simplify the code in the omap2_clk_disable() and omap2_clk_enable()
      functions, reducing levels of indentation.  This makes the code easier
      to read.  Add some additional debugging pr_debug()s here also to help
      others understand what is going on.
      
      Revise the omap2_clk_disable() logic so that it now attempts to
      disable the clock's clockdomain before recursing up the clock tree.
      Simultaneously, ensure that omap2_clk_enable() is called on parent
      clocks first, before enabling the clockdomain.  This ensures that a
      parent clock's clockdomain is enabled before the child clock's
      clockdomain.  These sequences should be the inverse of each other.
      
      Revise the omap2_clk_enable() logic so that it now cleans up after
      itself upon encountering an error.  Previously, an error enabling a
      parent clock could have resulted in inconsistent usecounts on the
      enclosing clockdomain.
      
      Remove the trivial _omap2_clk_disable() and _omap2_clk_enable() static
      functions, and replace it with the clkops calls that they were
      executing.
      
      For all this to work, the clockdomain omap2_clkdm_clk_enable() and
      omap2_clkdm_clk_disable() code must not return an error on clockdomains
      without CLKSTCTRL registers; so modify those functions to simply return 0
      in that case.
      
      While here, add some basic kerneldoc documentation on both functions,
      and get rid of some old non-CodingStyle-compliant comments that have
      existed since the dawn of time (at least, the OMAP clock framework's
      time).
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      30962d9d
    • P
      OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code · 4d30e82c
      Paul Walmsley 提交于
      The OMAP2 and OMAP3 boot-time MPU rate change code is almost
      identical.  Merge them into mach-omap2/clock.c, and add kerneldoc
      documentation.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      4d30e82c
    • P
      OMAP clockdomain: if no autodeps exist, don't try to add or remove them · ad956160
      Paul Walmsley 提交于
      _clkdm_add_autodeps() and _clkdm_del_autodeps() will attempt to dereference
      a NULL pointer if no autodeps were supplied to clkdm_init().
      
      Based on a patch from Roel Kluin <roel.kluin@gmail.com> - thanks Roel.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Roel Kluin <roel.kluin@gmail.com>
      ad956160
    • P
      OMAP hwmod: add hwmod class support · 43b40992
      Paul Walmsley 提交于
      Add support for categorizing and iterating over hardware IP blocks by
      the "class" of the IP block.  The class is the type of the IP block:
      e.g., "timer", "timer1ms", etc.  Move the OCP_SYSCONFIG/SYSSTATUS data
      from the struct omap_hwmod into the struct omap_hwmod_class, since
      it's expected to stay consistent for each class.  While here, fix some
      comments.
      
      The hwmod_class structures in this patch were designed and proposed by
      Benoît Cousson <b-cousson@ti.com> and were refined in a discussion
      between Thara Gopinath <thara@ti.com>, Kevin Hilman
      <khilman@deeprootsystems.com>, and myself.
      
      This patch uses WARN() lines that are longer than 80 characters, as
      Kevin noted a broader lkml consensus to increase greppability by
      keeping the messages all on one line.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NBenoît Cousson <b-cousson@ti.com>
      Cc: Thara Gopinath <thara@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      43b40992
    • L
      ARM: 5958/1: ARM: U300: fix inverted clk round rate · cd71f8f4
      Linus Walleij 提交于
      The clk_round_rate() functions in the U300 clocking will always
      select the lowest clocking frequency due to inverted rounding
      comparisons. Fix this.
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cd71f8f4
    • R
      ARM: 5956/1: misplaced parentheses · fcfadcaa
      Roel Kluin 提交于
      The parentheses appear misplaced.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fcfadcaa
    • H
      ARM: 5955/1: ep93xx: move timer defines into core.c and document · 1587a373
      Hartley Sweeten 提交于
      The timer defines are only used in core.c. Move them so
      they will not be globaly exposed.
      
      While here, add additional defines to document the magic
      numbers used in the registers. Also, add some comments
      for clarification.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NRyan Mallon <ryan@bluewatersys.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      1587a373
    • H
      ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c · d056ab78
      Hartley Sweeten 提交于
      The GPIO support in core.c handles the interrupt support for GPIO
      ports A, B, and F. The gpiolib implementation in gpio.c needs to
      access the function ep93xx_gpio_int_mask when a gpio pin is made
      an output and ep93xx_gpio_update_int_params in order to update
      the registers.
      
      Moving this support from core.c to gpio.c allows making the two
      functions static. It also keeps all the GPIO handling together in one
      file.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NRyan Mallon <ryan@bluewatersys.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d056ab78
    • H
      ARM: 5953/1: ep93xx: fix broken build of clock.c · ba7c6a3b
      Hartley Sweeten 提交于
      Patch 5879/1: ep93xx: define magic numbers for pll1 and pll2 broke
      the ep93xx build due to one missing rename of EP93XX_SYSCON_CLOCK_SET2.
      The correct name should be EP93XX_SYSCON_CLKSET2.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NRyan Mallon <ryan@bluewatersys.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ba7c6a3b
    • K
      ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig · d6d502fa
      Kukjin Kim 提交于
      Add ARM_L1_CACHE_SHIFT_6 to arch/arm/Kconfig to allow CPUs with
      L1 cache lines which are 64bytes to indicate this without having to
      alter the arch/arm/mm/Kconfig entry each time.
      
      Update the mm Kconfig so that ARM_L1_CACHE_SHIFT default value
      uses this and change OMAP3 and S5PC1XX to select ARM_L1_CACHE_SHIFT_6.
      Acked-by: NBen Dooks <ben-linux@fluff.org>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d6d502fa
    • P
      OMAP hwmod: convert header files with static allocations into C files · 7359154e
      Paul Walmsley 提交于
      Code should be able to #include any header file without the fear that
      the header file will go allocating memory.  This is a coding style
      issue, similar to commit 82e9bd58.
      Move the existing hwmod data from .h files to .c files.
      
      While here, convert "omap34xx" to "omap3xxx" in the hwmod files, since
      most of these structures should be reusable across all OMAP3 chips.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      7359154e
    • P
      OMAP hwmod: convert hwmod to use hardware clock names rather than clkdev dev+con · 50ebdac2
      Paul Walmsley 提交于
      The OMAP hwmod core code is intended to use SoC IP block description
      structures that are autogenerated from TI's OMAP hardware database.
      Currently the hwmod code uses clkdev device + connection addressing to
      identify clocks.  This causes problems in the hwmod autogeneration
      process, since the TI hardware database doesn't use platform_device or
      clkdev addressing; it uses a single clock signal name string, which
      tends to bear some resemblance to what is used in the OMAP TRMs.  This
      patch converts the hwmod code and existing data to use omap_clk_get_by_name(),
      introduced in the previous patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      50ebdac2
    • P
      OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code · 74be8427
      Paul Walmsley 提交于
      The OMAP hwmod core code is intended to use SoC IP block description
      structures that are autogenerated from TI's OMAP hardware database.
      Currently the hwmod code uses clkdev device + connection addressing to
      identify clocks.  This causes problems in the hwmod autogeneration
      process, since the TI hardware database doesn't use platform_device or
      clkdev addressing; it uses a single clock signal name string, which
      tends to bear some resemblance to what is used in the OMAP TRMs.  This
      patch adds a non-exported function to the OMAP clock code,
      omap_clk_get_by_name().  A subsequent patch will convert the hwmod
      code to use this function.
      
      This function is for use only by core code, and practically, no other
      code outside the hwmod code should need it.  Device driver code in the
      kernel must not use this function, which is why it is not exported.
      Drivers should use the appropriate clock alias provided by the clkdev
      data structures, so driver code can be completely SoC-independent.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      74be8427
    • V
      OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 · e8d37377
      Vimarsh Zutshi 提交于
      Add necessary clk_sel definitions to clock framework to allow changing
      dpll4_m5_ck_3630 rate. This is used by the ISP driver.
      Signed-off-by: NVimarsh Zutshi <vimarsh.zutshi@nokia.com>
      [paul@pwsan.com: updated to apply]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      e8d37377
    • P
      OMAP4 clock: drop the ALWAYS_ENABLED clock flag · 53c92d8f
      Paul Walmsley 提交于
      Get rid of the ALWAYS_ENABLED clock flag - it doesn't actually do anything.
      (The OMAP4 clock autogeneration scripts have been updated accordingly.)
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      53c92d8f
    • P
      OMAP clock: drop RATE_FIXED clock flag · 51c19541
      Paul Walmsley 提交于
      The RATE_FIXED clock flag is pointless.  In the OMAP1 clock code, it
      simply causes the omap1_clk_round_rate() function to return the
      current rate of the clock.  omap1_clk_round_rate(), however, should
      never be called for a fixed-rate clock, since none of these clocks
      have a .round_rate function pointer set in their struct clk records.
      Similarly, in the OMAP2+ clock code, the RATE_FIXED flag just causes
      the clock code to emit a warning if the OMAP clock maintainer was
      foolish enough to add a .round_rate function pointer to a fixed-rate
      clock.  "Doctor, it hurts when I pretend that a fixed-rate clock is
      rate-changeable."  "Then don't pretend that a fixed-rate clock is
      rate-changeable."  It has no functional value.  This patch drops the
      RATE_FIXED clock flag, removing it from all clocks that are so marked.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      51c19541
    • P
      OMAP2 clock: drop DELAYED_APP clock flag · 8c34974a
      Paul Walmsley 提交于
      All of the clocks that are marked with DELAYED_APP are changed as part
      of the virt_prcm_set OPP virtual clock.  On 24xx, these clocks all
      need to be changed as part of a group to keep the clock tree
      functional - hence the need for the VALID_CONFIG bit, which is not
      present on later OMAPs.  These clocks should not be rate-changed
      independently.  So prevent these clocks from being changed
      independently by dropping their .round_rate and .set_rate function
      pointers.  It then turns out that the DELAYED_APP clock flag is no
      longer useful, so drop it and the associated code and renumber the
      clock flags.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      8c34974a
    • P
      OMAP2430 clock: make func_96m_ck parent-selectable · 5173804f
      Paul Walmsley 提交于
      func_96m_ck was incorrectly marked as being rate-selectable, when in
      fact it is only parent-selectable.  Remove the .set_rate and .round_rate
      function pointers for this clk.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      5173804f
    • P
      OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files · 81b34fbe
      Paul Walmsley 提交于
      In preparation for multi-OMAP2 kernels, split
      mach-omap2/clock2xxx_data.c into mach-omap2/clock2420_data.c and
      mach-omap2/clock2430_data.c.  2430 uses a different device space
      physical memory layout than past or future OMAPs, and we use a
      different virtual memory layout as well, which causes trouble for
      architecture-level code/data that tries to support both.  We tried
      using offsets from the virtual base last year, but those patches never
      made it upstream; so after some discussion with Tony about the best
      all-around approach, we'll just grit our teeth and duplicate the
      structures.  The maintenance advantages of a single kernel config that
      can compile and boot on OMAP2, 3, and 4 platforms are simply too
      compelling.
      
      This approach does have some nice benefits beyond multi-OMAP 2 kernel
      support.  The runtime size of OMAP2420-specific and OMAP2430-specific
      kernels is smaller, since unused clocks for the other OMAP2 chip will
      no longer be compiled in.  (At some point we will mark the clock data
      __initdata and allocate it during registration, which will eliminate
      the runtime memory advantage.)  It also makes the clock trees slightly
      easier to read, since 2420-specific and 2430-specific clocks are no
      longer mixed together.
      
      This patch also splits 2430-specific clock code into its own file,
      mach-omap2/clock2430.c, which is only compiled in for 2430 builds -
      mostly for organizational clarity.
      
      While here, fix a bug in the OMAP2430 clock tree: "emul_ck" was
      incorrectly marked as being 2420-only, when actually it is present on
      both OMAP2420 and OMAP2430.
      
      Thanks to Tony for some good discussions about how to approach this
      problem.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      81b34fbe
    • P
      OMAP3/4 clock: split into per-chip family files · 657ebfad
      Paul Walmsley 提交于
      clock34xx_data.c now contains data for the OMAP34xx family, the
      OMAP36xx family, and the OMAP3517 family, so rename it to
      clock3xxx_data.c.  Rename clock34xx.c to clock3xxx.c, and move the
      chip family-specific clock functions to clock34xx.c, clock36xx.c, or
      clock3517.c, as appropriate.  So now "clock3xxx.*" refers to the OMAP3
      superset.
      
      The main goal here is to prepare to compile chip family-specific clock
      functions only for kernel builds that target that chip family.  To get to
      that point, we also need to add CONFIG_SOC_* options for those other
      chip families; that will be done in future patches, planned for 2.6.35.
      
      OMAP4 is also affected by this.  It duplicated the OMAP3 non-CORE DPLL
      clkops structure.  The OMAP4 variant of this clkops structure has been
      removed, and since there was nothing else currently in clock44xx.c, it
      too has been removed -- it can always be added back later when there
      is some content for it.  (The OMAP4 clock autogeneration scripts have been
      updated accordingly.)
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Ranjith Lohithakshan <ranjithl@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      657ebfad
    • P
      OMAP clock: drop .id field; ensure each clock has a unique name · b92c170d
      Paul Walmsley 提交于
      After the clkdev conversion, the struct clk.id field became
      superfluous, so, drop it.  Bring the clock names closer to the TRMs
      and ensure they are unique for debugfs.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b92c170d