1. 19 Jan, 2015 1 commit
    • Andrew Lunn's avatar
      bus: mvebu-mbus: fix support of MBus window 13 · 38bdf45f
      Andrew Lunn authored
      On Armada XP, 375 and 38x the MBus window 13 has the remap capability,
      like windows 0 to 7. However, the mvebu-mbus driver isn't currently
      taking into account this special case, which means that when window 13
      is actually used, the remap registers are left to 0, making the device
      using this MBus window unavailable.
      
      As a minimal fix for stable, don't use window 13. A full fix will
      follow later.
      
      Fixes: fddddb52
      
       ("bus: introduce an Marvell EBU MBus driver")
      Cc: <stable@vger.kernel.org> # v3.10+
      Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      38bdf45f
  2. 30 Nov, 2014 2 commits
    • Thomas Petazzoni's avatar
      bus: mvebu-mbus: provide a mechanism to save SDRAM window configuration · 4749c02b
      Thomas Petazzoni authored
      
      
      On Marvell EBU platforms, when doing suspend/resume, the SDRAM window
      configuration must be saved on suspend, and restored on
      resume. However, it needs to be restored on resume *before*
      re-entering the kernel, because the SDRAM window configuration defines
      the layout of the memory. For this reason, it cannot simply be done in
      the ->suspend() and ->resume() hooks of the mvebu-mbus driver.
      
      Instead, it needs to be restored by the bootloader "boot info"
      mechanism used when resuming. This mechanism allows the kernel to
      define a list of (address, value) pairs when suspending, that the
      bootloader will restore on resume before jumping back into the kernel.
      
      This commit therefore adds a new function to the mvebu-mbus driver,
      called mvebu_mbus_save_cpu_target(), which will be called by the
      platform code to make the mvebu-mbus driver save the SDRAM window
      configuration in a way that can be understood by the bootloader "boot
      info" mechanism.
      
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
      Link: https://lkml.kernel.org/r/1416585613-2113-8-git-send-email-thomas.petazzoni@free-electrons.com
      
      
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      4749c02b
    • Thomas Petazzoni's avatar
      bus: mvebu-mbus: suspend/resume support · a0e89c02
      Thomas Petazzoni authored
      
      
      This commit extends the mvebu-mbus driver to provide suspend/resume
      support. Since mvebu-mbus is not a platform_driver, the syscore_ops
      mechanism is used to get ->suspend() and ->resume() hooks called into
      the driver.
      
      In those hooks, we save and restore the MBus windows state, to make
      sure after resume all Mbus windows are properly restored. Note that
      while the state of some windows could be gathered by looking again at
      the Device Tree (for statically described windows), it is not the case
      of dynamically described windows such as the PCIe memory and I/O
      windows. Therefore, we take the simple approach of saving and
      restoring the registers for all MBus windows.
      
      In addition, the commit extends the Device Tree binding of the MBus
      controller, to control the MBus bridge registers (which define which
      parts of the physical address space is routed to MBus windows
      vs. normal RAM memory). Those registers must be saved and restored
      during suspend/resume. The Device Tree binding extension is made is a
      backward compatible fashion, but of course, suspend/resume will not
      work without the Device Tree update.
      
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: https://lkml.kernel.org/r/1416585613-2113-7-git-send-email-thomas.petazzoni@free-electrons.com
      
      
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      a0e89c02
  3. 24 Apr, 2014 3 commits
  4. 18 Feb, 2014 1 commit
  5. 11 Feb, 2014 1 commit
  6. 24 Nov, 2013 2 commits
  7. 01 Oct, 2013 1 commit
  8. 18 Sep, 2013 1 commit
  9. 06 Aug, 2013 9 commits
  10. 08 Jun, 2013 1 commit
  11. 11 Apr, 2013 1 commit
  12. 30 Mar, 2013 1 commit
  13. 28 Mar, 2013 1 commit
    • Thomas Petazzoni's avatar
      bus: introduce an Marvell EBU MBus driver · fddddb52
      Thomas Petazzoni authored
      
      
      The Marvell EBU SoCs have a configurable physical address space
      layout: the physical ranges of memory used to address PCI(e)
      interfaces, NOR flashes, SRAM and various other types of memory are
      configurable by software, through a mechanism of so-called 'address
      decoding windows'.
      
      This new driver mvebu-mbus consolidates the existing code to address
      the configuration of these memory ranges, which is spread into
      mach-mvebu, mach-orion5x, mach-mv78xx0, mach-dove and mach-kirkwood.
      
      Following patches convert each Marvell EBU SoC family to use this
      driver, therefore removing the old code that was configuring the
      address decoding windows.
      
      It is worth mentioning that the MVEBU_MBUS Kconfig option is
      intentionally added as a blind option. The new driver implements and
      exports the mv_mbus_dram_info() function, which is used by various
      Marvell drivers throughout the tree to get access to window
      configuration parameters that they require. This function is also
      implemented in arch/arm/plat-orion/addr-map.c, which ultimately gets
      removed at the end of this patch series. So, in order to preserve
      bisectability, we want to ensure that *either* this new driver, *or*
      the legacy code in plat-orion/addr-map.c gets compiled in.
      
      By making MVEBU_MBUS a blind option, we are sure that only a platform
      that does 'select MVEBU_MBUS' will get this new driver compiled
      in. Therefore, throughout the next patches that convert the Marvell
      sub-architectures one after the other to this new driver, we add the
      'select MVEBU_MBUS' and also ensure to remove plat-orion/addr-map.c
      from the build for this specific sub-architecture. This ensures that
      bisectability is preserved.
      
      Ealier versions of this driver had a DT binding, but since those were
      not yet agreed upon, they were removed. The driver still uses
      of_device_id to find the SoC specific details according to the string
      passed to mvebu_mbus_init(). The plan is to re-introduce a proper DT
      binding as a followup set of patches.
      
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      fddddb52