summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-thunderx-pcidrv.c
diff options
context:
space:
mode:
authorJan Glauber <jglauber@cavium.com>2016-08-24 23:25:46 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-08-26 00:41:57 +0200
commit97d970046a15bf5baac849dbeac56310c8ee3966 (patch)
tree0a61089daf63501a2db807f70ad6f579fd8fd397 /drivers/i2c/busses/i2c-thunderx-pcidrv.c
parent1e5866711accf16e931c4f8174cf898b554e9f4a (diff)
downloadlinux-stable-97d970046a15bf5baac849dbeac56310c8ee3966.tar.gz
linux-stable-97d970046a15bf5baac849dbeac56310c8ee3966.tar.bz2
linux-stable-97d970046a15bf5baac849dbeac56310c8ee3966.zip
i2c: octeon,thunderx: Move register offsets to struct
The register offsets are different between Octeon and ThunderX so move them into the algorithm struct and get rid of the define. Signed-off-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-thunderx-pcidrv.c')
-rw-r--r--drivers/i2c/busses/i2c-thunderx-pcidrv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
index e8c3ce0eaf4d..bba5b429f69c 100644
--- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
@@ -158,6 +158,10 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
if (!i2c)
return -ENOMEM;
+ i2c->roff.sw_twsi = 0x1000;
+ i2c->roff.twsi_int = 0x1010;
+ i2c->roff.sw_twsi_ext = 0x1018;
+
i2c->dev = dev;
pci_set_drvdata(pdev, i2c);
ret = pcim_enable_device(pdev);