i2c-ali1535: enable SPARC support
commit65a2d74b76c5ae7c400de6daedeedae308ab0bdd
authorcorentin.labbe <corentin.labbe@geomatys.fr>
Thu, 12 Jan 2012 19:32:04 +0000 (12 20:32 +0100)
committerJean Delvare <khali@endymion.delvare>
Thu, 12 Jan 2012 19:32:04 +0000 (12 20:32 +0100)
tree0d296ef635e83b0c1966931dc6b8221f6538bc91
parent7c1f59c9d5caf3a84f35549b5d58f3c055a68da5
i2c-ali1535: enable SPARC support

The i2c-ali1535 driver doesn't work on SPARC, because it assumes that
ioport address are 16-bit wide (address stored in an unsigned short).
But on SPARC arch, ioports are mapped in memory and so must be stored
in an unsigned long.

Use pci_resource_start for getting IOMEM base address, then read the
SMBBA of the i2c bus and use these together for I/O access.

I would like to thank Jean DELVARE for reviewing my patch.

Signed-off-by: LABBE Corentin <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-ali1535.c