1. 27 3月, 2019 1 次提交
    • T
      ARM: OMAP2+: Define _HWMOD_STATE_DEFAULT and use it · 6d63b12d
      Tony Lindgren 提交于
      For dynamically allocated struct hwmod entries probing with ti-sysc
      interconnect target module driver, we need to specify the initial default
      state the same way as we do for the platform data cases.
      
      Let's prepare for that by adding _HWMOD_STATE_DEFAULT that we can then
      use to set the initial default state without a need to add similar
      CONFIG_PM handling in multiple places.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      6d63b12d
  2. 01 5月, 2018 1 次提交
    • T
      ARM: OMAP2+: Use signed value for sysc register offsets · 103fd8e7
      Tony Lindgren 提交于
      We currently don't know if a revision register exists or not. Zero is
      often a valid offset for the revision register. As we are still checking
      device tree data against platform data, we will get bogus warnings with
      correct device tree data because of incomplete platform data.
      
      Let's fix the issue by using signed offsets and tag the revision registers
      that don't exist with -ENODEV, and init the missing ones with the correct
      revision register offset.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      103fd8e7
  3. 01 3月, 2018 1 次提交
    • T
      ARM: OMAP2+: Add functions to allocate module data from device tree · 8c879705
      Tony Lindgren 提交于
      We can have ti-sysc driver manage the interconnect target module via
      platform data callback functions to hwmod code. This allows initializing
      and idling the devices using dts data instead of the legacy static data
      for interconnect target modules.
      
      Let's add functions to configure the module sysconfig data with platform
      callbacks from ti-sysc driver.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      8c879705
  4. 21 12月, 2017 2 次提交
    • T
      bus: ti-sysc: Make omap_hwmod_sysc_fields into sysc_regbits platform data · 49a0a3d8
      Tony Lindgren 提交于
      We want to be able to configure hwmod sysc data from ti-sysc driver using
      platform data callbacks. So let's make struct omap_hwmod_sysc_fields into
      struct sysc_data and have it available for both ti-sysc driver and hwmod
      code.
      
      Note that we can make it use s8 instead of u8 as the hwmod code uses the
      feature flags to check for this field. However, for ti-sysc we can use
      -ENODEV to indicate a feature is not supported in the hardware and can
      simplify the code that way.
      
      And let's add also emufree_shift as the dts files will be describing the
      hardware for the SYSCONFIG register capbilities mask.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      49a0a3d8
    • T
      ARM: OMAP2+: Move all omap_hwmod_sysc_fields to omap_hwmod_common_data.c · bf807052
      Tony Lindgren 提交于
      We want to be able to eventually allocate these dynamically with the
      data for omap_hwmod_class_sysconfig coming from dts.
      
      Note that omap_hwmod_sysc_type_smartreflex is the same as the older
      omap36xx_sr_sysc_fields, so let's use the earlier omap36xx_sr_sysc_fields
      instead.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      bf807052
  5. 15 12月, 2017 1 次提交
  6. 11 10月, 2017 4 次提交
    • T
      ARM: OMAP2+: Drop legacy struct omap_hwmod_addr_space · 9cffb1a0
      Tony Lindgren 提交于
      With all of mach-omap2 booting now in device tree only mode,
      we can get the module IO range from device tree and just drop
      the legacy hwmod struct omap_hwmod_addr_space.
      
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      9cffb1a0
    • T
      ARM: OMAP2+: Drop omap_hwmod_dma_info · c2b84a9b
      Tony Lindgren 提交于
      We have all of mach-omap2 booting in device tree only
      mode now, and this data is populated from device tree.
      
      Note that once we have removed support for the omap legacy
      DMA, we can also drop struct omap_dma_dev_attr.
      
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      c2b84a9b
    • T
      ARM: OMAP2+: Drop omap_hwmod_irq_info · fe97874a
      Tony Lindgren 提交于
      With the previous patches removing the need for legacy IRQs
      now that all of mach-omap2 is booting in device tree only mode,
      we can drop struct omap_hwmod_irq_info.
      
      Note that we can now also finally drop omap4_xlate_irq.
      
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      fe97874a
    • T
      ARM: OMAP2+: Parse module IO range from dts for legacy "ti,hwmods" support · 6c72b355
      Tony Lindgren 提交于
      When removing legacy platform data for IO ranges for the hwmod
      interconnect code, we still need to support the "ti,hwmods"
      property.
      
      And as we're going to use a generic sysc device driver to handle the
      interconnect target instances, we can parse the information needed
      for legacy "ti,hwmods" IO range from the dts. It's always the first
      range the interconnect target module provides.
      
      Note that we want to parse the range instead of the first child
      device IO regs as the child device may not always be defined.
      
      The child IP device node may not exist in cases where there is no
      driver binding for the device, or when the child IP block may not
      even be functional for some SoC revisions. But the IO range of the
      interconnect target module is always known.
      
      Cc: "Benoît Cousson" <bcousson@baylibre.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      6c72b355
  7. 20 9月, 2017 2 次提交
    • T
      ARM: OMAP2+: Drop unused omap_hwmod_mux_info · dd33074a
      Tony Lindgren 提交于
      This is no longer used as we boot in device tree
      only mode.
      
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dd33074a
    • T
      ARM: OMAP2+: Fix overwriting of clkctrl and modulemode values · 8823ddf2
      Tony Lindgren 提交于
      We are currently overwiting the hwmod clkctrl registers if we
      configure a clock ctrl clock from device tree.
      
      While this does not expose any bugs except for kernel coders
      when debugging things, it should be fixed for correctness.
      It is now impossible to use the hwmod data for checking the
      clkctrl register values after booting for debugging or
      generating dts data from hwmod data.
      
      Let's fix the issue by adding a helper to detect if clkctrl
      clock is configured.
      
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      8823ddf2
  8. 24 3月, 2017 2 次提交
  9. 15 3月, 2017 3 次提交
  10. 23 7月, 2016 1 次提交
  11. 11 4月, 2016 1 次提交
    • L
      ARM: OMAP2+: hwmod: RTC: Add lock and unlock functions · 461932df
      Lokesh Vutla 提交于
      RTC IP have kicker feature which prevents spurious writes to its registers.
      In order to write into any of the RTC registers, KICK values has to be
      written to KICK registers. Also, RTC busy flag needs to be polled for
      non-TC registers as well, without which update is not proper and confirmed
      it by testing on DRA7-evm.
      Introduce omap_hwmod_rtc_unlock/lock functions, which  writes into these
      KICK registers inorder to lock and unlock RTC registers.
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      [paul@pwsan.com: fixed subject line]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      461932df
  12. 07 3月, 2016 1 次提交
  13. 13 11月, 2015 1 次提交
  14. 24 7月, 2015 1 次提交
  15. 16 7月, 2015 1 次提交
  16. 02 6月, 2015 1 次提交
    • T
      memory: omap-gpmc: Add Kconfig option for debug · 63aa945b
      Tony Lindgren 提交于
      We support decoding the bootloader values if DEBUG is defined.
      But we also need to change the struct omap_hwmod flags to have
      HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the
      boot. Otherwise just the default timings will be displayed
      instead of the bootloader configured timings.
      
      This also allows us to clean up the various GPMC related
      hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET,
      and HWMOD_INIT_NO_IDLE is not needed.
      
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Roger Quadros <rogerq@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      63aa945b
  17. 26 2月, 2015 1 次提交
  18. 27 1月, 2015 1 次提交
  19. 18 1月, 2015 1 次提交
    • M
      ARM: OMAP: Work around hardcoded interrupts · 0fb22a8f
      Marc Zyngier 提交于
      Commit 9a1091ef ("irqchip: gic: Support hierarchy irq domain")
      changed the GIC driver to use a non-legacy IRQ domain on DT
      platforms. This patch assumes that DT-driven systems are getting
      all of their interrupts from device tree.
      
      Turns out that OMAP has quite a few hidden gems, and still uses
      hardcoded interrupts despite having fairly complete DTs.
      
      This patch attempts to work around these by offering a translation
      method that can be called directly from the hwmod code, if present.
      The same hack is sprinkled over PRCM and TWL.
      
      It isn't pretty, but it seems to do the job without having to add
      more hacks to the interrupt controller code.
      
      Tested on OMAP4 (Panda-ES) and OMAP5 (UEVM5432).
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NNishanth Menon <nm@ti.com>
      [tony@atomide.com: updated to fix make randconfig issue]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      0fb22a8f
  20. 08 1月, 2015 1 次提交
  21. 20 11月, 2014 1 次提交
  22. 18 9月, 2014 1 次提交
  23. 14 10月, 2013 1 次提交
    • A
      ARM: OMAP2+: hwmod: AM43x support · 6913952f
      Afzal Mohammed 提交于
      Add hwmod support for IP's that are present in AM43x, but not in AM335x.
      AM43x additional ones added here are,
      1. synctimer
      2. timer8-11
      3. ehrpwm3-5
      4. spi2-4
      5. gpio4-5
      
      AM43x pruss interconnect which is different as compared to AM335x, has
      been taken care.
      
      And register offsets for same hwmod's shared with AM335x is different,
      AM43x register offsets are updated appropriately.
      
      ocp clock of those in l4_wkup is fed from "sys_clkin_ck" instead of
      "dpll_core_m4_div2_ck", so "ocpif" for those in AM43x l4_wkup has been
      added seperately.
      
      hwmod's has been added for those that have main clock (wkup_m3, control,
      gpio0) and clock domain (l4_hs) different from AM335x. debugss and
      adc_tsc that have different clocks and clockdomains repectively has not
      been added due to the reasons mentioned below.
      
      AM43x also has IP's like qspi, hdq1w, vpfe, des, rng, usb, dss, debugss,
      adc_tsc. These are not handled here due to both/either of following
      reasons,
      1. To avoid churn; most of them don't have DT bindings, which would
         necessitate adding address space in hwmod, which any way would have
         to be removed once DT bindings happen with driver support.
      2. patches would come in from sources other than the author
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Acked-by: NRajendra Nayak <rnayak@ti.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      6913952f
  24. 23 8月, 2013 1 次提交
  25. 30 7月, 2013 2 次提交
    • A
      ARM: OMAP2+: hwmod: rt address space index for DT · 130142d9
      Afzal Mohammed 提交于
      Address space is being removed from hwmod database and DT information
      in <reg> property is being used. Currently the 0th index of device
      address space is used to map for register target address. This is not
      always true, eg. cpgmac has it's sysconfig in second address space.
      
      Handle it by specifying index of device address space to be used for
      register target. As default value of this field would be zero with
      static initialization, existing behaviour of using first address space
      for register target while using DT would be kept as such.
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Tested-by: NMugunthan V N <mugunthanvnm@ti.com>
      [paul@pwsan.com: use u8 rather than int to save memory]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      130142d9
    • R
      ARM: OMAP2+: hwmod: Fix a crash in _setup_reset() with DEBUG_LL · 7dedd346
      Rajendra Nayak 提交于
      With commit '82702ea1' "ARM: OMAP2+:
      Fix serial init for device tree based booting" stubbing out
      omap_serial_early_init() for Device tree based booting, there was a
      crash observed on AM335x based devices when hwmod does a
      _setup_reset() early at boot.
      
      This was rootcaused to hwmod trying to reset console uart while
      earlycon was using it.  The way to tell hwmod not to do this is to
      specify the HWMOD_INIT_NO_RESET flag, which were infact set by the
      omap_serial_early_init() function by parsing the cmdline to identify
      the console device.
      
      Parsing the cmdline to identify the uart used by earlycon itself seems
      broken as there is nothing preventing earlycon to use a different one.
      
      This patch, instead, attempts to populate the requiste flags for hwmod
      based on the CONFIG_DEBUG_OMAPxUARTy FLAGS. This gets rid of the need
      for cmdline parsing in the DT as well as non-DT cases to identify the
      uart used by earlycon.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Reported-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Reported-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Tested-by: NMark Jackson <mpfj-list@newflow.co.uk>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      7dedd346
  26. 09 6月, 2013 1 次提交
    • B
      ARM: OMAP5: hwmod data: Create initial OMAP5 SOC hwmod data · 08e4830d
      Benoit Cousson 提交于
      Adding the hwmod data for OMAP54xx SOCs.
      
      Additional changes done on top of initial SOC data files.
      - The IO resource information like dma request lines, irq number and
      ocp address space can be populated via dt blob. So such data is stripped
      from OMAP5 SOC hwmod data file.
      
      - SDMA IO resource information is still kept since dmaengine work
      is till ongoing. Once the legacy dma platform driver becomes obsolete,
      SDMA io space information can be removed.
      
      - The devices like dss, aess, usb which are missing the device tree bindings,
      hwmod data is not added since OMAP5 is DT only build. When such devices add
      the dt bindings, respective hwmod data can be added along with it.
      
      With above update, we now need about ~2000 loc vs ~6000 loc with previous
      version of the patch for OMAP5 hwmod data file. Ofcourse with addition of
      few more drivers it can go upto ~2400 loc which is still better than the
      earlier version.
      Signed-off-by: NBenoit Cousson <b-cousson@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      08e4830d
  27. 20 5月, 2013 2 次提交
  28. 01 4月, 2013 1 次提交
  29. 13 3月, 2013 1 次提交
    • G
      ARM: OMAP3: hwmod data: keep MIDLEMODE in force-standby for musb · 092bc089
      Grazvydas Ignotas 提交于
      For some unknown reason, allowing hwmod to control MIDLEMODE causes
      core_pwrdm to not hit idle states for musb in DM3730 at least.
      I've verified that setting any MIDLEMODE value other than "force
      standby" before enabling the device causes subsequent suspend
      attempts to fail with core_pwrdm not entering idle states, even
      if the driver is unloaded and "force standby" is restored before
      suspend attempt. To recover from this, soft reset can be used, but
      that's not suitable solution for suspend.
      
      Keeping the register set at force standby (reset value) makes it work
      and device still functions properly, as musb has driver-controlled
      OTG_FORCESTDBY register that controls MSTANDBY signal.
      Note that TI PSP kernels also have similar workarounds.
      
      This patch also fixes HWMOD_SWSUP_MSTANDBY documentation to match the
      actual flag name.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      092bc089
  30. 11 2月, 2013 1 次提交
    • P
      ARM: OMAP4+: AESS: enable internal auto-gating during initial setup · c02060d8
      Paul Walmsley 提交于
      Enable the AESS auto-gating control bit during AESS hwmod setup.  This
      fixes the following boot warning on OMAP4:
      
      omap_hwmod: aess: _wait_target_disable failed
      
      Without this patch, the AESS IP block does not indicate to the PRCM
      that it is idle after it is reset.  This prevents some types of SoC
      power management until something sets the auto-gating control bit.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NSebastien Guiriec <s-guiriec@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Péter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      c02060d8