]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
watchdog: sbsa: use 32-bit read for WCV
authorJayachandran C <jnair@caviumnetworks.com>
Tue, 13 Mar 2018 22:51:00 +0000 (23:51 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 28 Mar 2018 09:04:22 +0000 (11:04 +0200)
commit78ba54d586afea80829cdeea4932fcffdabfecb9
tree0245ec363356647526e4c93d6e98b77aba0b0e5a
parente779b089fd7b115dacb8ae08f6db97a04deecd78
watchdog: sbsa: use 32-bit read for WCV

BugLink: https://bugs.launchpad.net/bugs/1755595
According to SBSA spec v3.1 section 5.3:
  All registers are 32 bits in size and should be accessed using
  32-bit reads and writes. If an access size other than 32 bits
  is used then the results are IMPLEMENTATION DEFINED.
  [...]
  The Generic Watchdog is little-endian

The current code uses readq to read the watchdog compare register
which does a 64-bit access. This fails on ThunderX2 which does not
implement 64-bit access to this register.

Fix this by using lo_hi_readq() that does two 32-bit reads.

Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit 93ac3deb7c220cbcec032a967220a1f109d58431)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/watchdog/sbsa_gwdt.c