Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Edward A. James and committed by
Greg Kroah-Hartman
47a6623b 061c0958

+4 -6
+4 -6
drivers/fsi/fsi-scom.c
··· 57 57 int rc; 58 58 uint32_t data; 59 59 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 - 66 60 data = cpu_to_be32((value >> 32) & 0xffffffff); 67 61 rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data, 68 62 sizeof(uint32_t)); ··· 180 186 181 187 static int scom_probe(struct device *dev) 182 188 { 189 + uint32_t data; 183 190 struct fsi_device *fsi_dev = to_fsi_dev(dev); 184 191 struct scom_device *scom; 185 192 ··· 196 201 scom->mdev.name = scom->name; 197 202 scom->mdev.parent = dev; 198 203 list_add(&scom->link, &scom_devices); 204 + 205 + data = cpu_to_be32(SCOM_RESET_CMD); 206 + fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(uint32_t)); 199 207 200 208 return misc_register(&scom->mdev); 201 209 }