1. 09 7月, 2012 4 次提交
  2. 06 7月, 2012 1 次提交
  3. 05 7月, 2012 2 次提交
    • V
      ARM: OMAP2+: am33xx: Change cpu_is_am33xx to soc_is_am33xx · 971b8a9c
      Vaibhav Hiremath 提交于
      As per recent discussion on the linux-omap list, we are
      moving in the direction where, we will have only architecture,
      ARCH_OMAP2PLUS and all devices/platforms will be treated
      as a SoC underneath.
      
      So the first step in this direction is to adopt this change
      for all new devices getting in, converting
      cpu_is_am33xx/335x() ==> soc_is_am33xx/335x()
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      971b8a9c
    • V
      ARM: OMAP2+: am33xx: Make am33xx as a separate class · 1c213ba1
      Vaibhav Hiremath 提交于
      Initially, we decided to make am33xx family of device to fall
      under omap3 class (cpu_is_omap34xx() = true), since it carries
      Cortex-A8 core. But while adding complete baseport support
      (like, clock, power and hwmod) support, it is observed that,
      we are creating more and more problems by treating am33xx device
      as omap3 family, as nothing matches between them
      (except cortex-A8 mpu).
      
      So,  after long discussion we have came to the conclusion that,
      we should not consider am33xx device as omap3 family, instead
      create separate class (SOC_AM33XX) under OMAP2PLUS.
      This means, for am33xx device, cpu_is_omap34xx() will return false,
      and only cpu_is_am33xx() will be true.
      
      Please refer to the link below, for mailing-list discussion on this -
      
      http://www.spinics.net/lists/linux-omap/msg69439.htmlSigned-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      [tony@atomide.com: fixed typo, updated for soc_is changes]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1c213ba1
  4. 04 7月, 2012 4 次提交
  5. 19 6月, 2012 3 次提交
  6. 14 6月, 2012 8 次提交
    • J
      ARM: OMAP2+: Move dmtimer clock set function to dmtimer driver · 2b2d3523
      Jon Hunter 提交于
      OMAP1 uses an architecture specific function for setting the dmtimer clock
      source, where as the OMAP2+ devices use the clock framework. Eventually OMAP1
      device should also use the clock framework and hence we should not any
      architecture specific functions.
      
      For now move the OMAP2+ function for configuring the clock source into the
      dmtimer driver. Therefore, we do no longer need to specify an architecture
      specific function for setting the clock source for OMAP2+ devices. This will
      simplify device tree migration of the dmtimers for OMAP2+ devices.
      
      From now on, only OMAP1 devices should specify an architecture specific
      function for setting the clock source via the platform data set_dmtimer_src()
      function pointer.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      2b2d3523
    • J
      ARM: OMAP: Add flag to indicate if a timer needs a manual reset · 6615975b
      Jon Hunter 提交于
      For OMAP1 devices, it is necessary to perform a manual reset of the timer.
      Currently, this is indicating by setting the "needs_manual_reset" variable in
      the platform data. Instead of using an extra variable to indicate this add a new
      timer capabilities flag to indicate this and remove the "needs_manual_reset"
      member from the platform data.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      6615975b
    • J
      ARM: OMAP: Remove timer function pointer for context loss counter · 0b30ec1c
      Jon Hunter 提交于
      For OMAP2+ devices, a function pointer that returns the number of times a timer
      power domain has lost context is passed to the dmtimer driver. This function
      pointer is only populated for OMAP2+ devices and it is pointing to a platform
      function. Given that this is a platform function, we can simplify the code by
      removing the function pointer and referencing the function directly. We can use
      the OMAP_TIMER_ALWON flag to determine if we need to call this function for
      OMAP1 and OMAP2+ devices.
      
      The benefit of this change is the we can remove the function pointer from the
      platform data and simplifies the dmtimer migration to device-tree.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      0b30ec1c
    • J
      ARM: OMAP: Remove loses_context variable from timer platform data · 1c2d076b
      Jon Hunter 提交于
      The platform data variable loses_context is used to determine if the timer may
      lose its logic state during power transitions and so needs to be restored. This
      information is also provided in the HWMOD device attributes for OMAP2+ devices
      via the OMAP_TIMER_ALWON flag. When this flag is set the timer will not lose
      context. So use the HWMOD device attributes to determine this.
      
      For OMAP1 devices, loses_context is never set and so set the OMAP_TIMER_ALWON
      flag for OMAP1 timers to ensure that code is equivalent.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1c2d076b
    • J
      ARM: OMAP2+: Fix external clock support for dmtimers · 67d2e760
      Jon Hunter 提交于
      Currently, the dmtimer determines whether an timer can support an external
      clock source (sys_altclk) for driving the timer by the IP version. Only
      OMAP24xx devices can support an external clock source, but the IP version
      between OMAP24xx and OMAP3xxx is common and so this incorrectly indicates
      that OMAP3 devices can use an external clock source.
      
      Rather than use the IP version, just let the clock framework handle this.
      If the "alt_ck" does not exist for a timer then the clock framework will fail
      to find the clock and hence will return an error. By doing this we can eliminate
      the "timer_ip_version" variable passed as part of the platform data and simplify
      the code.
      
      We can also remove the timer IP version from the HWMOD data because the dmtimer
      driver uses the TIDR register to determine the IP version.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      67d2e760
    • J
      ARM: OMAP: Add DMTIMER capability variable to represent timer features · d1c1691b
      Jon Hunter 提交于
      Although the OMAP timers share a common hardware design, there are some
      differences between the timer instances in a given device. For example, a timer
      maybe in a power domain that can be powered-of, so can lose its logic state and
      need restoring where as another may be in power domain that is always be on.
      Another example, is a timer may support different clock sources to drive the
      timer. This information is passed to the dmtimer via the following platform data
      structure.
      
      struct dmtimer_platform_data {
      	int (*set_timer_src)(struct platform_device *pdev, int source);
      	int timer_ip_version;
      	u32 needs_manual_reset:1;
      	bool loses_context;
      	int (*get_context_loss_count)(struct device *dev);
      };
      
      The above structure uses multiple variables to represent the timer features.
      HWMOD also stores the timer capabilities using a bit-mask that represents the
      features supported. By using the same format for representing the timer
      features in the platform data as used by HWMOD, we can ...
      
      1. Use the flags defined in the plat/dmtimer.h to represent the features
         supported.
      2. For devices using HWMOD, we can retrieve the features supported from HWMOD.
      3. Eventually, simplify the platform data structure to be ...
      
      struct dmtimer_platform_data {
      	int (*set_timer_src)(struct platform_device *pdev, int source);
      	u32 timer_capability;
      }
      
      Another benefit from doing this, is that it will simplify the migration of the
      dmtimer driver to device-tree. For example, in the current OMAP2+ timer code the
      "loses_context" variable is configured at runtime by calling an architecture
      specific function. For device tree this creates a problem, because we would need
      to call the architecture specific function from within the dmtimer driver.
      However, such attributes do not need to be queried at runtime and we can look up
      the attributes via HWMOD or device-tree.
      
      This changes a new "capability" variable to the platform data and timer
      structure so we can start removing and simplifying the platform data structure.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      d1c1691b
    • J
      ARM: OMAP2+: Add dmtimer platform function to reserve systimers · b7b4ff76
      Jon Hunter 提交于
      During early boot, one or two dmtimers are reserved by the kernel as system
      timers (for clocksource and clockevents). These timers are marked as reserved
      and the dmtimer driver is notified which timers have been reserved via the
      platform data information.
      
      For OMAP2+ devices the timers reserved may vary depending on device and compile
      flags. Therefore, it is not easy to assume which timers we be reserved for the
      system timers. In order to migrate the dmtimer driver to support device-tree we
      need a way to pass the timers reserved for system timers to the dmtimer driver.
      Using the platform data structure will not work in the same way as it is
      currently used because the platform data structure will be stored statically in
      the dmtimer itself and the platform data will be selected via the device-tree
      match device function (of_match_device).
      
      There are a couple ways to workaround this. One option is to store the system
      timers reserved for the kernel in the device-tree and query them on boot.
      The downside of this approach is that it adds some delay to parse the DT blob
      to search for the system timers. Secondly, for OMAP3 devices we have a
      dependency on compile time flags and the device-tree would not be aware of that
      kernel compile flags and so we would need to address that.
      
      The second option is to add a function to the dmtimer code to reserved the
      system timers during boot and so the dmtimer knows exactly which timers are
      being used for system timers. This also allows us to remove the "reserved"
      member from the timer platform data. This seemed like the simpler approach and
      so was implemented here.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b7b4ff76
    • J
      ARM: OMAP: Remove unnecessary clk structure · b8fd7331
      Jon Hunter 提交于
      In the plat/dmtimer.h there is a structure named "clk" declared. This structure
      is not used and appears to be left over from previous code. Hence, remove this
      unused structure.
      
      Verified that both omap1 and omap2plus kernel configurations build with this
      change.
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b8fd7331
  7. 06 6月, 2012 1 次提交
  8. 05 6月, 2012 1 次提交
  9. 04 6月, 2012 1 次提交
    • T
      ARM: OMAP: Make FS USB omap1 only · b924b204
      Tony Lindgren 提交于
      As the FS USB code is not being actively used for omap2+
      there's no point keeping it around for omap2+.
      
      Let's make the FS USB platform init code omap1 only so
      we can remove the last user of omap_read/write for omap2+,
      and simplify things for further USB, DMA, and device tree
      related work.
      
      While at it, also group the mach includes for the related
      drivers.
      
      Cc: linux-usb@vger.kernel.org
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b924b204
  10. 26 5月, 2012 1 次提交
  11. 14 5月, 2012 1 次提交
    • I
      ARM: OMAP3: gpmc: add BCH ecc api and modes · 8d602cf5
      Ivan Djelic 提交于
      This patch adds a simple BCH ecc computation api, similar to the
      existing Hamming ecc api. It is intended to be used by the MTD layer.
      It implements the following features:
      
      - support 4-bit and 8-bit ecc computation
      - do not protect user bytes in spare area, only data area is protected
      - ecc for an erased NAND page (0xFFs) is also a sequence of 0xFFs
      
      This last feature is obtained by adding a constant polynomial to
      the hardware computed ecc. It allows to correct bitflips in blank pages
      and is extremely useful to support filesystems such as UBIFS, which expect
      erased pages to contain only 0xFFs.
      
      This api has been tested on an OMAP3630 board.
      
      Artem: The OMAP maintainer Tony Lindgren gave us his blessing for merging
      this patch via the MTD tree.
      Signed-off-by: NIvan Djelic <ivan.djelic@parrot.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      8d602cf5
  12. 12 5月, 2012 2 次提交
  13. 11 5月, 2012 2 次提交
  14. 10 5月, 2012 3 次提交
    • T
      ARM: OMAP: Move omap_mmc_add() to mach-omap1 · 5ff391d8
      Tony Lindgren 提交于
      Now that omap2420 is using hwmod for MMC, this code is omap1
      only used on omap1.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      5ff391d8
    • C
      33ee0db5
    • V
      ARM: OMAP: Make OMAP clocksource source selection using kernel param · 1fe97c8f
      Vaibhav Hiremath 提交于
      Current OMAP code supports couple of clocksource options based
      on compilation flag (CONFIG_OMAP_32K_TIMER). The 32KHz sync-timer
      and a gptimer which can run on 32KHz or system clock (e.g 38.4 MHz).
      So there can be 3 options -
      
      1. 32KHz sync-timer
      2. Sys_clock based (e.g 13/19.2/26/38.4 MHz) gptimer
      3. 32KHz based gptimer.
      
      The optional gptimer based clocksource was added so that it can
      give the high precision than sync-timer, so expected usage was 2
      and not 3.
      Unfortunately option 2, clocksource doesn't meet the requirement of
      free-running clock as per clocksource need. It stops in low power states
      when sys_clock is cut. That makes gptimer based clocksource option
      useless for OMAP2/3/4 devices with sys_clock as a clock input.
      So, in order to use option 2, deeper idle state MUST be disabled.
      
      Option 3 will still work but it is no better than 32K sync-timer
      based clocksource.
      
      We must support both sync timer and gptimer based clocksource as
      some OMAP based derivative SoCs like AM33XX does not have the
      sync timer.
      
      Considering above, make sync-timer and gptimer clocksource runtime
      selectable so that both OMAP and AMXXXX continue to use the same code.
      
      And, in order to precisely configure/setup sched_clock for given
      clocksource, decision has to be made early enough in boot sequence.
      
      So, the solution is,
      
      Use standard kernel parameter ("clocksource=") to override
      default 32k_sync-timer, in addition to this, we also use hwmod database
      lookup mechanism, through which at run-time we can identify availability
      of 32k-sync timer on the device, else fall back to gptimer.
      
      Also, moved low-level SoC specific init code to respective files,
      (mach-omap1/timer32k.c and mach-omap2/timer.c)
      Signed-off-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1fe97c8f
  15. 09 5月, 2012 2 次提交
  16. 08 5月, 2012 3 次提交
  17. 20 4月, 2012 1 次提交