1. 10 7月, 2011 12 次提交
  2. 01 6月, 2011 1 次提交
  3. 12 3月, 2011 1 次提交
  4. 10 3月, 2011 6 次提交
  5. 01 3月, 2011 5 次提交
    • P
      OMAP2+: hwmod: add ability to setup individual hwmods · a2debdbd
      Paul Walmsley 提交于
      Add omap_hwmod_setup_one(), which is intended for use early in boot to
      selectively setup the hwmods needed for system clocksources and
      clockevents, and any other hwmod that is needed in early boot.
      omap_hwmod_setup_all() can then be called later in the boot process.
      The point is to minimize the amount of code that needs to be run
      early.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      a2debdbd
    • P
      OMAP2+: hwmod: ignore attempts to re-setup a hwmod · 48d54f3f
      Paul Walmsley 提交于
      Previously, if a hwmod had already been set up, and the code attempted
      to set up the hwmod again, an error would be returned.  This is not
      really useful behavior if we wish to allow the OMAP core code to setup
      the hwmods needed for the Linux clocksources and clockevents before
      the rest of the hwmods are setup.  So, instead of generating errors,
      just ignore the attempt to re-setup the hwmod.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      48d54f3f
    • P
      OMAP2+: hwmod: find MPU initiator hwmod during in _register() · 569edd70
      Paul Walmsley 提交于
      Move the code that looks for the MPU initiator hwmod to run during
      the individual hwmod _register() function.  (Previously, it ran after
      all hwmods were registered in the omap_hwmod_late_init() function.)
      
      This is done so code can late-initialize a few individual hwmods --
      for example, for the system timer -- before the entire set of hwmods is
      initialized later in boot via omap_hwmod_late_init().
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      569edd70
    • P
      OMAP2+: hwmod: rename some init functions · 550c8092
      Paul Walmsley 提交于
      Rename omap_hwmod_init() to omap_hwmod_register().  Rename
      omap_hwmod_late_init() to omap_hwmod_setup_all().  Also change all of
      the callers to reflect the new names.  While here, update some
      copyrights.
      
      Suggested by Tony Lindgren <tony@atomide.com>.
      
      N.B. The comment in mach-omap2/serial.c may no longer be correct, given
           recent changes in init order.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      550c8092
    • P
      OMAP2+: hwmod: allow multiple calls to omap_hwmod_init() · bac1a0f0
      Paul Walmsley 提交于
      There's no longer any reason why we should prevent multiple
      calls to omap_hwmod_init().  It is now simply used to register an
      array of hwmods.
      
      This should allow a subset of hwmods (e.g., hwmods
      handling the system clocksource and clockevents) to be registered
      earlier than the remaining mass of hwmods.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      bac1a0f0
  6. 25 2月, 2011 1 次提交
  7. 15 2月, 2011 2 次提交
  8. 23 12月, 2010 1 次提交
  9. 22 12月, 2010 11 次提交
    • K
      OMAP: PM: implement context loss count APIs · c80705aa
      Kevin Hilman 提交于
      Implement OMAP PM layer omap_pm_get_dev_context_loss_count() API by
      creating similar APIs at the omap_device and omap_hwmod levels.  The
      omap_hwmod level call is the layer with access to the powerdomain
      core, so it is the place where the powerdomain is queried to get the
      context loss count.
      
      The new APIs return an unsigned value that can wrap as the
      context-loss count grows.  However, the wrapping is not important as
      the role of this function is to determine context loss by checking for
      any difference in subsequent calls to this function.
      
      Note that these APIs at each level can return zero when no context
      loss is detected, or on errors.  This is to avoid returning error
      codes which could potentially be mistaken for large context loss
      counters.
      
      NOTE: only works for devices which have been converted to use
            omap_device/omap_hwmod.
      
      Longer term, we could possibly remove this API from the OMAP PM layer,
      and instead directly use the omap_device level API.
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      c80705aa
    • B
      OMAP2+: hwmod: Add wakeup support for new OMAP4 IPs · 86009eb3
      Benoit Cousson 提交于
      The new OMAP4 IPs introduced a new idle mode named smart-idle with wakeup.
      
      This new idlemode replaces the enawakeup for the new IPs but seems to
      coexist as well for some legacy IPs (UART, GPIO, MCSPI...)
      
      Add the new SIDLE_SMART_WKUP flag to mark the IPs that support this
      capability.
      The omap_hwmod_44xx_data.c will have to be updated to add this new flag.
      
      Enable this new mode when applicable in _enable_wakeup, _enable_sysc and
      _idle_sysc.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Tested-by: NSebastien Guiriec <s-guiriec@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      86009eb3
    • R
      OMAP2+: hwmod: Disable clocks when hwmod enable fails · f2dd7e09
      Rajendra Nayak 提交于
      In cases where a module (hwmod) does not become accesible on enabling
      the main clocks (can happen if there are external clocks needed
      for the module to become accesible), make sure the clocks are not
      left enabled.
      This ensures that when the requisite external dependencies are met
      a omap_hwmod_enable and omap_hwmod_idle/shutdown would rightly enable
      and disable clocks using clk framework. Leaving the clocks enabled in
      the error case causes additional usecounting at the clock framework
      level leaving the clock enabled forever.
      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>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      f2dd7e09
    • B
      OMAP2+: hwmod: Remove omap_hwmod_mutex · ce35b244
      Benoit Cousson 提交于
      The hwmod list will be built are init time and never
      be modified at runtime. There is no need anymore to protect
      the list from concurrent accesses using a mutex.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      ce35b244
    • B
      OMAP2+: hwmod: Mark functions used only during initialization with __init · 01592df9
      Benoit Cousson 提交于
      _register, _find_mpu_port_index and _find_mpu_rt_base are static APIs
      that will be used only during the omap_hwmod initialization phase.
      There is no need to keep them for runtime.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      01592df9
    • B
      OMAP2+: hwmod: Make omap_hwmod_register private and remove omap_hwmod_unregister · 0102b627
      Benoit Cousson 提交于
      Do not allow omap_hwmod_register to be used outside the core
      hwmod code. An omap_hwmod should be registered only at init time.
      Remove the omap_hwmod_unregister that is not used today since the
      hwmod list will be built once at init time and never be modified
      at runtime.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      0102b627
    • K
      OMAP2+: omap_hwmod: fix wakeup enable/disable for consistency · 5a7ddcbd
      Kevin Hilman 提交于
      In the omap_hwmod core, most of the SYSCONFIG register helper
      functions do not directly write the register, but instead just modify
      a value passed in.
      
      This patch converts the _enable_wakeup() and _disable_wakeup() helper
      functions to take a value argument and only modify it instead of
      actually writing the register.  This makes the wakeup helpers
      consistent with the other helper functions and avoids unintentional
      problems like the following.
      
      This problem was found after discovering that GPIO wakeups were no
      longer functional.  The root cause was that the ENAWAKEUP bit of the
      SYSCONFIG register was being unintentionaly overwritten, leaving
      wakeups disabled after the following two commits were combined:
      
      commit: 9980ce53
              OMAP: hwmod: Enable module wakeup if in smartidle
      
      commit: 78f26e87
              OMAP: hwmod: Set autoidle after smartidle during _sysc_enable
      
      There resulting in code in _enable_sysc() was this:
      
      	/*
      	 * XXX The clock framework should handle this, by
      	 * calling into this code.  But this must wait until the
      	 * clock structures are tagged with omap_hwmod entries
      	 */
      	if ((oh->flags & HWMOD_SET_DEFAULT_CLOCKACT) &&
      	    (sf & SYSC_HAS_CLOCKACTIVITY))
      		_set_clockactivity(oh, oh->class->sysc->clockact, &v);
      
      	_write_sysconfig(v, oh);
      
      so here, 'v' has wakeups disabled.
      
      	/* If slave is in SMARTIDLE, also enable wakeup */
      	if ((sf & SYSC_HAS_SIDLEMODE) && !(oh->flags & HWMOD_SWSUP_SIDLE))
      		_enable_wakeup(oh);
      
      Here wakeup is enabled in the SYSCONFIG register (but 'v' is not updated)
      
      	/*
      	 * Set the autoidle bit only after setting the smartidle bit
      	 * Setting this will not have any impact on the other modules.
      	 */
      	if (sf & SYSC_HAS_AUTOIDLE) {
      		idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ?
      			0 : 1;
      		_set_module_autoidle(oh, idlemode, &v);
      		_write_sysconfig(v, oh);
      	}
      
      And here, SYSCONFIG is updated again using 'v', which does not have
      wakeups enabled, resulting in ENAWAKEUP being cleared.
      
      Special thanks to Benoit Cousson for pointing out that wakeups were
      supposed to be automatically enabled when a hwmod is enabled, and thus
      helping target the root cause of this problem.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      5a7ddcbd
    • P
      OMAP2+: powerdomain: move header file from plat-omap to mach-omap2 · 72e06d08
      Paul Walmsley 提交于
      The OMAP powerdomain code and data is all OMAP2+-specific.  This seems
      unlikely to change any time soon.  Move plat-omap/include/plat/powerdomain.h
      to mach-omap2/powerdomain.h.  The primary point of doing this is to remove
      the temptation for unrelated upper-layer code to access powerdomain code
      and data directly.
      
      As part of this process, remove the references to powerdomain data
      from the GPIO "driver" and the OMAP PM no-op layer, both in plat-omap.
      Change the DSPBridge code to point to the new location for the
      powerdomain headers.  The DSPBridge code should not be including the
      powerdomain headers; these should be removed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      72e06d08
    • P
      OMAP2+: clockdomain: move header file from plat-omap to mach-omap2 · 1540f214
      Paul Walmsley 提交于
      The OMAP clockdomain code and data is all OMAP2+-specific.  This seems
      unlikely to change any time soon.  Move plat-omap/include/plat/clockdomain.h
      to mach-omap2/clockdomain.h.  The primary point of doing this is to remove
      the temptation for unrelated upper-layer code to access clockdomain code
      and data directly.
      
      DSPBridge also uses the clockdomain headers for some reason, so,
      modify it also. The DSPBridge code should not be including the
      clockdomain headers; these should be removed.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      1540f214
    • P
      OMAP2/3: PRCM: split OMAP2/3-specific PRCM code into OMAP2/3-specific files · 59fb659b
      Paul Walmsley 提交于
      In preparation for adding OMAP4-specific PRCM accessor/mutator
      functions, split the existing OMAP2/3 PRCM code into OMAP2/3-specific
      files.  Most of what was in mach-omap2/{cm,prm}.{c,h} has now been
      moved into mach-omap2/{cm,prm}2xxx_3xxx.{c,h}, since it was
      OMAP2xxx/3xxx-specific.
      
      This process also requires the #includes in each of these files to be
      changed to reference the new file name.  As part of doing so, add some
      comments into plat-omap/sram.c and plat-omap/mcbsp.c, which use
      "sideways includes", to indicate that these users of the PRM/CM includes
      should not be doing so.
      
      Thanks to Felipe Contreras <felipe.contreras@gmail.com> for comments on this
      patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Jarkko Nikula <jhnikula@gmail.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
      Cc: Liam Girdwood <lrg@slimlogic.co.uk>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Acked-by: NOmar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Acked-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Reviewed-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      59fb659b
    • P
      OMAP4: PRCM: reorganize existing OMAP4 PRCM header files · d198b514
      Paul Walmsley 提交于
      Split the existing cm44xx.h file into cm1_44xx.h and cm2_44xx.h files
      so they match their underlying OMAP hardware modules.  Add clockdomain
      offset information.
      
      Add header files for the MPU local PRCM, prcm_mpu44xx.h, and for the
      SCRM, scrm44xx.h.  SCRM register offsets still need to be added; TI
      should do this.
      
      Move the "_MOD" macros out of the prcm-common.h header file, into the
      header file of the hardware module that they belong to.  For example,
      OMAP4430_PRM_*_MOD macros have been moved into the prm44xx.h header.
      
      Adjust #includes of all files that used the old PRCM header file names
      to point to the new filenames.
      
      The 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>
      Reviewed-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NKevin Hilman <khilman@deeprootsystems.com>
      Tested-by: NRajendra Nayak <rnayak@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      d198b514