Skip to content
Commit 48ef3ca9 authored by Thomas Gessler's avatar Thomas Gessler Committed by Wolfram Sang
Browse files

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: default avatarThomas Gessler <Thomas.Gessler@exp2.physik.uni-giessen.de>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent a839ce66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment