Commit 47a6623b authored by Edward A. James's avatar Edward A. James Committed by Greg Kroah-Hartman

drivers/fsi/scom: Remove reset before every putscom

Reset causes problems for operations requiring multiple scoms (e.g. i2c
over scom). Instead, reset scom engine during probe.
Signed-off-by: default avatarEdward A. James <eajames@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 061c0958
...@@ -57,12 +57,6 @@ static int put_scom(struct scom_device *scom_dev, uint64_t value, ...@@ -57,12 +57,6 @@ static int put_scom(struct scom_device *scom_dev, uint64_t value,
int rc; int rc;
uint32_t data; uint32_t data;
data = cpu_to_be32(SCOM_RESET_CMD);
rc = fsi_device_write(scom_dev->fsi_dev, SCOM_RESET_REG, &data,
sizeof(uint32_t));
if (rc)
return rc;
data = cpu_to_be32((value >> 32) & 0xffffffff); data = cpu_to_be32((value >> 32) & 0xffffffff);
rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data, rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data,
sizeof(uint32_t)); sizeof(uint32_t));
...@@ -186,6 +180,7 @@ static const struct file_operations scom_fops = { ...@@ -186,6 +180,7 @@ static const struct file_operations scom_fops = {
static int scom_probe(struct device *dev) static int scom_probe(struct device *dev)
{ {
uint32_t data;
struct fsi_device *fsi_dev = to_fsi_dev(dev); struct fsi_device *fsi_dev = to_fsi_dev(dev);
struct scom_device *scom; struct scom_device *scom;
...@@ -202,6 +197,9 @@ static int scom_probe(struct device *dev) ...@@ -202,6 +197,9 @@ static int scom_probe(struct device *dev)
scom->mdev.parent = dev; scom->mdev.parent = dev;
list_add(&scom->link, &scom_devices); list_add(&scom->link, &scom_devices);
data = cpu_to_be32(SCOM_RESET_CMD);
fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(uint32_t));
return misc_register(&scom->mdev); return misc_register(&scom->mdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment