1. 06 10月, 2016 1 次提交
  2. 04 10月, 2016 5 次提交
  3. 13 5月, 2016 6 次提交
  4. 09 5月, 2016 2 次提交
  5. 04 4月, 2016 1 次提交
  6. 05 2月, 2016 1 次提交
    • M
      regmap: mmio: Revert to v4.4 endianness handling · 320549a2
      Mark Brown 提交于
      Commit 29bb45f2 (regmap-mmio: Use native endianness for read/write)
      attempted to fix some long standing bugs in the MMIO implementation for
      big endian systems caused by duplicate byte swapping in both regmap and
      readl()/writel() which affected MIPS systems as when they are in big
      endian mode they flip the endianness of all registers in the system, not
      just the CPU.  MIPS systems had worked around this by declaring regmap
      using IPs as little endian which is inaccurate, unfortunately the issue
      had not been reported.
      
      Sadly the fix makes things worse rather than better.  By changing the
      behaviour to match the documentation it caused behaviour changes for
      other IPs which broke them and by using the __raw I/O accessors to avoid
      the endianness swapping in readl()/writel() it removed some memory
      ordering guarantees and could potentially generate unvirtualisable
      instructions on some architectures.
      
      Unfortunately sorting out all this mess in any half way sensible fashion
      was far too invasive to go in during an -rc cycle so instead let's go
      back to the old broken behaviour for v4.5, the better fixes are already
      queued for v4.6.  This does mean that we keep the broken MIPS DTs for
      another release but that seems the least bad way of handling the
      situation.
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      320549a2
  7. 28 1月, 2016 1 次提交
    • M
      MIPS: dt: Explicitly specify native endian behaviour for syscon · 25d6463e
      Mark Brown 提交于
      On many MIPS systems the endianness of IP blocks is kept the same as
      that of the CPU by the hardware.  This includes the system controllers
      on these systems which are controlled via syscon which uses the regmap
      API which used readl() and writel() to interact with the hardware,
      meaning that all writes are converted to little endian when writing to
      the hardware.  This caused a bad interaction with the regmap core in big
      endian mode since it was not aware of the byte swapping and so ended up
      performing little endian writes.
      
      Unfortunately when this issue was noticed it was addressed by updating
      the DT for the affected devices to specify them as little endian.  This
      happened to work since it resulted in two endianness swaps which
      cancelled each other out and gave little endian behaviour but meant that
      the DT was clearly not accurately describing the hardware.
      
      The intention of commit 29bb45f2 (regmap-mmio: Use native
      endianness for read/write) was to fix this by making regmap default to
      native endianness but this breaks most other MMIO users where the
      hardware has a fixed endianness and the implementation uses the __raw
      accessors which are not intended to be used outside of architecture
      code.  Instead use the newly added native-endian DT property to say
      exactly what we want for these systems.
      
      Fixes: 29bb45f2 (regmap-mmio: Use native endianness for read/write)
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      25d6463e
  8. 24 1月, 2016 2 次提交
  9. 16 11月, 2015 1 次提交
    • S
      regmap-mmio: Use native endianness for read/write · 29bb45f2
      Simon Arlott 提交于
      The regmap API has an endianness setting for formatting reads and writes.
      This can be set by the usual DT "little-endian" and "big-endian" properties.
      To work properly the associated regmap_bus needs to read/write in native
      endian.
      
      The "syscon" DT device binding creates an mmio-based regmap_bus which
      performs all reads/writes as little-endian. These values are then converted
      again by regmap, which means that all of the MIPS BCM boards (which are
      big-endian) have been declared as "little-endian" to get regmap to convert
      them back to big-endian.
      
      Modify regmap-mmio to use the native-endian functions __raw_read*() and
      __raw_write*() instead of the little-endian functions read*() and
      write*().
      
      Modify the big-endian MIPS BCM boards to use what will now be the correct
      endianness instead of pretending that the devices are little-endian.
      Signed-off-by: NSimon Arlott <simon@fire.lp0.eu>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      29bb45f2
  10. 11 11月, 2015 7 次提交
  11. 22 6月, 2015 4 次提交
  12. 01 4月, 2015 4 次提交