Skip to content

Commit 47a6623

Browse files
eddiejamesgregkh
authored andcommitted
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: Edward A. James <eajames@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 061c095 commit 47a6623

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/fsi/fsi-scom.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ static int put_scom(struct scom_device *scom_dev, uint64_t value,
5757
int rc;
5858
uint32_t data;
5959

60-
data = cpu_to_be32(SCOM_RESET_CMD);
61-
rc = fsi_device_write(scom_dev->fsi_dev, SCOM_RESET_REG, &data,
62-
sizeof(uint32_t));
63-
if (rc)
64-
return rc;
65-
6660
data = cpu_to_be32((value >> 32) & 0xffffffff);
6761
rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data,
6862
sizeof(uint32_t));
@@ -186,6 +180,7 @@ static const struct file_operations scom_fops = {
186180

187181
static int scom_probe(struct device *dev)
188182
{
183+
uint32_t data;
189184
struct fsi_device *fsi_dev = to_fsi_dev(dev);
190185
struct scom_device *scom;
191186

@@ -202,6 +197,9 @@ static int scom_probe(struct device *dev)
202197
scom->mdev.parent = dev;
203198
list_add(&scom->link, &scom_devices);
204199

200+
data = cpu_to_be32(SCOM_RESET_CMD);
201+
fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(uint32_t));
202+
205203
return misc_register(&scom->mdev);
206204
}
207205

0 commit comments

Comments
 (0)