diff options
author | Thomas Gessler <Thomas.Gessler@exp2.physik.uni-giessen.de> | 2014-10-13 18:08:47 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-11-17 19:54:23 +0100 |
commit | 48ef3ca98d92201c36f50ffb5409c38b02e2e953 (patch) | |
tree | e7f02a293688210ee1ac301eb348f0c9ed36ad29 /net/lapb/lapb_in.c | |
parent | a839ce663b3183209fdf7b1fc4796bfe2a4679c3 (diff) |
i2c: xiic: Fix big-endian register access
The driver tried to access device registers with the (little-endian)
iowrite/ioread functions. While this worked on little-endian machines
(e.g. Microblaze with AXI bus), it made the driver unusable on
big-endian machines (e.g. PPC405 with PLB).
During the probe function, the driver tried to write a 32-bit reset mask
into the reset register. This caused an error interrupt on big-endian
systems, because the device detected an invalid (byte-swapped) reset
mask. The result was an Oops.
The patch implements an endianness detection similar to the one used in
other Xilinx drivers like drivers/spi/spi-xilinx.c. It was tested on a
PPC405/PLB system.
Signed-off-by: Thomas Gessler <Thomas.Gessler@exp2.physik.uni-giessen.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions