]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i2c-ali1535: enable SPARC support
authorcorentin.labbe <corentin.labbe@geomatys.fr>
Sun, 11 Dec 2011 22:48:37 +0000 (09:48 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 11 Dec 2011 22:48:37 +0000 (09:48 +1100)
commita682833a169dbe4a9657d48ce856fd04d886b424
tree81222d4befe0190a8a9c61b233583abaca306a12
parentd494c2b5eb2d825003c82c38d3c99748f8e2f1f9
i2c-ali1535: enable SPARC support

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

This patch corrects this by using pci_resource_start for getting IOMEM base address, then reading the SMBBA of the i2c busse and using together for I/O access.

I like to thanks Jean DELVARE for reviewing of 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